Moses::PhraseLengthFeature Class Reference

#include <PhraseLengthFeature.h>

Inheritance diagram for Moses::PhraseLengthFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

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


Detailed Description

Sets the features for length of source phrase, target phrase, both.

Definition at line 17 of file PhraseLengthFeature.h.


Constructor & Destructor Documentation

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

Definition at line 13 of file PhraseLengthFeature.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

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

Implements Moses::FeatureFunction.

Definition at line 19 of file PhraseLengthFeature.cpp.

References Moses::Phrase::GetSize(), Moses::ScoreComponentCollection::PlusEquals(), and util::StringStream::str().

Here is the call graph for this function:

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

Implements Moses::FeatureFunction.

Definition at line 42 of file PhraseLengthFeature.h.

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

Same for chart-based features.

Implements Moses::StatelessFeatureFunction.

Definition at line 30 of file PhraseLengthFeature.h.

void Moses::PhraseLengthFeature::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 26 of file PhraseLengthFeature.h.

void Moses::PhraseLengthFeature::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 34 of file PhraseLengthFeature.h.

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

Implements Moses::FeatureFunction.

Definition at line 22 of file PhraseLengthFeature.h.


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

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