Moses::CoveredReferenceFeature Class Reference

#include <CoveredReferenceFeature.h>

Inheritance diagram for Moses::CoveredReferenceFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CoveredReferenceFeature (const std::string &line)
void Load (AllOptions::ptr const &opts)
 override to load model files
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 EvaluateWithSourceContext (const InputType &input, const InputPath &inputPath, const TargetPhrase &targetPhrase, const StackVec *stackVec, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection *estimatedScores=NULL) 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 27 of file CoveredReferenceFeature.h.


Constructor & Destructor Documentation

Moses::CoveredReferenceFeature::CoveredReferenceFeature ( const std::string &  line  )  [inline]

Definition at line 41 of file CoveredReferenceFeature.h.

References Moses::FeatureFunction::m_tuneable, and Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

virtual const FFState* Moses::CoveredReferenceFeature::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 52 of file CoveredReferenceFeature.h.

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

Implements Moses::StatefulFeatureFunction.

Definition at line 121 of file CoveredReferenceFeature.cpp.

References UTIL_THROW.

FFState * Moses::CoveredReferenceFeature::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 80 of file CoveredReferenceFeature.cpp.

References Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetManager(), Moses::TargetPhrase::GetScoreBreakdown(), Moses::ScoreComponentCollection::GetScoresForProducer(), Moses::Manager::GetSource(), Moses::InputType::GetTranslationId(), Moses::CoveredReferenceState::m_coveredRef, Moses::ScoreComponentCollection::PlusEquals(), and UTIL_THROW.

Here is the call graph for this function:

void Moses::CoveredReferenceFeature::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 34 of file CoveredReferenceFeature.cpp.

References Moses::ScoreComponentCollection::Assign(), and Moses::InputType::GetTranslationId().

Here is the call graph for this function:

bool Moses::CoveredReferenceFeature::IsUseable ( const FactorMask mask  )  const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 49 of file CoveredReferenceFeature.h.

void Moses::CoveredReferenceFeature::Load ( AllOptions::ptr const &  opts  )  [virtual]

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 55 of file CoveredReferenceFeature.cpp.

References Moses::StaticData::Instance(), Moses::FeatureFunction::m_options, and Moses::Tokenize().

Here is the call graph for this function:

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

Reimplemented from Moses::FeatureFunction.

Definition at line 71 of file CoveredReferenceFeature.cpp.


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

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