Moses::TargetPreferencesFeature Class Reference

#include <TargetPreferencesFeature.h>

Inheritance diagram for Moses::TargetPreferencesFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TargetPreferencesFeature (const std::string &line)
 ~TargetPreferencesFeature ()
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 SetParameter (const std::string &key, const std::string &value)
void Load (AllOptions::ptr const &opts)
 override to load model files
void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedFutureScore) const
void EvaluateWithSourceContext (const InputType &input, const InputPath &inputPath, const TargetPhrase &targetPhrase, const StackVec *stackVec, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection *estimatedFutureScore=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 &cur_hypo, int featureID, ScoreComponentCollection *accumulator) const


Detailed Description

Definition at line 47 of file TargetPreferencesFeature.h.


Constructor & Destructor Documentation

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

Definition at line 92 of file TargetPreferencesFeature.cpp.

References Moses::FeatureFunction::GetScoreProducerDescription(), Moses::FeatureFunction::ReadParameters(), and VERBOSE.

Here is the call graph for this function:

Moses::TargetPreferencesFeature::~TargetPreferencesFeature (  ) 

Definition at line 104 of file TargetPreferencesFeature.cpp.


Member Function Documentation

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

void Moses::TargetPreferencesFeature::EvaluateInIsolation ( const Phrase source,
const TargetPhrase targetPhrase,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedFutureScore 
) const [inline, virtual]

Reimplemented from Moses::StatefulFeatureFunction.

Definition at line 68 of file TargetPreferencesFeature.h.

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

Reimplemented from Moses::StatefulFeatureFunction.

Definition at line 82 of file TargetPreferencesFeature.h.

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

FFState* Moses::TargetPreferencesFeature::EvaluateWhenApplied ( 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 86 of file TargetPreferencesFeature.h.

References Moses::FeatureFunction::GetScoreProducerDescription(), and UTIL_THROW2.

Here is the call graph for this function:

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

Reimplemented from Moses::StatefulFeatureFunction.

Definition at line 74 of file TargetPreferencesFeature.h.

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

Implements Moses::FeatureFunction.

Definition at line 56 of file TargetPreferencesFeature.h.

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

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 125 of file TargetPreferencesFeature.cpp.

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

Reimplemented from Moses::FeatureFunction.

Definition at line 107 of file TargetPreferencesFeature.cpp.

References Moses::Scan< bool >().

Here is the call graph for this function:


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

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