Moses::LanguageModelSingleFactor Class Reference

Abstract class for for single factor LM. More...

#include <SingleFactor.h>

Inheritance diagram for Moses::LanguageModelSingleFactor:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~LanguageModelSingleFactor ()
bool IsUseable (const FactorMask &mask) const
virtual void SetParameter (const std::string &key, const std::string &value)
const FactorGetSentenceStart () const
const FactorGetSentenceEnd () const
FactorType GetFactorType () const
virtual const FFStateGetNullContextState () const
virtual const FFStateGetBeginSentenceState () const
virtual FFStateNewState (const FFState *from=NULL) const
virtual LMResult GetValueForgotState (const std::vector< const Word * > &contextFactor, FFState &outState) const
std::string DebugContextFactor (const std::vector< const Word * > &contextFactor) const

Protected Types

typedef const void * State

Protected Member Functions

 LanguageModelSingleFactor (const std::string &line)
virtual LMResult GetValue (const std::vector< const Word * > &contextFactor, State *finalState=NULL) const =0

Protected Attributes

const Factorm_sentenceStart
const Factorm_sentenceEnd
FactorType m_factorType
FFStatem_nullContextState
FFStatem_beginSentenceState


Detailed Description

Abstract class for for single factor LM.

Definition at line 34 of file SingleFactor.h.


Member Typedef Documentation

typedef const void* Moses::LanguageModelSingleFactor::State [protected]

Definition at line 37 of file SingleFactor.h.


Constructor & Destructor Documentation

Moses::LanguageModelSingleFactor::LanguageModelSingleFactor ( const std::string &  line  )  [protected]

Definition at line 41 of file SingleFactor.cpp.

References m_beginSentenceState, m_nullContextState, and NULL.

Moses::LanguageModelSingleFactor::~LanguageModelSingleFactor (  )  [virtual]

Definition at line 49 of file SingleFactor.cpp.

References m_beginSentenceState, and m_nullContextState.


Member Function Documentation

std::string Moses::LanguageModelSingleFactor::DebugContextFactor ( const std::vector< const Word * > &  contextFactor  )  const

Definition at line 90 of file SingleFactor.cpp.

const FFState * Moses::LanguageModelSingleFactor::GetBeginSentenceState (  )  const [virtual]

Implements Moses::LanguageModelImplementation.

Definition at line 60 of file SingleFactor.cpp.

References m_beginSentenceState.

FactorType Moses::LanguageModelSingleFactor::GetFactorType (  )  const [inline]

Definition at line 58 of file SingleFactor.h.

References m_factorType.

Referenced by Moses::LanguageModelRemote::GetValue().

Here is the caller graph for this function:

const FFState * Moses::LanguageModelSingleFactor::GetNullContextState (  )  const [virtual]

Implements Moses::LanguageModelImplementation.

Definition at line 55 of file SingleFactor.cpp.

References m_nullContextState.

const Factor* Moses::LanguageModelSingleFactor::GetSentenceEnd (  )  const [inline]

Definition at line 55 of file SingleFactor.h.

References m_sentenceEnd.

const Factor* Moses::LanguageModelSingleFactor::GetSentenceStart (  )  const [inline]

Definition at line 52 of file SingleFactor.h.

References m_sentenceStart.

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

LMResult Moses::LanguageModelSingleFactor::GetValueForgotState ( const std::vector< const Word * > &  contextFactor,
FFState outState 
) const [virtual]

Implements Moses::LanguageModelImplementation.

Definition at line 70 of file SingleFactor.cpp.

References GetValue().

Here is the call graph for this function:

bool Moses::LanguageModelSingleFactor::IsUseable ( const FactorMask mask  )  const [virtual]

Implements Moses::FeatureFunction.

Reimplemented in Moses::LanguageModelIRST.

Definition at line 75 of file SingleFactor.cpp.

References m_factorType.

FFState * Moses::LanguageModelSingleFactor::NewState ( const FFState from = NULL  )  const [virtual]

Implements Moses::LanguageModelImplementation.

Definition at line 65 of file SingleFactor.cpp.

References NULL.

void Moses::LanguageModelSingleFactor::SetParameter ( const std::string &  key,
const std::string &  value 
) [virtual]

Reimplemented from Moses::LanguageModelImplementation.

Reimplemented in Moses::LanguageModelIRST, and Moses::OxLM< Model >.

Definition at line 81 of file SingleFactor.cpp.

References m_factorType.


Member Data Documentation


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