#include <SRI.h>


Public Member Functions | |
| LanguageModelSRI () | |
| ~LanguageModelSRI () | |
| bool | Load (const std::string &filePath, FactorType factorType, size_t nGramOrder) |
| 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 |
| Ngram * | m_srilmModel |
| unsigned int | m_unknownId |
Definition at line 39 of file SRI.h.
| Moses::LanguageModelSRI::~LanguageModelSRI | ( | ) |
| void Moses::LanguageModelSRI::CreateFactors | ( | ) | [protected] |
Definition at line 75 of file SRI.cpp.
References Moses::FactorCollection::AddFactor(), BOS_, EOS_, Moses::Factor::GetId(), GetLmID(), Moses::FactorCollection::Instance(), lmIdMap, Moses::LanguageModelSingleFactor::m_factorType, m_lmIdLookup, Moses::LanguageModelSingleFactor::m_sentenceEnd, Moses::LanguageModelImplementation::m_sentenceEndArray, Moses::LanguageModelSingleFactor::m_sentenceStart, Moses::LanguageModelImplementation::m_sentenceStartArray, m_srilmVocab, m_unknownId, NULL, and Moses::Output.
Referenced by Load().


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

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

| virtual LMResult Moses::LanguageModelSRI::GetValue | ( | const std::vector< const Word * > & | contextFactor, | |
| State * | finalState = 0 | |||
| ) | const [virtual] |
Implements Moses::LanguageModelPointerState.
| LMResult Moses::LanguageModelSRI::GetValue | ( | unsigned int | wordId, | |
| unsigned int * | context | |||
| ) | const [protected] |
| bool Moses::LanguageModelSRI::Load | ( | const std::string & | filePath, | |
| FactorType | factorType, | |||
| size_t | nGramOrder | |||
| ) | [virtual] |
Implements Moses::LanguageModelSingleFactor.
Definition at line 53 of file SRI.cpp.
References CreateFactors(), Moses::LanguageModelSingleFactor::m_factorType, Moses::LanguageModelImplementation::m_filePath, Moses::LanguageModelImplementation::m_nGramOrder, m_srilmModel, m_srilmVocab, and m_unknownId.

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