#include <MaxEntSRI.h>


Public Member Functions | |
| LanguageModelMaxEntSRI (const std::string &line) | |
| ~LanguageModelMaxEntSRI () | |
| void | Load (AllOptions::ptr const &opts) |
| override to load model files | |
| virtual LMResult | GetValue (const std::vector< const Word * > &contextFactor, State *finalState=0) const |
Protected Member Functions | |
| LMResult | GetValue (unsigned int wordId, unsigned int *context) const |
| void | CreateFactors () |
| unsigned int | GetLmID (const std::string &str) const |
| unsigned int | GetLmID (const Factor *factor) const |
Protected Attributes | |
| std::vector< unsigned int > | m_lmIdLookup |
| ::Vocab * | m_srilmVocab |
| MEModel * | m_srilmModel |
| unsigned int | m_unknownId |
Definition at line 41 of file MaxEntSRI.h.
| Moses::LanguageModelMaxEntSRI::LanguageModelMaxEntSRI | ( | const std::string & | line | ) |
Definition at line 55 of file MaxEntSRI.cpp.
References Moses::FeatureFunction::ReadParameters().

| Moses::LanguageModelMaxEntSRI::~LanguageModelMaxEntSRI | ( | ) |
| void Moses::LanguageModelMaxEntSRI::CreateFactors | ( | ) | [protected] |
Definition at line 84 of file MaxEntSRI.cpp.
References Moses::FactorCollection::AddFactor(), BOS_, EOS_, fill(), Moses::Factor::GetId(), GetLmID(), Moses::FactorCollection::Instance(), lmIdMap, Moses::LanguageModelSingleFactor::m_factorType, m_lmIdLookup, Moses::LanguageModelSingleFactor::m_sentenceEnd, Moses::LanguageModelImplementation::m_sentenceEndWord, Moses::LanguageModelSingleFactor::m_sentenceStart, Moses::LanguageModelImplementation::m_sentenceStartWord, m_srilmVocab, m_unknownId, NULL, Moses::Output, and str.
Referenced by Load().


| VocabIndex Moses::LanguageModelMaxEntSRI::GetLmID | ( | const Factor * | factor | ) | const [protected] |
Definition at line 130 of file MaxEntSRI.cpp.
References Moses::Factor::GetId(), m_lmIdLookup, and m_unknownId.

| VocabIndex Moses::LanguageModelMaxEntSRI::GetLmID | ( | const std::string & | str | ) | const [protected] |
Definition at line 126 of file MaxEntSRI.cpp.
References m_srilmVocab, and m_unknownId.
Referenced by CreateFactors().

| virtual LMResult Moses::LanguageModelMaxEntSRI::GetValue | ( | const std::vector< const Word * > & | contextFactor, | |
| State * | finalState = 0 | |||
| ) | const [virtual] |
Implements Moses::LanguageModelSingleFactor.
| LMResult Moses::LanguageModelMaxEntSRI::GetValue | ( | unsigned int | wordId, | |
| unsigned int * | context | |||
| ) | const [protected] |
| void Moses::LanguageModelMaxEntSRI::Load | ( | AllOptions::ptr const & | opts | ) | [virtual] |
override to load model files
Reimplemented from Moses::FeatureFunction.
Definition at line 69 of file MaxEntSRI.cpp.
References CreateFactors(), Moses::LanguageModelImplementation::m_filePath, Moses::LanguageModelImplementation::m_nGramOrder, m_srilmModel, m_srilmVocab, and m_unknownId.

std::vector<unsigned int> Moses::LanguageModelMaxEntSRI::m_lmIdLookup [protected] |
MEModel* Moses::LanguageModelMaxEntSRI::m_srilmModel [protected] |
::Vocab* Moses::LanguageModelMaxEntSRI::m_srilmVocab [protected] |
Definition at line 45 of file MaxEntSRI.h.
Referenced by CreateFactors(), GetLmID(), Load(), and ~LanguageModelMaxEntSRI().
unsigned int Moses::LanguageModelMaxEntSRI::m_unknownId [protected] |
1.5.9