#include <EditOps.h>
Public Member Functions | |
EditOps (const std::string &line) | |
bool | IsUseable (const FactorMask &mask) const |
void | Load () |
virtual 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 | EvaluateWhenApplied (const Hypothesis &hypo, ScoreComponentCollection *accumulator) const |
void | EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) const |
void | EvaluateTranslationOptionListWithSourceContext (const InputType &input, const TranslationOptionList &translationOptionList) const |
void | ComputeFeatures (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection *accumulator) const |
void | SetParameter (const std::string &key, const std::string &value) |
Definition at line 20 of file EditOps.h.
Moses::EditOps::EditOps | ( | const std::string & | line | ) |
Definition at line 41 of file EditOps.cpp.
References Moses::FeatureFunction::ReadParameters().
void Moses::EditOps::ComputeFeatures | ( | const Phrase & | source, | |
const TargetPhrase & | targetPhrase, | |||
ScoreComponentCollection * | accumulator | |||
) | const |
Definition at line 73 of file EditOps.cpp.
References Moses::AddStats(), StringPiece::as_string(), Moses::Word::GetFactor(), Moses::FeatureFunction::GetNumScoreComponents(), Moses::Phrase::GetSize(), Moses::Factor::GetString(), Moses::Phrase::GetStringRep(), Moses::Phrase::GetWord(), Moses::Word::IsNonTerminal(), and Moses::ScoreComponentCollection::PlusEquals().
Referenced by EvaluateInIsolation().
void Moses::EditOps::EvaluateInIsolation | ( | const Phrase & | source, | |
const TargetPhrase & | targetPhrase, | |||
ScoreComponentCollection & | scoreBreakdown, | |||
ScoreComponentCollection & | estimatedFutureScore | |||
) | const [virtual] |
Implements Moses::FeatureFunction.
Definition at line 65 of file EditOps.cpp.
References ComputeFeatures().
void Moses::EditOps::EvaluateTranslationOptionListWithSourceContext | ( | const InputType & | input, | |
const TranslationOptionList & | translationOptionList | |||
) | const [inline, virtual] |
void Moses::EditOps::EvaluateWhenApplied | ( | const ChartHypothesis & | hypo, | |
ScoreComponentCollection * | accumulator | |||
) | const [inline, virtual] |
Same for chart-based features.
Implements Moses::StatelessFeatureFunction.
void Moses::EditOps::EvaluateWhenApplied | ( | const Hypothesis & | hypo, | |
ScoreComponentCollection * | accumulator | |||
) | const [inline, virtual] |
This should be implemented for features that apply to phrase-based models.
Implements Moses::StatelessFeatureFunction.
void Moses::EditOps::EvaluateWithSourceContext | ( | const InputType & | input, | |
const InputPath & | inputPath, | |||
const TargetPhrase & | targetPhrase, | |||
const StackVec * | stackVec, | |||
ScoreComponentCollection & | scoreBreakdown, | |||
ScoreComponentCollection * | estimatedFutureScore = NULL | |||
) | const [inline, virtual] |
bool Moses::EditOps::IsUseable | ( | const FactorMask & | mask | ) | const [virtual] |
void Moses::EditOps::Load | ( | ) |
Definition at line 62 of file EditOps.cpp.
void Moses::EditOps::SetParameter | ( | const std::string & | key, | |
const std::string & | value | |||
) | [virtual] |
Reimplemented from Moses::FeatureFunction.
Definition at line 49 of file EditOps.cpp.
References Moses::Scan< bool >().