#include <InputPath.h>
Public Types | |
typedef std::pair < TargetPhraseCollection::shared_ptr, const void * > | TPCollStoreEntry |
typedef std::map< const PhraseDictionary *, TPCollStoreEntry > | TargetPhrases |
Public Member Functions | |
InputPath () | |
InputPath (TranslationTask const *ttask, Phrase const &phrase, NonTerminalSet const &sourceNonTerms, Range const &range, InputPath const *prevNode, ScorePair const *inputScore) | |
~InputPath () | |
const Phrase & | GetPhrase () const |
const NonTerminalSet & | GetNonTerminalSet () const |
const std::vector< bool > & | GetNonTerminalArray () const |
const Range & | GetWordsRange () const |
const Word & | GetLastWord () const |
const InputPath * | GetPrevPath () const |
size_t | GetNextNode () const |
distance to next node in input lattice. For sentences and confusion networks, this should be 1 (default) | |
void | SetNextNode (size_t nextNode) |
void | SetTargetPhrases (const PhraseDictionary &phraseDictionary, TargetPhraseCollection::shared_ptr const &targetPhrases, const void *ptNode) |
TargetPhraseCollection::shared_ptr | GetTargetPhrases (const PhraseDictionary &phraseDictionary) const |
const TargetPhrases & | GetTargetPhrases () const |
const void * | GetPtNode (const PhraseDictionary &phraseDictionary) const |
const ScorePair * | GetInputScore () const |
size_t | GetTotalRuleSize () const |
std::vector< const Word * > & | AddRuleSourceFromInputPath () const |
Public Attributes | |
TranslationTask const * | ttask |
Protected Attributes | |
const InputPath * | m_prevPath |
Phrase | m_phrase |
Range | m_range |
const ScorePair * | m_inputScore |
size_t | m_nextNode |
TargetPhrases | m_targetPhrases |
std::vector< std::vector < const Word * > > | m_ruleSourceFromInputPath |
const NonTerminalSet | m_sourceNonTerms |
std::vector< bool > | m_sourceNonTermArray |
Friends | |
std::ostream & | operator<< (std::ostream &out, const InputPath &obj) |
Definition at line 30 of file InputPath.h.
typedef std::map<const PhraseDictionary*, TPCollStoreEntry> Moses::InputPath::TargetPhrases |
Definition at line 40 of file InputPath.h.
typedef std::pair<TargetPhraseCollection::shared_ptr, const void*> Moses::InputPath::TPCollStoreEntry |
Definition at line 37 of file InputPath.h.
Moses::InputPath::InputPath | ( | ) | [inline, explicit] |
Definition at line 62 of file InputPath.h.
Moses::InputPath::InputPath | ( | TranslationTask const * | ttask, | |
Phrase const & | phrase, | |||
NonTerminalSet const & | sourceNonTerms, | |||
Range const & | range, | |||
InputPath const * | prevNode, | |||
ScorePair const * | inputScore | |||
) |
Moses::InputPath::~InputPath | ( | ) |
std::vector<const Word*>& Moses::InputPath::AddRuleSourceFromInputPath | ( | ) | const [inline] |
Definition at line 125 of file InputPath.h.
References m_ruleSourceFromInputPath.
Referenced by Moses::ChartTranslationOptions::CreateSourceRuleFromInputPath().
const ScorePair* Moses::InputPath::GetInputScore | ( | ) | const [inline] |
Definition at line 119 of file InputPath.h.
References m_inputScore.
Referenced by Moses::TranslationOptionCollectionLattice::CreateTranslationOptions(), Moses::InputFeature::EvaluateWithSourceContext(), Moses::TranslationOptionCollectionLattice::Extend(), Moses::TranslationOptionCollection::SetInputScore(), and Moses::TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet().
const Word & Moses::InputPath::GetLastWord | ( | ) | const |
Definition at line 94 of file InputPath.cpp.
References Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), m_phrase, and UTIL_THROW_IF2.
size_t Moses::InputPath::GetNextNode | ( | ) | const [inline] |
distance to next node in input lattice. For sentences and confusion networks, this should be 1 (default)
Definition at line 97 of file InputPath.h.
References m_nextNode.
const std::vector<bool>& Moses::InputPath::GetNonTerminalArray | ( | ) | const [inline] |
const NonTerminalSet& Moses::InputPath::GetNonTerminalSet | ( | ) | const [inline] |
Definition at line 81 of file InputPath.h.
References m_sourceNonTerms.
Referenced by Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection().
const Phrase& Moses::InputPath::GetPhrase | ( | ) | const [inline] |
Definition at line 78 of file InputPath.h.
References m_phrase.
Referenced by Moses::SentenceStats::AddDeletedWords(), Moses::CorrectionPattern::ComputeFeatures(), Moses::SparseReordering::CopyScores(), Moses::ChartTranslationOptions::CreateSourceRuleFromInputPath(), Moses::TranslationOptionCollectionLattice::CreateTranslationOptions(), Moses::PhraseBoundaryFeature::EvaluateWhenApplied(), Moses::WordTranslationFeature::EvaluateWithSourceContext(), Moses::PhrasePairFeature::EvaluateWithSourceContext(), Moses::TranslationOptionCollectionLattice::Extend(), Moses::Manager::GetPlaceholders(), Moses::Hypothesis::GetPlaceholders(), Moses::PhraseDictionaryTransliteration::GetTargetPhraseCollection(), Moses::Mmsapt::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryOnDisk::GetTargetPhraseCollectionBatch(), Moses::ProbingPT::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryTransliteration::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemoryPerSentenceOnDemand::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemoryPerSentence::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemory::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryGroup::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionary::GetTargetPhraseCollectionBatch(), Moses::ExamplePT::GetTargetPhraseCollectionBatch(), Moses::operator<<(), Moses::Manager::OutputInput(), Moses::Hypothesis::OutputInput(), Moses::Hypothesis::PrintHypothesis(), Moses::DecodeStepTranslation::Process(), Moses::DecodeStepGeneration::Process(), Moses::DecodeStepTranslation::ProcessLEGACY(), Moses::TranslationOptionCollection::ProcessOneUnknownWord(), Moses::PhraseDictionary::SatisfyBackoff(), Moses::LexicalReordering::SetCache(), and Moses::TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet().
const InputPath* Moses::InputPath::GetPrevPath | ( | ) | const [inline] |
Definition at line 92 of file InputPath.h.
References m_prevPath.
Referenced by Moses::PhraseDictionaryOnDisk::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemory::GetTargetPhraseCollectionBatch(), and Moses::operator<<().
const void * Moses::InputPath::GetPtNode | ( | const PhraseDictionary & | phraseDictionary | ) | const |
Definition at line 73 of file InputPath.cpp.
References m_targetPhrases, and NULL.
Referenced by Moses::PhraseDictionaryOnDisk::GetTargetPhraseCollectionBatch(), and Moses::PhraseDictionaryMemory::GetTargetPhraseCollectionBatch().
const TargetPhrases& Moses::InputPath::GetTargetPhrases | ( | ) | const [inline] |
TargetPhraseCollection::shared_ptr Moses::InputPath::GetTargetPhrases | ( | const PhraseDictionary & | phraseDictionary | ) | const |
Definition at line 61 of file InputPath.cpp.
References m_targetPhrases.
Referenced by Moses::TranslationOptionCollectionLattice::CreateTranslationOptions(), Moses::TranslationOptionCollection::CreateTranslationOptionsForRange(), and Moses::PhraseDictionary::SatisfyBackoff().
size_t Moses::InputPath::GetTotalRuleSize | ( | ) | const |
const Range& Moses::InputPath::GetWordsRange | ( | ) | const [inline] |
Definition at line 87 of file InputPath.h.
References m_range.
Referenced by Moses::TranslationOptionCollectionLattice::CreateTranslationOptions(), Moses::WordTranslationFeature::EvaluateWithSourceContext(), Moses::SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(), Moses::SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(), Moses::TranslationOptionCollectionLattice::Extend(), Moses::Scope3Parser::GetChartRuleCollection(), Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection(), Moses::ChartRuleLookupManagerMemoryPerSentence::GetChartRuleCollection(), Moses::ChartRuleLookupManagerMemory::GetChartRuleCollection(), Moses::ChartRuleLookupManagerExample::GetChartRuleCollection(), Moses::GetContext(), and Moses::operator<<().
void Moses::InputPath::SetNextNode | ( | size_t | nextNode | ) | [inline] |
Definition at line 101 of file InputPath.h.
References m_nextNode.
Referenced by Moses::TranslationOptionCollectionLattice::Extend(), and Moses::TranslationOptionCollectionLattice::TranslationOptionCollectionLattice().
void Moses::InputPath::SetTargetPhrases | ( | const PhraseDictionary & | phraseDictionary, | |
TargetPhraseCollection::shared_ptr const & | targetPhrases, | |||
const void * | ptNode | |||
) |
Definition at line 85 of file InputPath.cpp.
References m_targetPhrases.
Referenced by Moses::PhraseDictionaryTransliteration::GetTargetPhraseCollection(), Moses::Mmsapt::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryOnDisk::GetTargetPhraseCollectionBatch(), Moses::ProbingPT::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemoryPerSentenceOnDemand::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemoryPerSentence::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryMemory::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionaryGroup::GetTargetPhraseCollectionBatch(), Moses::PhraseDictionary::GetTargetPhraseCollectionBatch(), and Moses::ExamplePT::GetTargetPhraseCollectionBatch().
std::ostream& operator<< | ( | std::ostream & | out, | |
const InputPath & | obj | |||
) | [friend] |
Definition at line 118 of file InputPath.cpp.
const ScorePair* Moses::InputPath::m_inputScore [protected] |
size_t Moses::InputPath::m_nextNode [protected] |
Phrase Moses::InputPath::m_phrase [protected] |
const InputPath* Moses::InputPath::m_prevPath [protected] |
Range Moses::InputPath::m_range [protected] |
std::vector<std::vector<const Word*> > Moses::InputPath::m_ruleSourceFromInputPath [mutable, protected] |
std::vector<bool> Moses::InputPath::m_sourceNonTermArray [protected] |
const NonTerminalSet Moses::InputPath::m_sourceNonTerms [protected] |
TargetPhrases Moses::InputPath::m_targetPhrases [protected] |
Definition at line 53 of file InputPath.h.
Referenced by GetPtNode(), GetTargetPhrases(), GetTotalRuleSize(), Moses::operator<<(), and SetTargetPhrases().
Definition at line 44 of file InputPath.h.
Referenced by Moses::ChartTranslationOptions::EvaluateWithSourceContext(), and Moses::TranslationOptionCollectionLattice::Extend().