Moses::PhraseDictionarySCFG Class Reference

#include <PhraseDictionarySCFG.h>

Inheritance diagram for Moses::PhraseDictionarySCFG:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseDictionarySCFG (const std::string &line)
const PhraseDictionaryNodeSCFGGetRootNode () const
ChartRuleLookupManagerCreateRuleLookupManager (const InputType &, const ChartCellCollectionBase &)
 Create a sentence-specific manager for SCFG rule lookup.
 TO_STRING ()

Protected Member Functions

 PhraseDictionarySCFG (const std::string &description, const std::string &line)
TargetPhraseCollectionGetOrCreateTargetPhraseCollection (const Phrase &source, const TargetPhrase &target, const Word *sourceLHS)
const TargetPhraseCollectionGetTargetPhraseCollection (const Phrase &source) const
 find list of translations that can translates src. Only for phrase input
PhraseDictionaryNodeSCFGGetOrCreateNode (const Phrase &source, const TargetPhrase &target, const Word *sourceLHS)
void SortAndPrune ()

Protected Attributes

PhraseDictionaryNodeSCFG m_collection

Friends

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


Detailed Description

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

Definition at line 34 of file PhraseDictionarySCFG.h.


Constructor & Destructor Documentation

Moses::PhraseDictionarySCFG::PhraseDictionarySCFG ( const std::string &  description,
const std::string &  line 
) [inline, protected]

Definition at line 40 of file PhraseDictionarySCFG.h.

Moses::PhraseDictionarySCFG::PhraseDictionarySCFG ( const std::string &  line  )  [inline]

Definition at line 45 of file PhraseDictionarySCFG.h.


Member Function Documentation

ChartRuleLookupManager * Moses::PhraseDictionarySCFG::CreateRuleLookupManager ( const InputType ,
const ChartCellCollectionBase  
) [virtual]

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

Definition at line 114 of file PhraseDictionarySCFG.cpp.

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

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

Implements Moses::RuleTableTrie.

Definition at line 43 of file PhraseDictionarySCFG.cpp.

References GetOrCreateNode(), and Moses::PhraseDictionaryNodeSCFG::GetOrCreateTargetPhraseCollection().

Here is the call graph for this function:

const PhraseDictionaryNodeSCFG& Moses::PhraseDictionarySCFG::GetRootNode (  )  const [inline]

Definition at line 49 of file PhraseDictionarySCFG.h.

References m_collection.

Referenced by Moses::ChartRuleLookupManagerMemory::ChartRuleLookupManagerMemory().

Here is the caller graph for this function:

const TargetPhraseCollection * Moses::PhraseDictionarySCFG::GetTargetPhraseCollection ( const Phrase src  )  const [protected, virtual]

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

Reimplemented from Moses::RuleTableTrie.

Definition at line 52 of file PhraseDictionarySCFG.cpp.

References Moses::PhraseDictionaryNodeSCFG::GetChild(), Moses::Phrase::GetSize(), Moses::PhraseDictionaryNodeSCFG::GetTargetPhraseCollection(), Moses::Phrase::GetWord(), m_collection, and NULL.

Here is the call graph for this function:

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

Implements Moses::RuleTableTrie.

Definition at line 121 of file PhraseDictionarySCFG.cpp.

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

Here is the call graph for this function:

Moses::PhraseDictionarySCFG::TO_STRING (  ) 


Friends And Related Function Documentation

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

friend class RuleTableLoader [friend]

Reimplemented from Moses::RuleTableTrie.

Definition at line 37 of file PhraseDictionarySCFG.h.


Member Data Documentation


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

Generated on Fri May 24 00:32:30 2013 for Moses by  doxygen 1.5.9