#include <Implementation.h>
Public Member Functions | |
LMRefCount (LanguageModelImplementation *impl) | |
LanguageModel * | Duplicate () const |
void | InitializeBeforeSentenceProcessing () |
void | CleanUpAfterSentenceProcessing (const InputType &source) |
const FFState * | EmptyHypothesisState (const InputType &) const |
return the state associated with the empty hypothesis for a given sentence | |
bool | Useable (const Phrase &phrase) const |
void | CalcScore (const Phrase &phrase, float &fullScore, float &ngramScore, size_t &oovCount) const |
FFState * | Evaluate (const Hypothesis &cur_hypo, const FFState *prev_state, ScoreComponentCollection *accumulator) const |
This interface should be implemented. Notes: When evaluating the value of this feature function, you should avoid calling hypo.GetPrevHypo(). If you need something from the "previous" hypothesis, you should store it in an FFState object which will be passed in as prev_state. If you don't do this, you will get in trouble. | |
FFState * | EvaluateChart (const ChartHypothesis &cur_hypo, int featureID, ScoreComponentCollection *accumulator) const |
LanguageModelImplementation * | MosesServerCppShouldNotHaveLMCode () |
Definition at line 127 of file Implementation.h.
Moses::LMRefCount::LMRefCount | ( | LanguageModelImplementation * | impl | ) | [inline] |
Definition at line 129 of file Implementation.h.
Referenced by Duplicate().
void Moses::LMRefCount::CalcScore | ( | const Phrase & | phrase, | |
float & | fullScore, | |||
float & | ngramScore, | |||
size_t & | oovCount | |||
) | const [inline] |
Definition at line 151 of file Implementation.h.
void Moses::LMRefCount::CleanUpAfterSentenceProcessing | ( | const InputType & | source | ) | [inline, virtual] |
LanguageModel* Moses::LMRefCount::Duplicate | ( | ) | const [inline, virtual] |
Implements Moses::LanguageModel.
Definition at line 131 of file Implementation.h.
References LMRefCount().
const FFState* Moses::LMRefCount::EmptyHypothesisState | ( | const InputType & | input | ) | const [inline, virtual] |
return the state associated with the empty hypothesis for a given sentence
Implements Moses::LanguageModel.
Definition at line 143 of file Implementation.h.
FFState* Moses::LMRefCount::Evaluate | ( | const Hypothesis & | cur_hypo, | |
const FFState * | prev_state, | |||
ScoreComponentCollection * | accumulator | |||
) | const [inline, virtual] |
This interface should be implemented. Notes: When evaluating the value of this feature function, you should avoid calling hypo.GetPrevHypo(). If you need something from the "previous" hypothesis, you should store it in an FFState object which will be passed in as prev_state. If you don't do this, you will get in trouble.
Implements Moses::StatefulFeatureFunction.
Definition at line 155 of file Implementation.h.
FFState* Moses::LMRefCount::EvaluateChart | ( | const ChartHypothesis & | cur_hypo, | |
int | featureID, | |||
ScoreComponentCollection * | accumulator | |||
) | const [inline, virtual] |
void Moses::LMRefCount::InitializeBeforeSentenceProcessing | ( | ) | [inline, virtual] |
LanguageModelImplementation* Moses::LMRefCount::MosesServerCppShouldNotHaveLMCode | ( | ) | [inline] |
Definition at line 164 of file Implementation.h.
bool Moses::LMRefCount::Useable | ( | const Phrase & | phrase | ) | const [inline, virtual] |