Moses::PhraseBoundaryFeature Class Reference

#include <PhraseBoundaryFeature.h>

Inheritance diagram for Moses::PhraseBoundaryFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseBoundaryFeature (const std::string &line)
bool IsUseable (const FactorMask &mask) const
virtual const FFStateEmptyHypothesisState (const InputType &) const
 return the state associated with the empty hypothesis for a given sentence
virtual 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.
virtual FFStateEvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *) const
void SetParameter (const std::string &key, const std::string &value)


Detailed Description

Concatenations of factors on boundaries of phrases.

Definition at line 39 of file PhraseBoundaryFeature.h.


Constructor & Destructor Documentation

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

Definition at line 28 of file PhraseBoundaryFeature.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

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

return the state associated with the empty hypothesis for a given sentence

Implements Moses::StatefulFeatureFunction.

Definition at line 46 of file PhraseBoundaryFeature.cpp.

References NULL.

virtual FFState* Moses::PhraseBoundaryFeature::EvaluateWhenApplied ( const ChartHypothesis ,
int  ,
ScoreComponentCollection  
) const [inline, virtual]

Implements Moses::StatefulFeatureFunction.

Definition at line 51 of file PhraseBoundaryFeature.h.

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

References Moses::Hypothesis::GetCurrTargetPhrase(), Moses::TranslationOption::GetInputPath(), Moses::InputPath::GetPhrase(), Moses::Phrase::GetSize(), Moses::PhraseBoundaryState::GetSourceWord(), Moses::PhraseBoundaryState::GetTargetWord(), Moses::Hypothesis::GetTranslationOption(), Moses::Phrase::GetWord(), Moses::Hypothesis::IsSourceCompleted(), and NULL.

Here is the call graph for this function:

bool Moses::PhraseBoundaryFeature::IsUseable ( const FactorMask mask  )  const [virtual]

Implements Moses::FeatureFunction.

Definition at line 107 of file PhraseBoundaryFeature.cpp.

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

Reimplemented from Moses::FeatureFunction.

Definition at line 35 of file PhraseBoundaryFeature.cpp.


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

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