#include <LexicalReordering.h>


Public Member Functions | |
| LexicalReordering (std::vector< FactorType > &f_factors, std::vector< FactorType > &e_factors, const std::string &modelType, const std::string &filePath, const std::vector< float > &weights) | |
| virtual | ~LexicalReordering () |
| virtual size_t | GetNumScoreComponents () const |
| virtual 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. | |
| virtual FFState * | EvaluateChart (const ChartHypothesis &, int, ScoreComponentCollection *) const |
| virtual const FFState * | EmptyHypothesisState (const InputType &input) const |
| return the state associated with the empty hypothesis for a given sentence | |
| virtual std::string | GetScoreProducerDescription (unsigned) const |
| returns a string description of this producer | |
| std::string | GetScoreProducerWeightShortName (unsigned) const |
| returns the weight parameter name of this producer (used in n-best list) | |
| void | InitializeForInput (const InputType &i) |
| Scores | GetProb (const Phrase &f, const Phrase &e) const |
Definition at line 25 of file LexicalReordering.h.
| Moses::LexicalReordering::LexicalReordering | ( | std::vector< FactorType > & | f_factors, | |
| std::vector< FactorType > & | e_factors, | |||
| const std::string & | modelType, | |||
| const std::string & | filePath, | |||
| const std::vector< float > & | weights | |||
| ) |
Definition at line 11 of file LexicalReordering.cpp.
References Moses::UserMessage::Add(), Moses::LexicalReorderingConfiguration::E, Moses::LexicalReorderingConfiguration::F, Moses::LexicalReorderingConfiguration::FE, Moses::LexicalReorderingConfiguration::GetCondition(), Moses::LexicalReorderingConfiguration::GetNumScoreComponents(), Moses::StaticData::GetScoreIndexManager(), Moses::StaticData::Instance(), and Moses::LexicalReorderingTable::LoadAvailable().

| Moses::LexicalReordering::~LexicalReordering | ( | ) | [virtual] |
Definition at line 64 of file LexicalReordering.cpp.
| const FFState * Moses::LexicalReordering::EmptyHypothesisState | ( | const InputType & | input | ) | const [virtual] |
return the state associated with the empty hypothesis for a given sentence
Implements Moses::StatefulFeatureFunction.
Definition at line 88 of file LexicalReordering.cpp.
References Moses::LexicalReorderingConfiguration::CreateLexicalReorderingState().

| FFState * Moses::LexicalReordering::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 75 of file LexicalReordering.cpp.
References Moses::LexicalReorderingState::Expand(), GetNumScoreComponents(), Moses::Hypothesis::GetTranslationOption(), and Moses::ScoreComponentCollection::PlusEquals().

| virtual FFState* Moses::LexicalReordering::EvaluateChart | ( | const ChartHypothesis & | , | |
| int | , | |||
| ScoreComponentCollection * | ||||
| ) | const [inline, virtual] |
| virtual size_t Moses::LexicalReordering::GetNumScoreComponents | ( | ) | const [inline, virtual] |
returns the number of scores that a subclass produces. For example, a language model conventionally produces 1, a translation table some arbitrary number, etc
Implements Moses::ScoreProducer.
Definition at line 35 of file LexicalReordering.h.
References Moses::LexicalReorderingConfiguration::GetNumScoreComponents().
Referenced by Evaluate().


Definition at line 70 of file LexicalReordering.cpp.
References Moses::ARRAY_SIZE_INCR, and Moses::LexicalReorderingTable::GetScore().
Referenced by Moses::TranslationOptionCollection::CacheLexReordering().


| virtual std::string Moses::LexicalReordering::GetScoreProducerDescription | ( | unsigned | idx | ) | const [inline, virtual] |
returns a string description of this producer
Implements Moses::ScoreProducer.
Definition at line 52 of file LexicalReordering.h.
| std::string Moses::LexicalReordering::GetScoreProducerWeightShortName | ( | unsigned | idx | ) | const [inline, virtual] |
returns the weight parameter name of this producer (used in n-best list)
Implements Moses::ScoreProducer.
Definition at line 56 of file LexicalReordering.h.
| void Moses::LexicalReordering::InitializeForInput | ( | const InputType & | i | ) | [inline] |
Definition at line 60 of file LexicalReordering.h.
References Moses::LexicalReorderingTable::InitializeForInput().

1.5.9