#include <ORLM.h>


Public Types | |
| typedef count_t | T |
Public Member Functions | |
| LanguageModelORLM (const std::string &line) | |
| bool | Load (const std::string &filePath, FactorType factorType, size_t nGramOrder) |
| virtual LMResult | GetValue (const std::vector< const Word * > &contextFactor, State *finalState=NULL) const |
| ~LanguageModelORLM () | |
| void | CleanUpAfterSentenceProcessing () |
| bool | UpdateORLM (const std::vector< std::string > &ngram, const int value) |
Protected Member Functions | |
| void | CreateFactors () |
| wordID_t | GetLmID (const std::string &str) const |
| wordID_t | GetLmID (const Factor *factor) const |
Protected Attributes | |
| OnlineRLM< T > * | m_lm |
| wordID_t | m_oov_id |
| std::vector< wordID_t > | lm_ids_vec_ |
Definition at line 20 of file ORLM.h.
| typedef count_t Moses::LanguageModelORLM::T |
| Moses::LanguageModelORLM::LanguageModelORLM | ( | const std::string & | line | ) | [inline] |
| Moses::LanguageModelORLM::~LanguageModelORLM | ( | ) | [inline] |
Definition at line 30 of file ORLM.h.
References Moses::LanguageModelImplementation::m_filePath, m_lm, and Utils::rtrim().

| void Moses::LanguageModelORLM::CleanUpAfterSentenceProcessing | ( | ) | [inline] |
| void Moses::LanguageModelORLM::CreateFactors | ( | ) | [protected] |
Definition at line 31 of file ORLM.cpp.
References Moses::FactorCollection::AddFactor(), fill(), Moses::Factor::GetId(), Moses::FactorCollection::Instance(), lm_ids_vec_, Moses::LanguageModelSingleFactor::m_factorType, m_lm, m_oov_id, Moses::LanguageModelSingleFactor::m_sentenceEnd, Moses::LanguageModelImplementation::m_sentenceEndWord, Moses::LanguageModelSingleFactor::m_sentenceStart, Moses::LanguageModelImplementation::m_sentenceStartWord, and Moses::Output.
Referenced by Load().


Definition at line 68 of file ORLM.cpp.
References Moses::Factor::GetId(), lm_ids_vec_, and m_oov_id.

| wordID_t Moses::LanguageModelORLM::GetLmID | ( | const std::string & | str | ) | const [protected] |
Definition at line 64 of file ORLM.cpp.
References m_lm.
Referenced by GetValue().

| LMResult Moses::LanguageModelORLM::GetValue | ( | const std::vector< const Word * > & | contextFactor, | |
| State * | finalState = NULL | |||
| ) | const [virtual] |
Implements Moses::LanguageModelSingleFactor.
Definition at line 73 of file ORLM.cpp.
References count, Moses::FloorScore(), Moses::LanguageModelSingleFactor::GetFactorType(), GetLmID(), m_lm, m_oov_id, MAX_NGRAM_SIZE, Moses::LMResult::score, Moses::TransformLMScore(), and Moses::LMResult::unknown.

| bool Moses::LanguageModelORLM::Load | ( | const std::string & | filePath, | |
| FactorType | factorType, | |||
| size_t | nGramOrder | |||
| ) |
Definition at line 15 of file ORLM.cpp.
References CreateFactors(), Moses::LanguageModelSingleFactor::m_factorType, Moses::LanguageModelImplementation::m_filePath, m_lm, Moses::LanguageModelImplementation::m_nGramOrder, and m_oov_id.

| bool Moses::LanguageModelORLM::UpdateORLM | ( | const std::vector< std::string > & | ngram, | |
| const int | value | |||
| ) |
std::vector<wordID_t> Moses::LanguageModelORLM::lm_ids_vec_ [protected] |
OnlineRLM<T>* Moses::LanguageModelORLM::m_lm [protected] |
Definition at line 44 of file ORLM.h.
Referenced by CleanUpAfterSentenceProcessing(), CreateFactors(), GetLmID(), GetValue(), Load(), and ~LanguageModelORLM().
wordID_t Moses::LanguageModelORLM::m_oov_id [protected] |
Definition at line 46 of file ORLM.h.
Referenced by CreateFactors(), GetLmID(), GetValue(), and Load().
1.5.9