Moses::SpanLength Class Reference

#include <SpanLength.h>

Inheritance diagram for Moses::SpanLength:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SpanLength (const std::string &line)
virtual bool IsUseable (const FactorMask &mask) const
virtual void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const
virtual void EvaluateWithSourceContext (const InputType &input, const InputPath &inputPath, const TargetPhrase &targetPhrase, const StackVec *stackVec, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection *estimatedScores=NULL) const
void EvaluateTranslationOptionListWithSourceContext (const InputType &input, const TranslationOptionList &translationOptionList) const
virtual void EvaluateWhenApplied (const Hypothesis &hypo, ScoreComponentCollection *accumulator) const
virtual void EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) const
void SetParameter (const std::string &key, const std::string &value)

Protected Types

enum  SmoothingMethod { None, PlusConst }

Protected Attributes

SmoothingMethod m_smoothingMethod
float m_const


Detailed Description

Definition at line 9 of file SpanLength.h.


Member Enumeration Documentation

Enumerator:
None 
PlusConst 

Definition at line 46 of file SpanLength.h.


Constructor & Destructor Documentation

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

Definition at line 16 of file SpanLength.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

void Moses::SpanLength::EvaluateInIsolation ( const Phrase source,
const TargetPhrase targetPhrase,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedScores 
) const [virtual]

Implements Moses::FeatureFunction.

Definition at line 24 of file SpanLength.cpp.

References Moses::TargetPhrase::SetRuleSource().

Here is the call graph for this function:

void Moses::SpanLength::EvaluateTranslationOptionListWithSourceContext ( const InputType input,
const TranslationOptionList translationOptionList 
) const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 30 of file SpanLength.h.

virtual void Moses::SpanLength::EvaluateWhenApplied ( const ChartHypothesis hypo,
ScoreComponentCollection accumulator 
) const [inline, virtual]

Same for chart-based features.

Implements Moses::StatelessFeatureFunction.

Definition at line 39 of file SpanLength.h.

virtual void Moses::SpanLength::EvaluateWhenApplied ( const Hypothesis hypo,
ScoreComponentCollection accumulator 
) const [inline, virtual]

This should be implemented for features that apply to phrase-based models.

Implements Moses::StatelessFeatureFunction.

Definition at line 35 of file SpanLength.h.

void Moses::SpanLength::EvaluateWithSourceContext ( const InputType input,
const InputPath inputPath,
const TargetPhrase targetPhrase,
const StackVec stackVec,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedScores = NULL 
) const [virtual]

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

Implements Moses::FeatureFunction.

Definition at line 14 of file SpanLength.h.

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

Reimplemented from Moses::FeatureFunction.

Definition at line 70 of file SpanLength.cpp.

References m_const, m_smoothingMethod, None, PlusConst, and UTIL_THROW.


Member Data Documentation

float Moses::SpanLength::m_const [protected]

Definition at line 52 of file SpanLength.h.

Referenced by EvaluateWithSourceContext(), and SetParameter().

Definition at line 50 of file SpanLength.h.

Referenced by SetParameter().


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

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