Moses::TreeStructureFeature Class Reference

#include <TreeStructureFeature.h>

Inheritance diagram for Moses::TreeStructureFeature:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TreeStructureFeature (const std::string &line)
 ~TreeStructureFeature ()
virtual const FFStateEmptyHypothesisState (const InputType &input) const
 return the state associated with the empty hypothesis for a given sentence
bool IsUseable (const FactorMask &mask) const
void SetParameter (const std::string &key, const std::string &value)
FFStateEvaluateWhenApplied (const Hypothesis &cur_hypo, const FFState *prev_state, ScoreComponentCollection *accumulator) const
 This interface should be implemented. Notes: When evaluating the value of this feature function, you should avoid calling hypo.GetPrevHypo(). If you need something from the "previous" hypothesis, you should store it in an FFState object which will be passed in as prev_state. If you don't do this, you will get in trouble.
FFStateEvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *accumulator) const
void Load (AllOptions::ptr const &opts)
 override to load model files


Detailed Description

Definition at line 34 of file TreeStructureFeature.h.


Constructor & Destructor Documentation

Moses::TreeStructureFeature::TreeStructureFeature ( const std::string &  line  )  [inline]

Definition at line 43 of file TreeStructureFeature.h.

References Moses::Word::CreateFromString(), Moses::Output, and Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

Moses::TreeStructureFeature::~TreeStructureFeature (  )  [inline]

Definition at line 52 of file TreeStructureFeature.h.


Member Function Documentation

virtual const FFState* Moses::TreeStructureFeature::EmptyHypothesisState ( const InputType input  )  const [inline, virtual]

return the state associated with the empty hypothesis for a given sentence

Implements Moses::StatefulFeatureFunction.

Definition at line 56 of file TreeStructureFeature.h.

FFState * Moses::TreeStructureFeature::EvaluateWhenApplied ( const ChartHypothesis cur_hypo,
int  featureID,
ScoreComponentCollection accumulator 
) const [virtual]

FFState* Moses::TreeStructureFeature::EvaluateWhenApplied ( const Hypothesis cur_hypo,
const FFState prev_state,
ScoreComponentCollection accumulator 
) const [inline, virtual]

This interface should be implemented. Notes: When evaluating the value of this feature function, you should avoid calling hypo.GetPrevHypo(). If you need something from the "previous" hypothesis, you should store it in an FFState object which will be passed in as prev_state. If you don't do this, you will get in trouble.

Implements Moses::StatefulFeatureFunction.

Definition at line 66 of file TreeStructureFeature.h.

References UTIL_THROW.

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

Implements Moses::FeatureFunction.

Definition at line 60 of file TreeStructureFeature.h.

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

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 11 of file TreeStructureFeature.cpp.

References Moses::StaticData::InstanceNonConst(), Moses::FeatureFunction::m_options, NULL, and Moses::StaticData::SetTreeStructure().

Here is the call graph for this function:

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

Reimplemented from Moses::FeatureFunction.

Definition at line 61 of file TreeStructureFeature.cpp.

References Moses::FeatureFunction::GetScoreProducerDescription(), 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:13 2017 for Moses by  doxygen 1.5.9