#include <LanguageModelRandLM.h>


Public Member Functions | |
| LanguageModelRandLM () | |
| bool | Load (const std::string &filePath, FactorType factorType, size_t nGramOrder) |
| virtual LMResult | GetValue (const std::vector< const Word * > &contextFactor, State *finalState=NULL) const |
| ~LanguageModelRandLM () | |
| void | CleanUpAfterSentenceProcessing () |
| void | InitializeBeforeSentenceProcessing () |
| overrideable funtions for IRST LM to cleanup. Maybe something to do with on demand/cache loading/unloading | |
Protected Member Functions | |
| void | CreateFactors (FactorCollection &factorCollection) |
| randlm::WordID | GetLmID (const std::string &str) const |
| randlm::WordID | GetLmID (const Factor *factor) const |
Protected Attributes | |
| std::vector< randlm::WordID > | m_randlm_ids_vec |
| randlm::RandLM * | m_lm |
| randlm::WordID | m_oov_id |
Definition at line 39 of file LanguageModelRandLM.h.
| Moses::LanguageModelRandLM::LanguageModelRandLM | ( | ) | [inline] |
Definition at line 42 of file LanguageModelRandLM.h.
| Moses::LanguageModelRandLM::~LanguageModelRandLM | ( | ) | [inline] |
| void Moses::LanguageModelRandLM::CleanUpAfterSentenceProcessing | ( | ) | [inline, virtual] |
Reimplemented from Moses::LanguageModelImplementation.
Definition at line 49 of file LanguageModelRandLM.h.
References m_lm.
| void Moses::LanguageModelRandLM::CreateFactors | ( | FactorCollection & | factorCollection | ) | [protected] |
Definition at line 53 of file LanguageModelRandLM.cpp.
References Moses::FactorCollection::AddFactor(), Moses::Factor::GetId(), Moses::LanguageModelSingleFactor::m_factorType, m_lm, m_oov_id, m_randlm_ids_vec, Moses::LanguageModelSingleFactor::m_sentenceEnd, Moses::LanguageModelImplementation::m_sentenceEndArray, Moses::LanguageModelSingleFactor::m_sentenceStart, Moses::LanguageModelImplementation::m_sentenceStartArray, and Moses::Output.
Referenced by Load().


| randlm::WordID Moses::LanguageModelRandLM::GetLmID | ( | const Factor * | factor | ) | const [inline, protected] |
Definition at line 62 of file LanguageModelRandLM.h.
References Moses::Factor::GetId(), m_oov_id, and m_randlm_ids_vec.

| randlm::WordID Moses::LanguageModelRandLM::GetLmID | ( | const std::string & | str | ) | const [protected] |
| virtual LMResult Moses::LanguageModelRandLM::GetValue | ( | const std::vector< const Word * > & | contextFactor, | |
| State * | finalState = NULL | |||
| ) | const [virtual] |
Implements Moses::LanguageModelPointerState.
| void Moses::LanguageModelRandLM::InitializeBeforeSentenceProcessing | ( | ) | [inline, virtual] |
overrideable funtions for IRST LM to cleanup. Maybe something to do with on demand/cache loading/unloading
Reimplemented from Moses::LanguageModelImplementation.
Definition at line 52 of file LanguageModelRandLM.h.
References m_lm.
| bool Moses::LanguageModelRandLM::Load | ( | const std::string & | filePath, | |
| FactorType | factorType, | |||
| size_t | nGramOrder | |||
| ) | [virtual] |
Implements Moses::LanguageModelSingleFactor.
Definition at line 35 of file LanguageModelRandLM.cpp.
References CreateFactors(), Moses::FactorCollection::Instance(), Moses::LanguageModelSingleFactor::m_factorType, Moses::LanguageModelImplementation::m_filePath, m_lm, Moses::LanguageModelImplementation::m_nGramOrder, and m_oov_id.

randlm::RandLM* Moses::LanguageModelRandLM::m_lm [protected] |
Definition at line 58 of file LanguageModelRandLM.h.
Referenced by CleanUpAfterSentenceProcessing(), CreateFactors(), GetLmID(), InitializeBeforeSentenceProcessing(), Load(), and ~LanguageModelRandLM().
randlm::WordID Moses::LanguageModelRandLM::m_oov_id [protected] |
Definition at line 59 of file LanguageModelRandLM.h.
Referenced by CreateFactors(), GetLmID(), and Load().
std::vector<randlm::WordID> Moses::LanguageModelRandLM::m_randlm_ids_vec [protected] |
1.5.9