#include <TranslationOptionCollectionLattice.h>
Public Member Functions | |
TranslationOptionCollectionLattice (ttasksptr const &ttask, const WordLattice &source) | |
void | CreateTranslationOptions () |
Create all possible translations from the phrase tables. | |
bool | CreateTranslationOptionsForRange (const DecodeGraph &decodeStepList, size_t startPosition, size_t endPosition, bool adhereTableLimit, size_t graphInd) |
Create translation options that exactly cover a specific input span. | |
Protected Member Functions | |
void | ProcessUnknownWord (size_t sourcePos) |
implemented by inherited class, called by this class | |
void | Extend (const InputPath &prevPath, const WordLattice &input, size_t const maxPhraseLength) |
Definition at line 15 of file TranslationOptionCollectionLattice.h.
Moses::TranslationOptionCollectionLattice::TranslationOptionCollectionLattice | ( | ttasksptr const & | ttask, | |
const WordLattice & | input | |||
) |
constructor; just initialize the base class
Definition at line 24 of file TranslationOptionCollectionLattice.cpp.
References Moses::Phrase::AddWord(), Moses::ConfusionNet::GetColumn(), Moses::ConfusionNet::GetLabelSet(), Moses::WordLattice::GetNextNodes(), Moses::Range::GetNumWordsCovered(), Moses::ConfusionNet::GetSize(), Moses::StaticData::Instance(), Moses::InputFeature::InstancePtr(), Moses::Word::IsEpsilon(), NULL, Moses::InputType::options(), range, Moses::InputPath::SetNextNode(), and UTIL_THROW_IF2.
void Moses::TranslationOptionCollectionLattice::CreateTranslationOptions | ( | ) | [virtual] |
Create all possible translations from the phrase tables.
Create all possible translations from the phrase tables for a particular input sentence. This implies applying all translation and generation steps. Also computes future cost matrix.
Reimplemented from Moses::TranslationOptionCollection.
Definition at line 135 of file TranslationOptionCollectionLattice.cpp.
References Moses::TranslationOptionCollection::Add(), Moses::TranslationOptionCollection::CacheLexReordering(), Moses::TranslationOptionCollection::CalcEstimatedScore(), Moses::TranslationOption::EvaluateWithSourceContext(), Moses::StaticData::GetDecodeGraphs(), Moses::InputPath::GetInputScore(), Moses::Range::GetNumWordsCovered(), Moses::InputPath::GetPhrase(), Moses::Phrase::GetSize(), Moses::Range::GetStartPos(), Moses::TranslationOptionCollection::GetTargetPhraseCollectionBatch(), Moses::InputPath::GetTargetPhrases(), Moses::InputPath::GetWordsRange(), Moses::StaticData::Instance(), Moses::TranslationOptionCollection::m_inputPathQueue, Moses::TranslationOptionCollection::m_source, Moses::TranslationOptionCollection::ProcessOneUnknownWord(), Moses::TranslationOptionCollection::Prune(), range, Moses::TranslationOption::SetInputPath(), Moses::TranslationOptionCollection::Sort(), UTIL_THROW_IF2, and VERBOSE.
bool Moses::TranslationOptionCollectionLattice::CreateTranslationOptionsForRange | ( | const DecodeGraph & | decodeStepList, | |
size_t | startPosition, | |||
size_t | endPosition, | |||
bool | adhereTableLimit, | |||
size_t | graphInd | |||
) | [virtual] |
Create translation options that exactly cover a specific input span.
Implements Moses::TranslationOptionCollection.
Definition at line 195 of file TranslationOptionCollectionLattice.cpp.
References UTIL_THROW.
void Moses::TranslationOptionCollectionLattice::Extend | ( | const InputPath & | prevPath, | |
const WordLattice & | input, | |||
size_t const | maxPhraseLength | |||
) | [protected] |
Definition at line 82 of file TranslationOptionCollectionLattice.cpp.
References Moses::Phrase::AddWord(), Moses::ConfusionNet::GetColumn(), Moses::Range::GetEndPos(), Moses::InputPath::GetInputScore(), Moses::ConfusionNet::GetLabelSet(), Moses::WordLattice::GetNextNodes(), Moses::Range::GetNumWordsCovered(), Moses::InputPath::GetPhrase(), Moses::ConfusionNet::GetSize(), Moses::Range::GetStartPos(), Moses::InputPath::GetWordsRange(), Moses::Word::IsEpsilon(), Moses::TranslationOptionCollection::m_inputPathQueue, NULL, Moses::ScorePair::PlusEquals(), range, Moses::InputPath::SetNextNode(), Moses::InputPath::ttask, and UTIL_THROW_IF2.
void Moses::TranslationOptionCollectionLattice::ProcessUnknownWord | ( | size_t | sourcePos | ) | [protected, virtual] |
implemented by inherited class, called by this class
Implements Moses::TranslationOptionCollection.
Definition at line 186 of file TranslationOptionCollectionLattice.cpp.
References UTIL_THROW.