Moses::LanguageModelRandLM Class Reference

#include <Rand.h>

Inheritance diagram for Moses::LanguageModelRandLM:

Inheritance graph
[legend]
Collaboration diagram for Moses::LanguageModelRandLM:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LanguageModelRandLM (const std::string &line)
 ~LanguageModelRandLM ()
void Load (AllOptions::ptr const &opts)
 override to load model files
virtual LMResult GetValue (const std::vector< const Word * > &contextFactor, State *finalState=NULL) const
void InitializeForInput (ttasksptr const &ttask)
 Called before search and collecting of translation options.
void CleanUpAfterSentenceProcessing (const InputType &source)

Protected Member Functions

void CreateFactors (FactorCollection &factorCollection)
uint32_t GetLmID (const std::string &str) const
uint32_t GetLmID (const Factor *factor) const

Protected Attributes

std::vector< uint32_t > m_randlm_ids_vec
randlm::RandLM * m_lm
uint32_t m_oov_id


Detailed Description

Definition at line 36 of file Rand.h.


Constructor & Destructor Documentation

Moses::LanguageModelRandLM::LanguageModelRandLM ( const std::string &  line  ) 

Definition at line 44 of file Rand.cpp.

Moses::LanguageModelRandLM::~LanguageModelRandLM (  ) 

Definition at line 50 of file Rand.cpp.

References m_lm.


Member Function Documentation

void Moses::LanguageModelRandLM::CleanUpAfterSentenceProcessing ( const InputType source  )  [virtual]

Reimplemented from Moses::FeatureFunction.

Definition at line 141 of file Rand.cpp.

References m_lm.

void Moses::LanguageModelRandLM::CreateFactors ( FactorCollection factorCollection  )  [protected]

randlm::WordID Moses::LanguageModelRandLM::GetLmID ( const Factor factor  )  const [protected]

Definition at line 109 of file Rand.cpp.

References Moses::Factor::GetId(), m_oov_id, and m_randlm_ids_vec.

Here is the call graph for this function:

randlm::WordID Moses::LanguageModelRandLM::GetLmID ( const std::string &  str  )  const [protected]

Definition at line 104 of file Rand.cpp.

References m_lm.

virtual LMResult Moses::LanguageModelRandLM::GetValue ( const std::vector< const Word * > &  contextFactor,
State finalState = NULL 
) const [virtual]

void Moses::LanguageModelRandLM::InitializeForInput ( ttasksptr const &  ttask  )  [virtual]

Called before search and collecting of translation options.

Reimplemented from Moses::FeatureFunction.

Definition at line 137 of file Rand.cpp.

References m_lm.

void Moses::LanguageModelRandLM::Load ( AllOptions::ptr const &  opts  )  [virtual]

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 55 of file Rand.cpp.

References CreateFactors(), Moses::FactorCollection::Instance(), Moses::LanguageModelImplementation::m_filePath, m_lm, Moses::LanguageModelImplementation::m_nGramOrder, m_oov_id, NULL, and UTIL_THROW_IF2.

Here is the call graph for this function:


Member Data Documentation

randlm::RandLM* Moses::LanguageModelRandLM::m_lm [protected]

Definition at line 52 of file Rand.h.

Referenced by CreateFactors(), GetLmID(), and Load().

std::vector<uint32_t> Moses::LanguageModelRandLM::m_randlm_ids_vec [protected]

Definition at line 49 of file Rand.h.

Referenced by CreateFactors(), and GetLmID().


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:33:23 2017 for Moses by  doxygen 1.5.9