#include <SingleFactor.h>
Public Member Functions | |
virtual | ~LanguageModelSingleFactor () |
bool | IsUseable (const FactorMask &mask) const |
virtual void | SetParameter (const std::string &key, const std::string &value) |
const Factor * | GetSentenceStart () const |
const Factor * | GetSentenceEnd () const |
FactorType | GetFactorType () const |
virtual const FFState * | GetNullContextState () const |
virtual const FFState * | GetBeginSentenceState () const |
virtual FFState * | NewState (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 Factor * | m_sentenceStart |
const Factor * | m_sentenceEnd |
FactorType | m_factorType |
FFState * | m_nullContextState |
FFState * | m_beginSentenceState |
Definition at line 34 of file SingleFactor.h.
typedef const void* Moses::LanguageModelSingleFactor::State [protected] |
Definition at line 37 of file SingleFactor.h.
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.
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().
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] |
const Factor* Moses::LanguageModelSingleFactor::GetSentenceStart | ( | ) | const [inline] |
virtual LMResult Moses::LanguageModelSingleFactor::GetValue | ( | const std::vector< const Word * > & | contextFactor, | |
State * | finalState = NULL | |||
) | const [protected, pure virtual] |
Implemented in Moses::ExampleLM, Moses::LanguageModelIRST, Moses::LanguageModelMaxEntSRI, Moses::NeuralLMWrapper, Moses::OxLM< Model >, Moses::LanguageModelRandLM, Moses::LanguageModelRemote, and Moses::LanguageModelSRI.
Referenced by GetValueForgotState().
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().
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.
Definition at line 43 of file SingleFactor.h.
Referenced by GetBeginSentenceState(), LanguageModelSingleFactor(), and ~LanguageModelSingleFactor().
Definition at line 41 of file SingleFactor.h.
Referenced by Moses::LanguageModelSRI::CreateFactors(), Moses::LanguageModelRandLM::CreateFactors(), Moses::LanguageModelMaxEntSRI::CreateFactors(), Moses::LanguageModelIRST::CreateFactors(), Moses::ExampleLM::ExampleLM(), GetFactorType(), Moses::LanguageModelIRST::GetLmID(), IsUseable(), Moses::LanguageModelIRST::IsUseable(), Moses::LanguageModelIRST::LanguageModelIRST(), Moses::LanguageModelRemote::Load(), Moses::NeuralLMWrapper::Load(), and SetParameter().
Definition at line 42 of file SingleFactor.h.
Referenced by GetNullContextState(), LanguageModelSingleFactor(), and ~LanguageModelSingleFactor().
const Factor * Moses::LanguageModelSingleFactor::m_sentenceEnd [protected] |
Definition at line 39 of file SingleFactor.h.
Referenced by Moses::LanguageModelSRI::CreateFactors(), Moses::LanguageModelRandLM::CreateFactors(), Moses::LanguageModelMaxEntSRI::CreateFactors(), Moses::LanguageModelIRST::CreateFactors(), Moses::ExampleLM::ExampleLM(), GetSentenceEnd(), and Moses::NeuralLMWrapper::Load().
const Factor* Moses::LanguageModelSingleFactor::m_sentenceStart [protected] |
Definition at line 39 of file SingleFactor.h.
Referenced by Moses::LanguageModelSRI::CreateFactors(), Moses::LanguageModelRandLM::CreateFactors(), Moses::LanguageModelMaxEntSRI::CreateFactors(), Moses::LanguageModelIRST::CreateFactors(), Moses::ExampleLM::ExampleLM(), GetSentenceStart(), and Moses::NeuralLMWrapper::Load().