Moses::TreeInput Class Reference

#include <TreeInput.h>

Inheritance diagram for Moses::TreeInput:

Inheritance graph
[legend]
Collaboration diagram for Moses::TreeInput:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TreeInput (AllOptions::ptr const &opts)
InputTypeEnum GetType () const
virtual int Read (std::istream &in)
 populate this InputType with data from in stream
virtual void Print (std::ostream &) const
 Output debugging info to stream out.
virtual
TranslationOptionCollection
CreateTranslationOptionCollection () const
 create trans options specific to this InputType
virtual const NonTerminalSetGetLabelSet (size_t startPos, size_t endPos) const
const std::vector
< XMLParseOutput > & 
GetLabelledSpans () const
 Get the XMLParseOutput objects in the order they were created.

Protected Member Functions

void AddChartLabel (size_t startPos, size_t endPos, const std::string &label)
void AddChartLabel (size_t startPos, size_t endPos, const Word &label)
NonTerminalSetGetLabelSet (size_t startPos, size_t endPos)
bool ProcessAndStripXMLTags (AllOptions const &opts, std::string &line, std::vector< XMLParseOutput > &sourceLabels, std::vector< XmlOption const * > &res)

Protected Attributes

std::vector< std::vector
< NonTerminalSet > > 
m_sourceChart
std::vector< XMLParseOutputm_labelledSpans

Friends

std::ostream & operator<< (std::ostream &, const TreeInput &)


Detailed Description

An input to the decoder that represent a parse tree. Implemented as a sentence with non-terminal labels over certain ranges. This representation doesn't necessarily have to form a tree, it's up to the user to make sure it does if they really want a tree.
Todo:
Need to rewrite if you want packed forest, or packed forest over lattice - not sure if can inherit from this

Definition at line 30 of file TreeInput.h.


Constructor & Destructor Documentation

Moses::TreeInput::TreeInput ( AllOptions::ptr const &  opts  )  [inline]

Definition at line 50 of file TreeInput.h.


Member Function Documentation

void Moses::TreeInput::AddChartLabel ( size_t  startPos,
size_t  endPos,
const Word label 
) [protected]

void Moses::TreeInput::AddChartLabel ( size_t  startPos,
size_t  endPos,
const std::string &  label 
) [protected]

Referenced by Read().

Here is the caller graph for this function:

TranslationOptionCollection * Moses::TreeInput::CreateTranslationOptionCollection (  )  const [virtual]

create trans options specific to this InputType

Definition at line 296 of file TreeInput.cpp.

References NULL.

const std::vector<XMLParseOutput>& Moses::TreeInput::GetLabelledSpans (  )  const [inline]

Get the XMLParseOutput objects in the order they were created.

Definition at line 71 of file TreeInput.h.

References m_labelledSpans.

virtual const NonTerminalSet& Moses::TreeInput::GetLabelSet ( size_t  startPos,
size_t  endPos 
) const [inline, virtual]

Reimplemented from Moses::Sentence.

Definition at line 66 of file TreeInput.h.

References m_sourceChart.

NonTerminalSet& Moses::TreeInput::GetLabelSet ( size_t  startPos,
size_t  endPos 
) [inline, protected]

InputTypeEnum Moses::TreeInput::GetType (  )  const [inline, virtual]

Reimplemented from Moses::Sentence.

Definition at line 52 of file TreeInput.h.

References Moses::TreeInputType.

void Moses::TreeInput::Print ( std::ostream &  out  )  const [virtual]

Output debugging info to stream out.

Reimplemented from Moses::Sentence.

Definition at line 290 of file TreeInput.cpp.

bool Moses::TreeInput::ProcessAndStripXMLTags ( AllOptions const &  opts,
std::string &  line,
std::vector< XMLParseOutput > &  sourceLabels,
std::vector< XmlOption const * > &  res 
) [protected]

Referenced by Read().

Here is the caller graph for this function:

int Moses::TreeInput::Read ( std::istream &  in  )  [virtual]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const TreeInput input 
) [friend]

Definition at line 339 of file TreeInput.cpp.


Member Data Documentation

Definition at line 36 of file TreeInput.h.

Referenced by GetLabelledSpans(), and Read().

std::vector<std::vector<NonTerminalSet> > Moses::TreeInput::m_sourceChart [protected]

Definition at line 35 of file TreeInput.h.

Referenced by GetLabelSet(), and Read().


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:33:57 2017 for Moses by  doxygen 1.5.9