Moses::PhraseDictionaryGroup Class Reference

#include <PhraseDictionaryGroup.h>

Inheritance diagram for Moses::PhraseDictionaryGroup:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseDictionaryGroup (const std::string &line)
void Load (AllOptions::ptr const &opts)
 override to load model files
TargetPhraseCollection::shared_ptr CreateTargetPhraseCollection (const ttasksptr &ttask, const Phrase &src) const
std::vector< std::vector< float > > getWeights (size_t numWeights, bool normalize) const
void CacheForCleanup (TargetPhraseCollection::shared_ptr tpc)
void CleanUpAfterSentenceProcessing (const InputType &source)
void CleanUpComponentModels (const InputType &source)
void GetTargetPhraseCollectionBatch (const ttasksptr &ttask, const InputPathList &inputPathQueue) const
TargetPhraseCollection::shared_ptr GetTargetPhraseCollectionLEGACY (const Phrase &src) const
 find list of translations that can translates src. Only for phrase input
TargetPhraseCollection::shared_ptr GetTargetPhraseCollectionLEGACY (const ttasksptr &ttask, const Phrase &src) const
void InitializeForInput (ttasksptr const &ttask)
 Create entry for translation of source to targetPhrase.
ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &, std::size_t)
 Create a sentence-specific manager for SCFG rule lookup.
void SetParameter (const std::string &key, const std::string &value)

Protected Types

typedef std::vector
< TargetPhraseCollection::shared_ptr
PhraseCache
typedef PhraseCache SentenceCache

Protected Member Functions

PhraseCacheGetPhraseCache ()

Protected Attributes

std::vector< std::string > m_memberPDStrs
std::vector< PhraseDictionary * > m_memberPDs
std::vector< FeatureFunction * > m_pdFeature
size_t m_numModels
size_t m_totalModelScores
boost::dynamic_bitset m_seenByAll
bool m_phraseCounts
bool m_wordCounts
bool m_modelBitmapCounts
bool m_restrict
bool m_haveDefaultScores
std::vector< float > m_defaultScores
bool m_defaultAverageOthers
size_t m_scoresPerModel
bool m_haveMmsaptLrFunc
std::vector< LexicalReordering ** > m_mmsaptLrFuncs
SentenceCache m_sentenceCache


Detailed Description

Combines multiple phrase tables into a single interface. Each member phrase table scores each phrase and a single set of translations/scores is returned. If a phrase is not in one of the tables, its scores are zero-filled unless otherwise specified. See model combination section of Moses advanced feature documentation.

Definition at line 61 of file PhraseDictionaryGroup.h.


Member Typedef Documentation

Definition at line 113 of file PhraseDictionaryGroup.h.

Definition at line 118 of file PhraseDictionaryGroup.h.


Constructor & Destructor Documentation

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


Member Function Documentation

void Moses::PhraseDictionaryGroup::CacheForCleanup ( TargetPhraseCollection::shared_ptr  tpc  ) 

Definition at line 378 of file PhraseDictionaryGroup.cpp.

References GetPhraseCache().

Referenced by GetTargetPhraseCollectionLEGACY().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from Moses::PhraseDictionary.

Definition at line 386 of file PhraseDictionaryGroup.cpp.

References CleanUpComponentModels(), and GetPhraseCache().

Here is the call graph for this function:

void Moses::PhraseDictionaryGroup::CleanUpComponentModels ( const InputType source  ) 

Definition at line 392 of file PhraseDictionaryGroup.cpp.

References m_memberPDs, and m_numModels.

Referenced by CleanUpAfterSentenceProcessing().

Here is the caller graph for this function:

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

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryGroup::CreateTargetPhraseCollection ( const ttasksptr ttask,
const Phrase src 
) const

PhraseCache& Moses::PhraseDictionaryGroup::GetPhraseCache (  )  [inline, protected]

Definition at line 122 of file PhraseDictionaryGroup.h.

References get_id(), and m_sentenceCache.

Referenced by CacheForCleanup(), and CleanUpAfterSentenceProcessing().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::PhraseDictionaryGroup::GetTargetPhraseCollectionBatch ( const ttasksptr ttask,
const InputPathList inputPathQueue 
) const [virtual]

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryGroup::GetTargetPhraseCollectionLEGACY ( const ttasksptr ttask,
const Phrase src 
) const [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 172 of file PhraseDictionaryGroup.cpp.

References CacheForCleanup(), CreateTargetPhraseCollection(), and Moses::PhraseDictionary::m_tableLimit.

Here is the call graph for this function:

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryGroup::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 164 of file PhraseDictionaryGroup.cpp.

References UTIL_THROW2.

Referenced by GetTargetPhraseCollectionBatch().

Here is the caller graph for this function:

std::vector<std::vector<float> > Moses::PhraseDictionaryGroup::getWeights ( size_t  numWeights,
bool  normalize 
) const

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

Create entry for translation of source to targetPhrase.

Reimplemented from Moses::PhraseDictionary.

Definition at line 140 of file PhraseDictionaryGroup.cpp.

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

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

Reimplemented from Moses::PhraseDictionary.


Member Data Documentation

Definition at line 106 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

std::vector<float> Moses::PhraseDictionaryGroup::m_defaultScores [protected]

Definition at line 104 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

Definition at line 103 of file PhraseDictionaryGroup.h.

Referenced by Load().

Definition at line 109 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

std::vector<std::string> Moses::PhraseDictionaryGroup::m_memberPDStrs [protected]

Definition at line 88 of file PhraseDictionaryGroup.h.

Referenced by Load().

Definition at line 111 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

Definition at line 99 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

Definition at line 90 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

Definition at line 95 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

Definition at line 101 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection().

Definition at line 107 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

boost::dynamic_bitset Moses::PhraseDictionaryGroup::m_seenByAll [protected]

Definition at line 93 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection().

Definition at line 120 of file PhraseDictionaryGroup.h.

Referenced by GetPhraseCache().

Definition at line 92 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().

Definition at line 97 of file PhraseDictionaryGroup.h.

Referenced by CreateTargetPhraseCollection(), and Load().


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