Moses::PhrasePenalty Class Reference

#include <PhrasePenalty.h>

Inheritance diagram for Moses::PhrasePenalty:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhrasePenalty (const std::string &line)
bool IsUseable (const FactorMask &mask) const
virtual void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const
void EvaluateWhenApplied (const Hypothesis &hypo, ScoreComponentCollection *accumulator) const
void EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) const
void EvaluateWhenApplied (const Syntax::SHyperedge &hyperedge, ScoreComponentCollection *accumulator) const
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
void SetParameter (const std::string &key, const std::string &value)

Protected Attributes

bool m_perPhraseTable


Detailed Description

Definition at line 8 of file PhrasePenalty.h.


Constructor & Destructor Documentation

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

Definition at line 11 of file PhrasePenalty.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

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

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

Implements Moses::FeatureFunction.

Definition at line 40 of file PhrasePenalty.h.

void Moses::PhrasePenalty::EvaluateWhenApplied ( const Syntax::SHyperedge hyperedge,
ScoreComponentCollection accumulator 
) const [inline, virtual]

Reimplemented from Moses::StatelessFeatureFunction.

Definition at line 28 of file PhrasePenalty.h.

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

Same for chart-based features.

Implements Moses::StatelessFeatureFunction.

Definition at line 25 of file PhrasePenalty.h.

void Moses::PhrasePenalty::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 22 of file PhrasePenalty.h.

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

Implements Moses::FeatureFunction.

Definition at line 32 of file PhrasePenalty.h.

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

Implements Moses::FeatureFunction.

Definition at line 13 of file PhrasePenalty.h.

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

Reimplemented from Moses::FeatureFunction.

Definition at line 40 of file PhrasePenalty.cpp.

References m_perPhraseTable, and Moses::Scan< bool >().

Here is the call graph for this function:


Member Data Documentation

Definition at line 46 of file PhrasePenalty.h.

Referenced by EvaluateInIsolation(), and SetParameter().


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

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