Moses::GenerationDictionary Class Reference

#include <GenerationDictionary.h>

Inheritance diagram for Moses::GenerationDictionary:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GenerationDictionary (size_t numFeatures, ScoreIndexManager &scoreIndexManager, const std::vector< FactorType > &input, const std::vector< FactorType > &output)
virtual ~GenerationDictionary ()
DecodeType GetDecodeType () const
 returns whether this dictionary is to be used for Translate or Generate
bool Load (const std::string &filePath, FactorDirection direction)
 load data file
size_t GetNumScoreComponents () const
std::string GetScoreProducerDescription (unsigned) const
 returns a string description of this producer
std::string GetScoreProducerWeightShortName (unsigned) const
 returns the weight parameter name of this producer (used in n-best list)
size_t GetSize () const
const OutputWordCollectionFindWord (const Word &word) const
virtual bool ComputeValueInTranslationOption () const

Protected Attributes

Collection m_collection
std::string m_filePath


Detailed Description

Implementation of a generation table in a trie.

Definition at line 45 of file GenerationDictionary.h.


Constructor & Destructor Documentation

Moses::GenerationDictionary::GenerationDictionary ( size_t  numFeatures,
ScoreIndexManager scoreIndexManager,
const std::vector< FactorType > &  input,
const std::vector< FactorType > &  output 
)

constructor.

Parameters:
numFeatures number of score components, as specified in ini file

Definition at line 36 of file GenerationDictionary.cpp.

References Moses::ScoreIndexManager::AddScoreProducer().

Here is the call graph for this function:

Moses::GenerationDictionary::~GenerationDictionary (  )  [virtual]

Definition at line 113 of file GenerationDictionary.cpp.

References m_collection.


Member Function Documentation

bool Moses::GenerationDictionary::ComputeValueInTranslationOption (  )  const [virtual]

Reimplemented from Moses::StatelessFeatureFunction.

Definition at line 151 of file GenerationDictionary.cpp.

const OutputWordCollection * Moses::GenerationDictionary::FindWord ( const Word word  )  const

returns a bag of output words, OutputWordCollection, for a particular input word. Or NULL if the input word isn't found. The search function used is the WordComparer functor

Definition at line 137 of file GenerationDictionary.cpp.

References m_collection, and NULL.

Referenced by Moses::DecodeStepGeneration::Process().

Here is the caller graph for this function:

DecodeType Moses::GenerationDictionary::GetDecodeType (  )  const [inline, virtual]

returns whether this dictionary is to be used for Translate or Generate

Implements Moses::Dictionary.

Definition at line 66 of file GenerationDictionary.h.

References Moses::Generate.

size_t Moses::GenerationDictionary::GetNumScoreComponents (  )  const [virtual]

returns the number of scores that a subclass produces. For example, a language model conventionally produces 1, a translation table some arbitrary number, etc

Implements Moses::ScoreProducer.

Definition at line 121 of file GenerationDictionary.cpp.

References Moses::Dictionary::m_numScoreComponent.

Referenced by Load().

Here is the caller graph for this function:

std::string Moses::GenerationDictionary::GetScoreProducerDescription ( unsigned  idx  )  const [virtual]

returns a string description of this producer

Implements Moses::ScoreProducer.

Definition at line 126 of file GenerationDictionary.cpp.

References m_filePath.

std::string Moses::GenerationDictionary::GetScoreProducerWeightShortName ( unsigned  idx  )  const [virtual]

returns the weight parameter name of this producer (used in n-best list)

Implements Moses::ScoreProducer.

Definition at line 131 of file GenerationDictionary.cpp.

size_t Moses::GenerationDictionary::GetSize (  )  const [inline]

number of unique input entries in the generation table. NOT the number of lines in the generation table

Definition at line 80 of file GenerationDictionary.h.

References m_collection.

bool Moses::GenerationDictionary::Load ( const std::string &  filePath,
FactorDirection  direction 
)


Member Data Documentation

Definition at line 49 of file GenerationDictionary.h.

Referenced by FindWord(), GetSize(), Load(), and ~GenerationDictionary().

std::string Moses::GenerationDictionary::m_filePath [protected]

Definition at line 52 of file GenerationDictionary.h.

Referenced by GetScoreProducerDescription(), and Load().


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

Generated on Wed Feb 8 23:04:10 2012 for Moses by  doxygen 1.5.9