Moses::ExampleStatefulFF Class Reference

#include <ExampleStatefulFF.h>

Inheritance diagram for Moses::ExampleStatefulFF:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ExampleStatefulFF (const std::string &line)
bool IsUseable (const FactorMask &mask) const
virtual const FFStateEmptyHypothesisState (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
FFStateEvaluateWhenApplied (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.
FFStateEvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *accumulator) const
void SetParameter (const std::string &key, const std::string &value)


Detailed Description

Definition at line 28 of file ExampleStatefulFF.h.


Constructor & Destructor Documentation

Moses::ExampleStatefulFF::ExampleStatefulFF ( const std::string &  line  ) 

Definition at line 12 of file ExampleStatefulFF.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

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]

Implements Moses::StatefulFeatureFunction.

Definition at line 65 of file ExampleStatefulFF.cpp.

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().

Here is the call graph for this function:

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]

Implements Moses::FeatureFunction.

Definition at line 33 of file ExampleStatefulFF.h.

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

Reimplemented from Moses::FeatureFunction.

Definition at line 73 of file ExampleStatefulFF.cpp.


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

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