Moses::DistortionScoreProducer Class Reference

#include <DummyScoreProducers.h>

Inheritance diagram for Moses::DistortionScoreProducer:

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

Collaboration graph
[legend]

List of all members.

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 FFStateEmptyHypothesisState (const InputType &input) const
 return the state associated with the empty hypothesis for a given sentence
virtual FFStateEvaluate (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 FFStateEvaluateChart (const ChartHypothesis &, int, ScoreComponentCollection *) const


Detailed Description

Calculates Distortion scores

Definition at line 15 of file DummyScoreProducers.h.


Constructor & Destructor Documentation

Moses::DistortionScoreProducer::DistortionScoreProducer ( ScoreIndexManager scoreIndexManager  ) 

Definition at line 41 of file DummyScoreProducers.cpp.

References Moses::ScoreIndexManager::AddScoreProducer().

Here is the call graph for this function:


Member Function Documentation

float Moses::DistortionScoreProducer::CalculateDistortionScore ( const Hypothesis hypo,
const WordsRange prev,
const WordsRange curr,
const int  FirstGapPosition 
) const

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.

Here is the call graph for this function:

virtual FFState* Moses::DistortionScoreProducer::EvaluateChart ( const ChartHypothesis ,
int  ,
ScoreComponentCollection  
) const [inline, virtual]

Implements Moses::StatefulFeatureFunction.

Definition at line 35 of file DummyScoreProducers.h.

References CHECK, and NULL.

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.


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

Generated on Thu Feb 9 00:04:11 2012 for Moses by  doxygen 1.5.9