#include <TreeInput.h>


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 NonTerminalSet & | GetLabelSet (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) |
| NonTerminalSet & | GetLabelSet (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< XMLParseOutput > | m_labelledSpans |
Friends | |
| std::ostream & | operator<< (std::ostream &, const TreeInput &) |
Definition at line 30 of file TreeInput.h.
| Moses::TreeInput::TreeInput | ( | AllOptions::ptr const & | opts | ) | [inline] |
Definition at line 50 of file TreeInput.h.
| void Moses::TreeInput::AddChartLabel | ( | size_t | startPos, | |
| size_t | endPos, | |||
| const Word & | label | |||
| ) | [protected] |
Definition at line 304 of file TreeInput.cpp.
References GetLabelSet(), Moses::Word::IsNonTerminal(), Moses::InputType::m_options, Moses::SourceLabelOverlapAdd, Moses::SourceLabelOverlapDiscard, Moses::SourceLabelOverlapReplace, and UTIL_THROW_IF2.

| void Moses::TreeInput::AddChartLabel | ( | size_t | startPos, | |
| size_t | endPos, | |||
| const std::string & | label | |||
| ) | [protected] |
| 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] |
Definition at line 41 of file TreeInput.h.
References m_sourceChart.
Referenced by AddChartLabel(), Moses::SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(), Moses::SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(), Moses::operator<<(), and Read().

| 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] |
| int Moses::TreeInput::Read | ( | std::istream & | in | ) | [virtual] |
populate this InputType with data from in stream
Reimplemented from Moses::Sentence.
Definition at line 243 of file TreeInput.cpp.
References AddChartLabel(), Moses::Range::GetEndPos(), GetLabelSet(), Moses::Sentence::GetSize(), Moses::Range::GetStartPos(), Moses::XMLParseOutput::m_label, m_labelledSpans, Moses::InputType::m_options, Moses::XMLParseOutput::m_range, m_sourceChart, Moses::Sentence::m_xmlOptions, ProcessAndStripXMLTags(), and range.

| std::ostream& operator<< | ( | std::ostream & | out, | |
| const TreeInput & | input | |||
| ) | [friend] |
Definition at line 339 of file TreeInput.cpp.
std::vector<XMLParseOutput> Moses::TreeInput::m_labelledSpans [protected] |
std::vector<std::vector<NonTerminalSet> > Moses::TreeInput::m_sourceChart [protected] |
1.5.9