#include <SyntacticLanguageModel.h>


Public Member Functions | |
| SyntacticLanguageModel (const std::string &line) | |
| ~SyntacticLanguageModel () | |
| size_t | GetNumScoreComponents () const |
| const FFState * | EmptyHypothesisState (const InputType &input) const |
| return the state associated with the empty hypothesis for a given sentence | |
| FFState * | Evaluate (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. | |
| FFState * | EvaluateChart (const ChartHypothesis &cur_hypo, int featureID, ScoreComponentCollection *accumulator) const |
Definition at line 17 of file SyntacticLanguageModel.h.
| Moses::SyntacticLanguageModel::SyntacticLanguageModel | ( | const std::string & | line | ) |
Definition at line 13 of file SyntacticLanguageModel.cpp.
| Moses::SyntacticLanguageModel::~SyntacticLanguageModel | ( | ) |
| 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.

| FFState* Moses::SyntacticLanguageModel::EvaluateChart | ( | const ChartHypothesis & | cur_hypo, | |
| int | featureID, | |||
| ScoreComponentCollection * | accumulator | |||
| ) | const [inline, virtual] |
| 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.
1.5.9