#include <DummyScoreProducers.h>


Public Member Functions | |
| DistortionScoreProducer (ScoreIndexManager &scoreIndexManager) | |
| float | CalculateDistortionScore (const Hypothesis &hypo, const WordsRange &prev, const WordsRange &curr, const int FirstGapPosition) const |
| size_t | GetNumScoreComponents () const |
| std::string | GetScoreProducerDescription (unsigned) const |
| returns a string description of this producer | |
| std::string | GetScoreProducerWeightShortName (unsigned) const |
| returns the weight parameter name of this producer (used in n-best list) | |
| size_t | GetNumInputScores () const |
| returns the number of scores gathered from the input (0 by default) | |
| virtual const FFState * | EmptyHypothesisState (const InputType &input) const |
| return the state associated with the empty hypothesis for a given sentence | |
| virtual FFState * | Evaluate (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 * | EvaluateChart (const ChartHypothesis &, int, ScoreComponentCollection *) const |
Definition at line 15 of file DummyScoreProducers.h.
| Moses::DistortionScoreProducer::DistortionScoreProducer | ( | ScoreIndexManager & | scoreIndexManager | ) |
Definition at line 41 of file DummyScoreProducers.cpp.
References Moses::ScoreIndexManager::AddScoreProducer().

| float Moses::DistortionScoreProducer::CalculateDistortionScore | ( | const Hypothesis & | hypo, | |
| const WordsRange & | prev, | |||
| const WordsRange & | curr, | |||
| const int | FirstGapPosition | |||
| ) | const |
Definition at line 61 of file DummyScoreProducers.cpp.
References Moses::InputType::ComputeDistortionDistance(), Moses::WordsRange::GetEndPos(), Moses::Hypothesis::GetInput(), Moses::WordsRange::GetNumWordsBetween(), Moses::WordsRange::GetNumWordsCovered(), and Moses::WordsRange::GetStartPos().
Referenced by Evaluate(), and Moses::HypothesisScoreOrdererWithDistortion::operator()().


| const FFState * Moses::DistortionScoreProducer::EmptyHypothesisState | ( | const InputType & | input | ) | const [virtual] |
return the state associated with the empty hypothesis for a given sentence
Implements Moses::StatefulFeatureFunction.
Definition at line 26 of file DummyScoreProducers.cpp.
References end, Moses::InputType::m_frontSpanCoveredLength, and NOT_FOUND.
| FFState * Moses::DistortionScoreProducer::Evaluate | ( | 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 93 of file DummyScoreProducers.cpp.
References CalculateDistortionScore(), Moses::DistortionState_traditional::first_gap, Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::WordsBitmap::GetFirstGapPos(), Moses::Hypothesis::GetPrevHypo(), Moses::Hypothesis::GetWordsBitmap(), Moses::ScoreComponentCollection::PlusEquals(), and Moses::DistortionState_traditional::range.

| virtual FFState* Moses::DistortionScoreProducer::EvaluateChart | ( | const ChartHypothesis & | , | |
| int | , | |||
| ScoreComponentCollection * | ||||
| ) | const [inline, virtual] |
| size_t Moses::DistortionScoreProducer::GetNumInputScores | ( | ) | const [virtual] |
returns the number of scores gathered from the input (0 by default)
Reimplemented from Moses::ScoreProducer.
Definition at line 88 of file DummyScoreProducers.cpp.
| size_t Moses::DistortionScoreProducer::GetNumScoreComponents | ( | ) | const [virtual] |
returns the number of scores that a subclass produces. For example, a language model conventionally produces 1, a translation table some arbitrary number, etc
Implements Moses::ScoreProducer.
Definition at line 46 of file DummyScoreProducers.cpp.
| std::string Moses::DistortionScoreProducer::GetScoreProducerDescription | ( | unsigned | idx | ) | const [virtual] |
returns a string description of this producer
Implements Moses::ScoreProducer.
Definition at line 51 of file DummyScoreProducers.cpp.
| std::string Moses::DistortionScoreProducer::GetScoreProducerWeightShortName | ( | unsigned | idx | ) | const [virtual] |
returns the weight parameter name of this producer (used in n-best list)
Implements Moses::ScoreProducer.
Definition at line 56 of file DummyScoreProducers.cpp.
1.5.9