Moses::LanguageModelSRI Class Reference

#include <SRI.h>

Inheritance diagram for Moses::LanguageModelSRI:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LanguageModelSRI (const std::string &line)
 ~LanguageModelSRI ()
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
Ngram * m_srilmModel
unsigned int m_unknownId


Detailed Description

Implementation of single factor LM using IRST's code.

Definition at line 41 of file SRI.h.


Constructor & Destructor Documentation

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

Definition at line 55 of file SRI.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

Moses::LanguageModelSRI::~LanguageModelSRI (  ) 

Definition at line 63 of file SRI.cpp.

References m_srilmModel, and m_srilmVocab.


Member Function Documentation

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

VocabIndex Moses::LanguageModelSRI::GetLmID ( const Factor factor  )  const [protected]

Definition at line 130 of file SRI.cpp.

References Moses::Factor::GetId(), m_lmIdLookup, and m_unknownId.

Here is the call graph for this function:

VocabIndex Moses::LanguageModelSRI::GetLmID ( const std::string &  str  )  const [protected]

Definition at line 126 of file SRI.cpp.

References m_srilmVocab, and m_unknownId.

Referenced by CreateFactors().

Here is the caller graph for this function:

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

LMResult Moses::LanguageModelSRI::GetValue ( unsigned int  wordId,
unsigned int *  context 
) const [protected]

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

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 69 of file SRI.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::LanguageModelSRI::m_lmIdLookup [protected]

Definition at line 44 of file SRI.h.

Referenced by CreateFactors(), and GetLmID().

Definition at line 46 of file SRI.h.

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

Definition at line 45 of file SRI.h.

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

unsigned int Moses::LanguageModelSRI::m_unknownId [protected]

Definition at line 47 of file SRI.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:24 2017 for Moses by  doxygen 1.5.9