#include <InputType.h>


Public Member Functions | |
| InputType (long translationId=0) | |
| virtual | ~InputType () |
| virtual InputTypeEnum | GetType () const =0 |
| long | GetTranslationId () const |
| void | SetTranslationId (long translationId) |
| virtual int | ComputeDistortionDistance (const WordsRange &prev, const WordsRange ¤t) const |
| returns the number of words moved | |
| virtual bool | CanIGetFromAToB (size_t start, size_t end) const |
| In a word lattice, tells you if there's a path from node start to node end. | |
| bool | IsCoveragePossible (const WordsRange &range) const |
| is there a path covering [range] (lattice only, otherwise true) | |
| bool | IsExtensionPossible (const WordsRange &prev, const WordsRange ¤t) const |
| In a word lattice, you can't always get from node A to node B. | |
| virtual size_t | GetSize () const =0 |
| number of words in this sentence/confusion network | |
| virtual int | Read (std::istream &in, const std::vector< FactorType > &factorOrder)=0 |
| populate this InputType with data from in stream | |
| virtual void | Print (std::ostream &) const =0 |
| Output debugging info to stream out. | |
| virtual TranslationOptionCollection * | CreateTranslationOptionCollection (const TranslationSystem *system) const =0 |
| create trans options specific to this InputType | |
| virtual Phrase | GetSubString (const WordsRange &) const =0 |
| return substring. Only valid for Sentence class. TODO - get rid of this fn | |
| virtual const Word & | GetWord (size_t pos) const =0 |
| return substring at a particular position. Only valid for Sentence class. TODO - get rid of this fn | |
| const ReorderingConstraint & | GetReorderingConstraint () const |
| Returns the reordering constraints. | |
| virtual const NonTerminalSet & | GetLabelSet (size_t startPos, size_t endPos) const =0 |
| TO_STRING () | |
Public Attributes | |
| std::vector< bool > | m_sourceCompleted |
| std::string | m_initialTargetPhrase |
| size_t | m_frontSpanCoveredLength |
Protected Attributes | |
| long | m_translationId |
| bool | m_hasMetaData |
| long | m_segId |
| ReorderingConstraint | m_reorderingConstraint |
Definition at line 43 of file InputType.h.
| Moses::InputType::InputType | ( | long | translationId = 0 |
) |
Definition at line 30 of file InputType.cpp.
References m_frontSpanCoveredLength, and m_sourceCompleted.
| Moses::InputType::~InputType | ( | ) | [virtual] |
Definition at line 36 of file InputType.cpp.
| bool Moses::InputType::CanIGetFromAToB | ( | size_t | start, | |
| size_t | end | |||
| ) | const [virtual] |
In a word lattice, tells you if there's a path from node start to node end.
Reimplemented in Moses::WordLattice.
Definition at line 58 of file InputType.cpp.
Referenced by IsCoveragePossible(), IsExtensionPossible(), and Moses::SearchNormal::ProcessOneHypothesis().

| int Moses::InputType::ComputeDistortionDistance | ( | const WordsRange & | prev, | |
| const WordsRange & | current | |||
| ) | const [virtual] |
returns the number of words moved
Reimplemented in Moses::WordLattice.
Definition at line 47 of file InputType.cpp.
References Moses::WordsRange::GetEndPos(), Moses::WordsRange::GetNumWordsCovered(), and Moses::WordsRange::GetStartPos().
Referenced by Moses::BackwardsEdge::BackwardsEdge(), Moses::DistortionScoreProducer::CalculateDistortionScore(), Moses::SearchCubePruning::CheckDistortion(), and Moses::SearchNormal::ProcessOneHypothesis().


| virtual TranslationOptionCollection* Moses::InputType::CreateTranslationOptionCollection | ( | const TranslationSystem * | system | ) | const [pure virtual] |
create trans options specific to this InputType
Implemented in Moses::ConfusionNet, and Moses::Sentence.
| virtual const NonTerminalSet& Moses::InputType::GetLabelSet | ( | size_t | startPos, | |
| size_t | endPos | |||
| ) | const [pure virtual] |
Implemented in Moses::ConfusionNet, Moses::Sentence, Moses::TreeInput, and Moses::WordLattice.
Referenced by Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection().

| const ReorderingConstraint& Moses::InputType::GetReorderingConstraint | ( | ) | const [inline] |
Returns the reordering constraints.
Definition at line 127 of file InputType.h.
References m_reorderingConstraint.
Referenced by Moses::SearchCubePruning::CheckDistortion(), and Moses::SearchNormal::ProcessOneHypothesis().

