Moses::SyntacticLanguageModel Class Reference

#include <SyntacticLanguageModel.h>

Inheritance diagram for Moses::SyntacticLanguageModel:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SyntacticLanguageModel (const std::string &line)
 ~SyntacticLanguageModel ()
size_t GetNumScoreComponents () const
const FFStateEmptyHypothesisState (const InputType &input) const
 return the state associated with the empty hypothesis for a given sentence
FFStateEvaluate (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.
FFStateEvaluateChart (const ChartHypothesis &cur_hypo, int featureID, ScoreComponentCollection *accumulator) const


Detailed Description

Definition at line 17 of file SyntacticLanguageModel.h.


Constructor & Destructor Documentation

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

Definition at line 13 of file SyntacticLanguageModel.cpp.

Moses::SyntacticLanguageModel::~SyntacticLanguageModel (  ) 

Definition at line 76 of file SyntacticLanguageModel.cpp.

References VERBOSE.


Member Function Documentation

const FFState * Moses::SyntacticLanguageModel::EmptyHypothesisState ( const InputType input  )  const [virtual]

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

Implements Moses::StatefulFeatureFunction.

Definition at line 92 of file SyntacticLanguageModel.cpp.

FFState * Moses::SyntacticLanguageModel::Evaluate ( const Hypothesis cur_hypo,
const FFState prev_state,
ScoreComponentCollection accumulator 
) const [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 129 of file SyntacticLanguageModel.cpp.

References Moses::ScoreComponentCollection::Assign(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Word::GetFactor(), Moses::SyntacticLanguageModelState< MY, MX, YS, B >::getScore(), Moses::Phrase::GetSize(), Moses::Factor::GetString(), Moses::Phrase::GetWord(), n, NULL, and VERBOSE.

Here is the call graph for this function:

FFState* Moses::SyntacticLanguageModel::EvaluateChart ( const ChartHypothesis cur_hypo,
int  featureID,
ScoreComponentCollection accumulator 
) const [inline, virtual]

Implements Moses::StatefulFeatureFunction.

Definition at line 33 of file SyntacticLanguageModel.h.

size_t Moses::SyntacticLanguageModel::GetNumScoreComponents (  )  const

returns the number of scores that a subclass produces. For example, a language model conventionally produces 1, a translation table some arbitrary number, etc

Reimplemented from Moses::FeatureFunction.

Definition at line 82 of file SyntacticLanguageModel.cpp.


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

Generated on Fri Oct 31 00:31:47 2014 for Moses by  doxygen 1.5.9