Moses::InputFeature Class Reference

#include <InputFeature.h>

Inheritance diagram for Moses::InputFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 InputFeature (const std::string &line)
void Load (AllOptions::ptr const &opts)
 override to load model files
void SetParameter (const std::string &key, const std::string &value)
bool IsUseable (const FactorMask &mask) const
size_t GetNumInputScores () const
size_t GetNumRealWordsInInput () const
void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) 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 EvaluateWhenApplied (const Hypothesis &hypo, ScoreComponentCollection *accumulator) const
void EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) const

Static Public Member Functions

static const InputFeatureInstancePtr ()

Protected Attributes

size_t m_numInputScores
size_t m_numRealWordCount
bool m_legacy

Static Protected Attributes

static InputFeatures_instance = NULL


Detailed Description

Definition at line 10 of file InputFeature.h.


Constructor & Destructor Documentation

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

Definition at line 15 of file InputFeature.cpp.

References m_numInputScores, Moses::FeatureFunction::m_numScoreComponents, Moses::FeatureFunction::ReadParameters(), s_instance, and UTIL_THROW_IF2.

Here is the call graph for this function:


Member Function Documentation

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

Implements Moses::FeatureFunction.

Definition at line 41 of file InputFeature.h.

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

Implements Moses::FeatureFunction.

Definition at line 54 of file InputFeature.h.

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

Same for chart-based features.

Implements Moses::StatelessFeatureFunction.

Definition at line 61 of file InputFeature.h.

void Moses::InputFeature::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 58 of file InputFeature.h.

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

size_t Moses::InputFeature::GetNumInputScores (  )  const [inline]

Definition at line 34 of file InputFeature.h.

References m_numInputScores.

Referenced by Moses::WordLattice::InitializeFromPCNDataType(), and Moses::ConfusionNet::ReadFormat0().

Here is the caller graph for this function:

size_t Moses::InputFeature::GetNumRealWordsInInput (  )  const [inline]

Definition at line 37 of file InputFeature.h.

References m_numRealWordCount.

Referenced by Moses::WordLattice::InitializeFromPCNDataType(), and Moses::ConfusionNet::ReadFormat0().

Here is the caller graph for this function:

static const InputFeature* Moses::InputFeature::InstancePtr (  )  [inline, static]

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

Implements Moses::FeatureFunction.

Definition at line 30 of file InputFeature.h.

void Moses::InputFeature::Load ( AllOptions::ptr const &  opts  )  [virtual]

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 26 of file InputFeature.cpp.

References Moses::PhraseDictionary::GetColl(), m_legacy, Moses::FeatureFunction::m_options, and NULL.

Here is the call graph for this function:

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

Reimplemented from Moses::FeatureFunction.

Definition at line 35 of file InputFeature.cpp.

References m_numInputScores, and m_numRealWordCount.


Member Data Documentation

Definition at line 17 of file InputFeature.h.

Referenced by EvaluateWithSourceContext(), and Load().

Definition at line 15 of file InputFeature.h.

Referenced by GetNumInputScores(), InputFeature(), and SetParameter().

Definition at line 16 of file InputFeature.h.

Referenced by GetNumRealWordsInInput(), and SetParameter().

Definition at line 13 of file InputFeature.h.

Referenced by InputFeature(), and InstancePtr().


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

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