| virtual size_t Moses::InputType::GetSize | ( | ) | const [pure virtual] |
number of words in this sentence/confusion network
Implemented in Moses::ConfusionNet, and Moses::Sentence.
Referenced by Moses::TranslationOptionCollection::CacheLexReordering(), Moses::TranslationOptionCollection::CalcFutureScore(), Moses::ChartManager::CalcNBest(), Moses::ChartCellCollection::ChartCellCollection(), Moses::ChartRuleLookupManagerMemory::ChartRuleLookupManagerMemory(), Moses::ChartRuleLookupManagerOnDisk::ChartRuleLookupManagerOnDisk(), Moses::SearchCubePruning::CreateForwardTodos(), Moses::LexicalReorderingConfiguration::CreateLexicalReorderingState(), Moses::TranslationOptionCollection::CreateTranslationOptions(), Moses::ChartTranslationOptionCollection::CreateTranslationOptionsForRange(), Moses::ChartManager::GetBestHypothesis(), Moses::ChartManager::GetSearchGraph(), Moses::TranslationOptionCollection::GetSize(), Moses::SentenceStats::Initialize(), OutputInput(), Moses::SearchNormal::ProcessOneHypothesis(), Moses::ChartManager::ProcessSentence(), Moses::TranslationOptionCollection::ProcessUnknownWord(), Moses::TranslationOptionCollection::Prune(), Moses::TranslationOptionCollection::Sort(), and Moses::TranslationOptionCollection::TranslationOptionCollection().

| virtual Phrase Moses::InputType::GetSubString | ( | const WordsRange & | ) | const [pure virtual] |
return substring. Only valid for Sentence class. TODO - get rid of this fn
Implemented in Moses::ConfusionNet, and Moses::Sentence.
Referenced by Moses::TranslationOptionCollection::CreateTranslationOptionsForRange(), Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollection(), Moses::PhraseDictionary::GetTargetPhraseCollection(), Moses::DecodeStepTranslation::ProcessInitialTranslation(), and Moses::TranslationOption::TranslationOption().

| long Moses::InputType::GetTranslationId | ( | ) | const [inline] |
Definition at line 64 of file InputType.h.
References m_translationId.
Referenced by IOWrapper::GetInput(), Moses::PhraseDictionaryALSuffixArray::InitializeForInput(), and Moses::SearchNormal::SearchNormal().

| virtual InputTypeEnum Moses::InputType::GetType | ( | ) | const [pure virtual] |
Implemented in Moses::ConfusionNet, Moses::Sentence, and Moses::TreeInput.
Referenced by Moses::TranslationOption::TranslationOption().

| virtual const Word& Moses::InputType::GetWord | ( | size_t | pos | ) | const [pure virtual] |
return substring at a particular position. Only valid for Sentence class. TODO - get rid of this fn
Implemented in Moses::ConfusionNet, and Moses::Sentence.
Referenced by Moses::ChartCell::ChartCell(), Moses::ChartTranslationOptionCollection::CreateTranslationOptionsForRange(), and Moses::TranslationOptionCollectionText::ProcessUnknownWord().

| bool Moses::InputType::IsCoveragePossible | ( | const WordsRange & | range | ) | const [inline] |
is there a path covering [range] (lattice only, otherwise true)
Definition at line 77 of file InputType.h.
References CanIGetFromAToB(), Moses::WordsRange::GetEndPos(), and Moses::WordsRange::GetStartPos().
Referenced by Moses::SearchNormal::ProcessOneHypothesis().


| bool Moses::InputType::IsExtensionPossible | ( | const WordsRange & | prev, | |
| const WordsRange & | current | |||
| ) | const [inline] |
In a word lattice, you can't always get from node A to node B.
Definition at line 82 of file InputType.h.
References CanIGetFromAToB(), Moses::WordsRange::GetEndPos(), and Moses::WordsRange::GetStartPos().

| virtual void Moses::InputType::Print | ( | std::ostream & | ) | const [pure virtual] |
Output debugging info to stream out.
Implemented in Moses::ConfusionNet, Moses::Sentence, Moses::TreeInput, and Moses::WordLattice.
Referenced by Moses::operator<<().

| virtual int Moses::InputType::Read | ( | std::istream & | in, | |
| const std::vector< FactorType > & | factorOrder | |||
| ) | [pure virtual] |
populate this InputType with data from in stream
Implemented in Moses::ConfusionNet, Moses::Sentence, Moses::TreeInput, and Moses::WordLattice.
Referenced by IOWrapper::GetInput().

| void Moses::InputType::SetTranslationId | ( | long | translationId | ) | [inline] |
Definition at line 67 of file InputType.h.
References m_translationId.
Referenced by IOWrapper::GetInput(), Moses::WordLattice::Read(), and Moses::Sentence::Read().

| Moses::InputType::TO_STRING | ( | ) |
Definition at line 56 of file InputType.h.
Referenced by Moses::DistortionScoreProducer::EmptyHypothesisState(), InputType(), and Moses::Sentence::Read().
bool Moses::InputType::m_hasMetaData [protected] |
Definition at line 47 of file InputType.h.
| std::string Moses::InputType::m_initialTargetPhrase |
limits on reordering specified either by "-mp" switch or xml tags
Definition at line 49 of file InputType.h.
Referenced by GetReorderingConstraint(), and Moses::Sentence::Read().
long Moses::InputType::m_segId [protected] |
Definition at line 48 of file InputType.h.
| std::vector<bool> Moses::InputType::m_sourceCompleted |
long Moses::InputType::m_translationId [protected] |
Definition at line 46 of file InputType.h.
Referenced by GetTranslationId(), and SetTranslationId().
1.5.9