#include <ExampleStatefulFF.h>
Public Member Functions | |
ExampleStatefulFF (const std::string &line) | |
bool | IsUseable (const FactorMask &mask) const |
virtual const FFState * | EmptyHypothesisState (const InputType &input) const |
return the state associated with the empty hypothesis for a given sentence | |
void | EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const |
void | EvaluateWithSourceContext (const InputType &input, const InputPath &inputPath, const TargetPhrase &targetPhrase, const StackVec *stackVec, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection *estimatedScores=NULL) const |
void | EvaluateTranslationOptionListWithSourceContext (const InputType &input, const TranslationOptionList &translationOptionList) const |
FFState * | EvaluateWhenApplied (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 * | EvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *accumulator) const |
void | SetParameter (const std::string &key, const std::string &value) |
Definition at line 28 of file ExampleStatefulFF.h.
Moses::ExampleStatefulFF::ExampleStatefulFF | ( | const std::string & | line | ) |
Definition at line 12 of file ExampleStatefulFF.cpp.
References Moses::FeatureFunction::ReadParameters().
virtual const FFState* Moses::ExampleStatefulFF::EmptyHypothesisState | ( | const InputType & | input | ) | const [inline, virtual] |
return the state associated with the empty hypothesis for a given sentence
Implements Moses::StatefulFeatureFunction.
Definition at line 36 of file ExampleStatefulFF.h.
void Moses::ExampleStatefulFF::EvaluateInIsolation | ( | const Phrase & | source, | |
const TargetPhrase & | targetPhrase, | |||
ScoreComponentCollection & | scoreBreakdown, | |||
ScoreComponentCollection & | estimatedScores | |||
) | const [virtual] |
Reimplemented from Moses::StatefulFeatureFunction.
Definition at line 22 of file ExampleStatefulFF.cpp.
void Moses::ExampleStatefulFF::EvaluateTranslationOptionListWithSourceContext | ( | const InputType & | input, | |
const TranslationOptionList & | translationOptionList | |||
) | const [virtual] |
Reimplemented from Moses::StatefulFeatureFunction.
Definition at line 43 of file ExampleStatefulFF.cpp.
FFState * Moses::ExampleStatefulFF::EvaluateWhenApplied | ( | const ChartHypothesis & | , | |
int | , | |||
ScoreComponentCollection * | accumulator | |||
) | const [virtual] |
FFState * Moses::ExampleStatefulFF::EvaluateWhenApplied | ( | const Hypothesis & | cur_hypo, | |
const FFState * | prev_state, | |||
ScoreComponentCollection * | accumulator | |||
) | const [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 46 of file ExampleStatefulFF.cpp.
References Moses::FeatureFunction::m_numScoreComponents, and Moses::ScoreComponentCollection::PlusEquals().
void Moses::ExampleStatefulFF::EvaluateWithSourceContext | ( | const InputType & | input, | |
const InputPath & | inputPath, | |||
const TargetPhrase & | targetPhrase, | |||
const StackVec * | stackVec, | |||
ScoreComponentCollection & | scoreBreakdown, | |||
ScoreComponentCollection * | estimatedScores = NULL | |||
) | const [virtual] |
Reimplemented from Moses::StatefulFeatureFunction.
Definition at line 31 of file ExampleStatefulFF.cpp.
bool Moses::ExampleStatefulFF::IsUseable | ( | const FactorMask & | mask | ) | const [inline, virtual] |
void Moses::ExampleStatefulFF::SetParameter | ( | const std::string & | key, | |
const std::string & | value | |||
) | [virtual] |