#include <PhraseDictionarySCFG.h>
Public Member Functions | |
PhraseDictionarySCFG (const std::string &line) | |
const PhraseDictionaryNodeSCFG & | GetRootNode () const |
ChartRuleLookupManager * | CreateRuleLookupManager (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) | |
TargetPhraseCollection & | GetOrCreateTargetPhraseCollection (const Phrase &source, const TargetPhrase &target, const Word *sourceLHS) |
const TargetPhraseCollection * | GetTargetPhraseCollection (const Phrase &source) const |
find list of translations that can translates src. Only for phrase input | |
PhraseDictionaryNodeSCFG & | GetOrCreateNode (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 &) |
Definition at line 34 of file PhraseDictionarySCFG.h.
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.
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] |
Definition at line 75 of file PhraseDictionarySCFG.cpp.
References Moses::AlignmentInfo::begin(), CHECK, Moses::AlignmentInfo::end(), Moses::TargetPhrase::GetAlignNonTerm(), Moses::PhraseDictionaryNodeSCFG::GetOrCreateChild(), Moses::Phrase::GetSize(), Moses::Phrase::GetWord(), Moses::Word::IsNonTerminal(), m_collection, and NULL.
Referenced by GetOrCreateTargetPhraseCollection().
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().
const PhraseDictionaryNodeSCFG& Moses::PhraseDictionarySCFG::GetRootNode | ( | ) | const [inline] |
Definition at line 49 of file PhraseDictionarySCFG.h.
References m_collection.
Referenced by Moses::ChartRuleLookupManagerMemory::ChartRuleLookupManagerMemory().
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.
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().
Moses::PhraseDictionarySCFG::TO_STRING | ( | ) |
std::ostream& operator<< | ( | std::ostream & | , | |
const PhraseDictionarySCFG & | ||||
) | [friend] |
friend class RuleTableLoader [friend] |
Definition at line 68 of file PhraseDictionarySCFG.h.
Referenced by GetOrCreateNode(), GetRootNode(), GetTargetPhraseCollection(), Moses::PhraseDictionaryALSuffixArray::InitializeForInput(), Moses::operator<<(), and SortAndPrune().