Moses::SoftMatchingFeature Class Reference

#include <SoftMatchingFeature.h>

Inheritance diagram for Moses::SoftMatchingFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SoftMatchingFeature (const std::string &line)
bool IsUseable (const FactorMask &mask) const
virtual void EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) 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
bool Load (const std::string &filePath)
std::vector< std::vector< Word > > & GetSoftMatches ()
void ResizeCache () const
const std::string & GetOrSetFeatureName (const Word &RHS, const Word &LHS) const
void SetParameter (const std::string &key, const std::string &value)


Detailed Description

Definition at line 13 of file SoftMatchingFeature.h.


Constructor & Destructor Documentation

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

Definition at line 13 of file SoftMatchingFeature.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:


Member Function Documentation

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

Implements Moses::FeatureFunction.

Definition at line 25 of file SoftMatchingFeature.h.

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

Implements Moses::FeatureFunction.

Definition at line 36 of file SoftMatchingFeature.h.

void Moses::SoftMatchingFeature::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 40 of file SoftMatchingFeature.h.

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

void Moses::SoftMatchingFeature::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 29 of file SoftMatchingFeature.h.

const std::string & Moses::SoftMatchingFeature::GetOrSetFeatureName ( const Word RHS,
const Word LHS 
) const

Definition at line 107 of file SoftMatchingFeature.cpp.

References Moses::Word::GetString(), Moses::StaticData::Instance(), Moses::StaticData::options(), and ResizeCache().

Referenced by EvaluateWhenApplied(), and Load().

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector<std::vector<Word> >& Moses::SoftMatchingFeature::GetSoftMatches (  )  [inline]

Definition at line 45 of file SoftMatchingFeature.h.

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

Implements Moses::FeatureFunction.

Definition at line 18 of file SoftMatchingFeature.h.

bool Moses::SoftMatchingFeature::Load ( const std::string &  filePath  ) 

Definition at line 38 of file SoftMatchingFeature.cpp.

References Moses::Word::CreateFromString(), GetOrSetFeatureName(), Moses::StaticData::InstanceNonConst(), Moses::StaticData::options(), Moses::Output, Moses::StaticData::SetSoftMatches(), Moses::Tokenize(), and UTIL_THROW_IF2.

Referenced by SetParameter().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::SoftMatchingFeature::ResizeCache (  )  const

Definition at line 95 of file SoftMatchingFeature.cpp.

References Moses::FactorCollection::GetNumNonTerminals(), and Moses::FactorCollection::Instance().

Referenced by GetOrSetFeatureName().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from Moses::FeatureFunction.

Definition at line 21 of file SoftMatchingFeature.cpp.

References Moses::FeatureFunction::GetScoreProducerDescription(), Load(), Moses::FeatureFunction::m_tuneable, Moses::Scan< bool >(), and UTIL_THROW.

Here is the call graph for this function:


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

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