Moses::LanguageModelMaxEntSRI Class Reference

#include <MaxEntSRI.h>

Inheritance diagram for Moses::LanguageModelMaxEntSRI:

Inheritance graph
Collaboration diagram for Moses::LanguageModelMaxEntSRI:

Collaboration graph

List of all members.

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

Detailed Description

Implementation of maximum entropy LM using SRILM's code.

Definition at line 41 of file MaxEntSRI.h.

Constructor & Destructor Documentation

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

Definition at line 55 of file MaxEntSRI.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

Moses::LanguageModelMaxEntSRI::~LanguageModelMaxEntSRI (  ) 

Definition at line 63 of file MaxEntSRI.cpp.

References m_srilmModel, and m_srilmVocab.

Member Function Documentation

void Moses::LanguageModelMaxEntSRI::CreateFactors (  )  [protected]

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.

Here is the call graph for this function:

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().

Here is the caller graph for this function:

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

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.

Here is the call graph for this function:

Member Data Documentation

std::vector<unsigned int> Moses::LanguageModelMaxEntSRI::m_lmIdLookup [protected]

Definition at line 44 of file MaxEntSRI.h.

Referenced by CreateFactors(), and GetLmID().

Definition at line 46 of file MaxEntSRI.h.

Referenced by Load(), and ~LanguageModelMaxEntSRI().

Definition at line 45 of file MaxEntSRI.h.

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

Definition at line 47 of file MaxEntSRI.h.

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

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

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