Moses::TargetConstituentAdjacencyFeature Class Reference

#include <TargetConstituentAdjacencyFeature.h>

Inheritance diagram for Moses::TargetConstituentAdjacencyFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TargetConstituentAdjacencyFeature (const std::string &line)
 ~TargetConstituentAdjacencyFeature ()
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 38 of file TargetConstituentAdjacencyFeature.h.


Constructor & Destructor Documentation

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

Definition at line 59 of file TargetConstituentAdjacencyFeature.cpp.

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

Here is the call graph for this function:

Moses::TargetConstituentAdjacencyFeature::~TargetConstituentAdjacencyFeature (  )  [inline]

Definition at line 45 of file TargetConstituentAdjacencyFeature.h.


Member Function Documentation

virtual const FFState* Moses::TargetConstituentAdjacencyFeature::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 TargetConstituentAdjacencyFeature.h.

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

Reimplemented from Moses::StatefulFeatureFunction.

Definition at line 61 of file TargetConstituentAdjacencyFeature.h.

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

Reimplemented from Moses::StatefulFeatureFunction.

Definition at line 75 of file TargetConstituentAdjacencyFeature.h.

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

Implements Moses::StatefulFeatureFunction.

Definition at line 84 of file TargetConstituentAdjacencyFeature.h.

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

Here is the call graph for this function:

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

References Moses::FactorCollection::AddFactor(), FEATUREVERBOSE, Moses::TargetConstituentBoundariesRightAdjacentPhraseProperty::GetCollection(), Moses::TargetConstituentBoundariesLeftPhraseProperty::GetCollection(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetPrevHypo(), Moses::TargetPhrase::GetProperty(), Moses::FeatureFunction::GetScoreProducerDescription(), Moses::Phrase::GetWord(), Moses::FactorCollection::Instance(), Moses::Word::IsOOV(), Moses::FeatureFunction::m_numScoreComponents, Moses::ScoreComponentCollection::PlusEquals(), prob(), Moses::TransformScore(), and UTIL_THROW_IF2.

Here is the call graph for this function:

void Moses::TargetConstituentAdjacencyFeature::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 67 of file TargetConstituentAdjacencyFeature.h.

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

Implements Moses::FeatureFunction.

Definition at line 48 of file TargetConstituentAdjacencyFeature.h.

void Moses::TargetConstituentAdjacencyFeature::Load ( AllOptions::ptr const &  opts  )  [inline, virtual]

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 58 of file TargetConstituentAdjacencyFeature.h.

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

Reimplemented from Moses::FeatureFunction.

Definition at line 71 of file TargetConstituentAdjacencyFeature.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