#include <ControlRecombination.h>
Public Member Functions | |
ControlRecombination (const std::string &line) | |
bool | IsUseable (const FactorMask &mask) const |
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. | |
FFState * | EvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *accumulator) const |
virtual const FFState * | EmptyHypothesisState (const InputType &input) const |
return the state associated with the empty hypothesis for a given sentence | |
std::vector< float > | DefaultWeights () const |
void | SetParameter (const std::string &key, const std::string &value) |
ControlRecombinationType | GetType () const |
Protected Attributes | |
ControlRecombinationType | m_type |
Definition at line 45 of file ControlRecombination.h.
Moses::ControlRecombination::ControlRecombination | ( | const std::string & | line | ) | [inline] |
Definition at line 48 of file ControlRecombination.h.
References Moses::FeatureFunction::m_tuneable, and Moses::FeatureFunction::ReadParameters().
std::vector< float > Moses::ControlRecombination::DefaultWeights | ( | ) | const [virtual] |
Reimplemented from Moses::FeatureFunction.
Definition at line 62 of file ControlRecombination.cpp.
References Moses::FeatureFunction::m_numScoreComponents, and UTIL_THROW_IF2.
virtual const FFState* Moses::ControlRecombination::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 71 of file ControlRecombination.h.
FFState * Moses::ControlRecombination::EvaluateWhenApplied | ( | const ChartHypothesis & | hypo, | |
int | , | |||
ScoreComponentCollection * | accumulator | |||
) | const [virtual] |
FFState * Moses::ControlRecombination::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 70 of file ControlRecombination.cpp.
ControlRecombinationType Moses::ControlRecombination::GetType | ( | ) | const [inline] |
Definition at line 79 of file ControlRecombination.h.
References m_type.
Referenced by Moses::ControlRecombinationState::ControlRecombinationState(), Moses::ControlRecombinationState::hash(), and Moses::ControlRecombinationState::operator==().
bool Moses::ControlRecombination::IsUseable | ( | const FactorMask & | mask | ) | const [inline, virtual] |
void Moses::ControlRecombination::SetParameter | ( | const std::string & | key, | |
const std::string & | value | |||
) | [virtual] |
Reimplemented from Moses::FeatureFunction.
Definition at line 86 of file ControlRecombination.cpp.
References m_type.