Moses::PhraseDictionaryMemory Class Reference

#include <PhraseDictionaryMemory.h>

Inheritance diagram for Moses::PhraseDictionaryMemory:

Inheritance graph
[legend]
Collaboration diagram for Moses::PhraseDictionaryMemory:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseDictionaryMemory (const std::string &line)
const PhraseDictionaryNodeMemoryGetRootNode () const
ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &, std::size_t)
 Create a sentence-specific manager for SCFG rule lookup.
TargetPhraseCollection::shared_ptr GetTargetPhraseCollectionLEGACY (const Phrase &src) const
 find list of translations that can translates src. Only for phrase input
void GetTargetPhraseCollectionBatch (const InputPathList &inputPathQueue) const
 TO_STRING ()

Protected Member Functions

 PhraseDictionaryMemory (int type, const std::string &line)
TargetPhraseCollection::shared_ptr GetOrCreateTargetPhraseCollection (const Phrase &source, const TargetPhrase &target, const Word *sourceLHS)
PhraseDictionaryNodeMemoryGetOrCreateNode (const Phrase &source, const TargetPhrase &target, const Word *sourceLHS)
void SortAndPrune ()

Protected Attributes

PhraseDictionaryNodeMemory m_collection

Friends

class RuleTableLoader
std::ostream & operator<< (std::ostream &, const PhraseDictionaryMemory &)


Detailed Description

Implementation of a in-memory rule table in a trie. Looking up a rule of length n symbols requires n look-ups to find the TargetPhraseCollection.

Definition at line 35 of file PhraseDictionaryMemory.h.


Constructor & Destructor Documentation

Moses::PhraseDictionaryMemory::PhraseDictionaryMemory ( int  type,
const std::string &  line 
) [inline, protected]

Definition at line 41 of file PhraseDictionaryMemory.h.

Moses::PhraseDictionaryMemory::PhraseDictionaryMemory ( const std::string &  line  ) 

Definition at line 42 of file PhraseDictionaryMemory.cpp.

References Moses::PhraseDictionary::m_maxCacheSize, and Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

ChartRuleLookupManager * Moses::PhraseDictionaryMemory::CreateRuleLookupManager ( const ChartParser ,
const ChartCellCollectionBase ,
std::size_t   
) [virtual]

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

Definition at line 127 of file PhraseDictionaryMemory.cpp.

PhraseDictionaryNodeMemory & Moses::PhraseDictionaryMemory::GetOrCreateNode ( const Phrase source,
const TargetPhrase target,
const Word sourceLHS 
) [protected]

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryMemory::GetOrCreateTargetPhraseCollection ( const Phrase source,
const TargetPhrase target,
const Word sourceLHS 
) [protected, virtual]

Implements Moses::RuleTableTrie.

Definition at line 54 of file PhraseDictionaryMemory.cpp.

References GetOrCreateNode(), and Moses::PhraseDictionaryNodeMemory::GetTargetPhraseCollection().

Here is the call graph for this function:

const PhraseDictionaryNodeMemory& Moses::PhraseDictionaryMemory::GetRootNode (  )  const [inline]

Definition at line 48 of file PhraseDictionaryMemory.h.

References m_collection.

Referenced by Moses::ChartRuleLookupManagerMemory::GetChartRuleCollection(), and GetTargetPhraseCollectionBatch().

Here is the caller graph for this function:

void Moses::PhraseDictionaryMemory::GetTargetPhraseCollectionBatch ( const InputPathList inputPathQueue  )  const [virtual]

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryMemory::GetTargetPhraseCollectionLEGACY ( const Phrase src  )  const [virtual]

find list of translations that can translates src. Only for phrase input

Reimplemented from Moses::PhraseDictionary.

Definition at line 64 of file PhraseDictionaryMemory.cpp.

References Moses::PhraseDictionaryNodeMemory::GetChild(), Moses::Phrase::GetSize(), Moses::PhraseDictionaryNodeMemory::GetTargetPhraseCollection(), Moses::Phrase::GetWord(), m_collection, Moses::DecodeFeature::m_inputFactors, NULL, and Moses::Phrase::OnlyTheseFactors().

Here is the call graph for this function:

void Moses::PhraseDictionaryMemory::SortAndPrune (  )  [protected, virtual]

Implements Moses::RuleTableTrie.

Definition at line 135 of file PhraseDictionaryMemory.cpp.

References Moses::PhraseDictionary::GetTableLimit(), m_collection, and Moses::PhraseDictionaryNodeMemory::Sort().

Here is the call graph for this function:

Moses::PhraseDictionaryMemory::TO_STRING (  ) 


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const PhraseDictionaryMemory  
) [friend]

friend class RuleTableLoader [friend]

Reimplemented from Moses::RuleTableTrie.

Definition at line 38 of file PhraseDictionaryMemory.h.


Member Data Documentation


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

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