Moses::StatefulFeatureFunction Class Reference

#include <StatefulFeatureFunction.h>

Inheritance diagram for Moses::StatefulFeatureFunction:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 StatefulFeatureFunction (const std::string &line, bool registerNow)
 StatefulFeatureFunction (size_t numScoreComponents, const std::string &line)
virtual FFStateEvaluateWhenApplied (const Hypothesis &cur_hypo, const FFState *prev_state, ScoreComponentCollection *accumulator) const =0
 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.
virtual FFStateEvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *accumulator) const =0
virtual FFStateEvaluateWhenApplied (const Syntax::SHyperedge &, int, ScoreComponentCollection *accumulator) const
virtual const FFStateEmptyHypothesisState (const InputType &input) const =0
 return the state associated with the empty hypothesis for a given sentence
bool IsStateless () const
virtual void EvaluateInIsolation (Phrase const &source, TargetPhrase const &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const
virtual void EvaluateWithSourceContext (InputType const &input, InputPath const &inputPath, TargetPhrase const &targetPhrase, StackVec const *stackVec, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection *estimatedFutureScore=NULL) const
virtual void EvaluateTranslationOptionListWithSourceContext (const InputType &input, const TranslationOptionList &translationOptionList) const

Static Public Member Functions

static const std::vector
< const
StatefulFeatureFunction * > & 
GetStatefulFeatureFunctions ()


Detailed Description

base class for all stateful feature functions. eg. LM, distortion penalty

Definition at line 19 of file StatefulFeatureFunction.h.


Constructor & Destructor Documentation

Moses::StatefulFeatureFunction::StatefulFeatureFunction ( const std::string &  line,
bool  registerNow 
)

Definition at line 9 of file StatefulFeatureFunction.cpp.

Moses::StatefulFeatureFunction::StatefulFeatureFunction ( size_t  numScoreComponents,
const std::string &  line 
)

Definition at line 16 of file StatefulFeatureFunction.cpp.


Member Function Documentation

virtual const FFState* Moses::StatefulFeatureFunction::EmptyHypothesisState ( const InputType input  )  const [pure virtual]

virtual void Moses::StatefulFeatureFunction::EvaluateInIsolation ( Phrase const &  source,
TargetPhrase const &  targetPhrase,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedScores 
) const [inline, virtual]

virtual void Moses::StatefulFeatureFunction::EvaluateTranslationOptionListWithSourceContext ( const InputType input,
const TranslationOptionList translationOptionList 
) const [inline, virtual]

virtual FFState* Moses::StatefulFeatureFunction::EvaluateWhenApplied ( const Syntax::SHyperedge ,
int  ,
ScoreComponentCollection accumulator 
) const [inline, virtual]

virtual FFState* Moses::StatefulFeatureFunction::EvaluateWhenApplied ( const ChartHypothesis ,
int  ,
ScoreComponentCollection accumulator 
) const [pure virtual]

virtual FFState* Moses::StatefulFeatureFunction::EvaluateWhenApplied ( const Hypothesis cur_hypo,
const FFState prev_state,
ScoreComponentCollection accumulator 
) const [pure virtual]

virtual void Moses::StatefulFeatureFunction::EvaluateWithSourceContext ( InputType const &  input,
InputPath const &  inputPath,
TargetPhrase const &  targetPhrase,
StackVec const *  stackVec,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedFutureScore = NULL 
) const [inline, virtual]

static const std::vector<const StatefulFeatureFunction*>& Moses::StatefulFeatureFunction::GetStatefulFeatureFunctions (  )  [inline, static]

bool Moses::StatefulFeatureFunction::IsStateless (  )  const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 69 of file StatefulFeatureFunction.h.


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:33:11 2017 for Moses by  doxygen 1.5.9