Moses::DistortionScoreProducer Class Reference

#include <DistortionScoreProducer.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 (const std::string &line)
void SetParameter (const std::string &key, const std::string &value)
bool IsUseable (const FactorMask &mask) const
virtual const FFStateEmptyHypothesisState (const InputType &input) const
 return the state associated with the empty hypothesis for a given sentence
virtual FFStateEvaluateWhenApplied (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 FFStateEvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *) const

Static Public Member Functions

static const std::vector
< const
DistortionScoreProducer * > & 
GetDistortionFeatureFunctions ()
static float CalculateDistortionScore (const Hypothesis &hypo, const Range &prev, const Range &curr, const int FirstGapPosition)

Protected Attributes

FactorType m_sparseFactorTypeSource
FactorType m_sparseFactorTypeTarget
bool m_useSparse
bool m_sparseDistance
bool m_sparseSubordinate
FactorType m_sparseFactorTypeTargetSubordinate
const Factorm_subordinateConjunctionTagFactor

Static Protected Attributes

static std::vector< const
DistortionScoreProducer * > 
s_staticColl


Detailed Description

Calculates Distortion scores

Definition at line 12 of file DistortionScoreProducer.h.


Constructor & Destructor Documentation

Moses::DistortionScoreProducer::DistortionScoreProducer ( const std::string &  line  ) 

Definition at line 35 of file DistortionScoreProducer.cpp.

References Moses::FeatureFunction::ReadParameters(), and s_staticColl.

Here is the call graph for this function:


Member Function Documentation

float Moses::DistortionScoreProducer::CalculateDistortionScore ( const Hypothesis hypo,
const Range prev,
const Range curr,
const int  FirstGapPosition 
) [static]

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 67 of file DistortionScoreProducer.cpp.

References end, Moses::InputType::m_frontSpanCoveredLength, and NOT_FOUND.

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

Implements Moses::StatefulFeatureFunction.

Definition at line 48 of file DistortionScoreProducer.h.

References UTIL_THROW.

FFState * Moses::DistortionScoreProducer::EvaluateWhenApplied ( const Hypothesis cur_hypo,
const FFState prev_state,
ScoreComponentCollection accumulator 
) const [virtual]

static const std::vector<const DistortionScoreProducer*>& Moses::DistortionScoreProducer::GetDistortionFeatureFunctions (  )  [inline, static]

Definition at line 26 of file DistortionScoreProducer.h.

References s_staticColl.

Referenced by Moses::HypothesisScoreOrdererWithDistortion::HypothesisScoreOrdererWithDistortion().

Here is the caller graph for this function:

bool Moses::DistortionScoreProducer::IsUseable ( const FactorMask mask  )  const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 34 of file DistortionScoreProducer.h.

void Moses::DistortionScoreProducer::SetParameter ( const std::string &  key,
const std::string &  value 
) [virtual]


Member Data Documentation

Definition at line 20 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

Definition at line 17 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

Definition at line 18 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

Definition at line 22 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

Definition at line 21 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

Definition at line 23 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

Definition at line 19 of file DistortionScoreProducer.h.

Referenced by EvaluateWhenApplied(), and SetParameter().

std::vector< const DistortionScoreProducer * > Moses::DistortionScoreProducer::s_staticColl [static, protected]

< all the score producers in this run

Reimplemented from Moses::FeatureFunction.

Definition at line 15 of file DistortionScoreProducer.h.

Referenced by DistortionScoreProducer(), and GetDistortionFeatureFunctions().


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

Generated on Thu Jul 6 00:33:02 2017 for Moses by  doxygen 1.5.9