Moses::PhraseDictionaryFuzzyMatch Class Reference

#include <PhraseDictionaryFuzzyMatch.h>

Inheritance diagram for Moses::PhraseDictionaryFuzzyMatch:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseDictionaryFuzzyMatch (const std::string &line)
 ~PhraseDictionaryFuzzyMatch ()
void Load (AllOptions::ptr const &opts)
 override to load model files
const PhraseDictionaryNodeMemoryGetRootNode (long translationId) const
ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &parser, const ChartCellCollectionBase &, std::size_t)
 Create a sentence-specific manager for SCFG rule lookup.
void InitializeForInput (ttasksptr const &ttask)
 Create entry for translation of source to targetPhrase.
void CleanUpAfterSentenceProcessing (const InputType &source)
void SetParameter (const std::string &key, const std::string &value)
 TO_STRING ()

Protected Member Functions

TargetPhraseCollection::shared_ptr GetOrCreateTargetPhraseCollection (PhraseDictionaryNodeMemory &rootNode, const Phrase &source, const TargetPhrase &target, const Word *sourceLHS)
PhraseDictionaryNodeMemoryGetOrCreateNode (PhraseDictionaryNodeMemory &rootNode, const Phrase &source, const TargetPhrase &target, const Word *sourceLHS)
void SortAndPrune (PhraseDictionaryNodeMemory &rootNode)
PhraseDictionaryNodeMemoryGetRootNode (const InputType &source)

Protected Attributes

std::map< long,
PhraseDictionaryNodeMemory
m_collection
std::vector< std::string > m_config
tmmt::FuzzyMatchWrapperm_FuzzyMatchWrapper

Friends

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


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 39 of file PhraseDictionaryFuzzyMatch.h.


Constructor & Destructor Documentation

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

Definition at line 83 of file PhraseDictionaryFuzzyMatch.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

Moses::PhraseDictionaryFuzzyMatch::~PhraseDictionaryFuzzyMatch (  ) 

Definition at line 91 of file PhraseDictionaryFuzzyMatch.cpp.

References m_FuzzyMatchWrapper.


Member Function Documentation

void Moses::PhraseDictionaryFuzzyMatch::CleanUpAfterSentenceProcessing ( const InputType source  )  [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 373 of file PhraseDictionaryFuzzyMatch.cpp.

References Moses::InputType::GetTranslationId(), and m_collection.

Here is the call graph for this function:

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

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

Definition at line 104 of file PhraseDictionaryFuzzyMatch.cpp.

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

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryFuzzyMatch::GetOrCreateTargetPhraseCollection ( PhraseDictionaryNodeMemory rootNode,
const Phrase source,
const TargetPhrase target,
const Word sourceLHS 
) [protected]

Definition at line 309 of file PhraseDictionaryFuzzyMatch.cpp.

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

Referenced by InitializeForInput().

Here is the call graph for this function:

Here is the caller graph for this function:

PhraseDictionaryNodeMemory & Moses::PhraseDictionaryFuzzyMatch::GetRootNode ( const InputType source  )  [protected]

Definition at line 385 of file PhraseDictionaryFuzzyMatch.cpp.

References Moses::InputType::GetTranslationId(), m_collection, and UTIL_THROW_IF2.

Here is the call graph for this function:

const PhraseDictionaryNodeMemory & Moses::PhraseDictionaryFuzzyMatch::GetRootNode ( long  translationId  )  const

Definition at line 378 of file PhraseDictionaryFuzzyMatch.cpp.

References m_collection, and UTIL_THROW_IF2.

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

Here is the caller graph for this function:

void Moses::PhraseDictionaryFuzzyMatch::InitializeForInput ( ttasksptr const &  ttask  )  [virtual]

void Moses::PhraseDictionaryFuzzyMatch::Load ( AllOptions::ptr const &  opts  )  [virtual]

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 96 of file PhraseDictionaryFuzzyMatch.cpp.

References m_config, m_FuzzyMatchWrapper, Moses::FeatureFunction::m_options, and Moses::PhraseDictionary::SetFeaturesToApply().

Here is the call graph for this function:

void Moses::PhraseDictionaryFuzzyMatch::SetParameter ( const std::string &  key,
const std::string &  value 
) [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 114 of file PhraseDictionaryFuzzyMatch.cpp.

References m_config.

void Moses::PhraseDictionaryFuzzyMatch::SortAndPrune ( PhraseDictionaryNodeMemory rootNode  )  [protected]

Definition at line 366 of file PhraseDictionaryFuzzyMatch.cpp.

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

Referenced by InitializeForInput().

Here is the call graph for this function:

Here is the caller graph for this function:

Moses::PhraseDictionaryFuzzyMatch::TO_STRING (  ) 


Friends And Related Function Documentation

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

friend class RuleTableLoader [friend]

Definition at line 42 of file PhraseDictionaryFuzzyMatch.h.


Member Data Documentation

std::vector<std::string> Moses::PhraseDictionaryFuzzyMatch::m_config [protected]

Definition at line 78 of file PhraseDictionaryFuzzyMatch.h.

Referenced by Load(), and SetParameter().


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

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