#include <PhraseBoundaryFeature.h>
Public Member Functions | |
PhraseBoundaryFeature (const std::string &line) | |
bool | IsUseable (const FactorMask &mask) const |
virtual const FFState * | EmptyHypothesisState (const InputType &) const |
return the state associated with the empty hypothesis for a given sentence | |
virtual FFState * | EvaluateWhenApplied (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 FFState * | EvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *) const |
void | SetParameter (const std::string &key, const std::string &value) |
Definition at line 39 of file PhraseBoundaryFeature.h.
Moses::PhraseBoundaryFeature::PhraseBoundaryFeature | ( | const std::string & | line | ) |
Definition at line 28 of file PhraseBoundaryFeature.cpp.
References Moses::FeatureFunction::ReadParameters().
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] |
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.
bool Moses::PhraseBoundaryFeature::IsUseable | ( | const FactorMask & | mask | ) | const [virtual] |
void Moses::PhraseBoundaryFeature::SetParameter | ( | const std::string & | key, | |
const std::string & | value | |||
) | [virtual] |