Moses::InputPath Class Reference

#include <InputPath.h>

Collaboration diagram for Moses::InputPath:

Collaboration graph

List of all members.

Public Types

typedef std::pair
< TargetPhraseCollection::shared_ptr,
const void * > 
typedef std::map< const
*, TPCollStoreEntry

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 PhraseGetPhrase () const
const NonTerminalSetGetNonTerminalSet () const
const std::vector< bool > & GetNonTerminalArray () const
const RangeGetWordsRange () const
const WordGetLastWord () const
const InputPathGetPrevPath () 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 TargetPhrasesGetTargetPhrases () const
const void * GetPtNode (const PhraseDictionary &phraseDictionary) const
const ScorePairGetInputScore () const
size_t GetTotalRuleSize () const
std::vector< const Word * > & AddRuleSourceFromInputPath () const

Public Attributes

TranslationTask const * ttask

Protected Attributes

const InputPathm_prevPath
Phrase m_phrase
Range m_range
const ScorePairm_inputScore
size_t m_nextNode
TargetPhrases m_targetPhrases
std::vector< std::vector
< const Word * > > 
const NonTerminalSet m_sourceNonTerms
std::vector< bool > m_sourceNonTermArray


std::ostream & operator<< (std::ostream &out, const InputPath &obj)

Detailed Description

Each node contains 1. substring used to searching the phrase table 2. the source range it covers 3. a list of InputPath that it is a prefix of This is for both sentence input, and confusion network/lattices

Definition at line 30 of file InputPath.h.

Member Typedef Documentation

Definition at line 40 of file InputPath.h.

Definition at line 37 of file InputPath.h.

Constructor & Destructor Documentation

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 

Definition at line 14 of file InputPath.cpp.

References m_sourceNonTermArray.

Moses::InputPath::~InputPath (  ) 

Definition at line 37 of file InputPath.cpp.

References m_inputScore.

Member Function Documentation

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().

Here is the caller graph for this function:

const ScorePair* Moses::InputPath::GetInputScore (  )  const [inline]

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.

Here is the call graph for this function:

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]

Definition at line 84 of file InputPath.h.

References m_sourceNonTermArray.

const NonTerminalSet& Moses::InputPath::GetNonTerminalSet (  )  const [inline]

Definition at line 81 of file InputPath.h.

References m_sourceNonTerms.

Referenced by Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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<<().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

const TargetPhrases& Moses::InputPath::GetTargetPhrases (  )  const [inline]

Definition at line 113 of file InputPath.h.

References m_targetPhrases.

TargetPhraseCollection::shared_ptr Moses::InputPath::GetTargetPhrases ( const PhraseDictionary phraseDictionary  )  const

size_t Moses::InputPath::GetTotalRuleSize (  )  const

Definition at line 102 of file InputPath.cpp.

References m_targetPhrases.

const Range& Moses::InputPath::GetWordsRange (  )  const [inline]

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().

Here is the caller graph for this function:

void Moses::InputPath::SetTargetPhrases ( const PhraseDictionary phraseDictionary,
TargetPhraseCollection::shared_ptr const &  targetPhrases,
const void *  ptNode 

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const InputPath obj 
) [friend]

Definition at line 118 of file InputPath.cpp.

Member Data Documentation

Definition at line 49 of file InputPath.h.

Referenced by GetInputScore(), and ~InputPath().

size_t Moses::InputPath::m_nextNode [protected]

Definition at line 50 of file InputPath.h.

Referenced by GetNextNode(), and SetNextNode().

Definition at line 47 of file InputPath.h.

Referenced by GetLastWord(), and GetPhrase().

Definition at line 46 of file InputPath.h.

Referenced by GetPrevPath().

Definition at line 48 of file InputPath.h.

Referenced by GetWordsRange().

std::vector<std::vector<const Word*> > Moses::InputPath::m_ruleSourceFromInputPath [mutable, protected]

Definition at line 56 of file InputPath.h.

Referenced by AddRuleSourceFromInputPath().

std::vector<bool> Moses::InputPath::m_sourceNonTermArray [protected]

Definition at line 58 of file InputPath.h.

Referenced by GetNonTerminalArray(), and InputPath().

Definition at line 57 of file InputPath.h.

Referenced by GetNonTerminalSet().

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

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