#include <GenerationDictionary.h>


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 OutputWordCollection * | FindWord (const Word &word) const |
| virtual bool | ComputeValueInTranslationOption () const |
Protected Attributes | |
| Collection | m_collection |
| std::string | m_filePath |
Definition at line 45 of file GenerationDictionary.h.
| Moses::GenerationDictionary::GenerationDictionary | ( | size_t | numFeatures, | |
| ScoreIndexManager & | scoreIndexManager, | |||
| const std::vector< FactorType > & | input, | |||
| const std::vector< FactorType > & | output | |||
| ) |
constructor.
| numFeatures | number of score components, as specified in ini file |
Definition at line 36 of file GenerationDictionary.cpp.
References Moses::ScoreIndexManager::AddScoreProducer().

| Moses::GenerationDictionary::~GenerationDictionary | ( | ) | [virtual] |
| 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().

| 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().

| 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 | |||
| ) |
load data file
Definition at line 44 of file GenerationDictionary.cpp.
References Moses::UserMessage::Add(), Moses::FactorCollection::AddFactor(), Moses::InputFileStream::Close(), Moses::FloorScore(), Moses::DecodeFeature::GetInput(), GetNumScoreComponents(), Moses::DecodeFeature::GetOutput(), Moses::FactorCollection::Instance(), m_collection, m_filePath, Moses::Word::SetFactor(), Moses::Tokenize(), and Moses::TransformScore().

Collection Moses::GenerationDictionary::m_collection [protected] |
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().
1.5.9