Moses::LexicalReordering Class Reference

#include <LexicalReordering.h>

Inheritance diagram for Moses::LexicalReordering:

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

Collaboration graph
[legend]

List of all members.

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 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.
virtual FFStateEvaluateChart (const ChartHypothesis &, int, ScoreComponentCollection *) const
virtual const FFStateEmptyHypothesisState (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


Detailed Description

Definition at line 25 of file LexicalReordering.h.


Constructor & Destructor Documentation

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 
)

Moses::LexicalReordering::~LexicalReordering (  )  [virtual]

Definition at line 64 of file LexicalReordering.cpp.


Member Function Documentation

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

virtual FFState* Moses::LexicalReordering::EvaluateChart ( const ChartHypothesis ,
int  ,
ScoreComponentCollection  
) const [inline, virtual]

Implements Moses::StatefulFeatureFunction.

Definition at line 43 of file LexicalReordering.h.

References CHECK, and NULL.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

Scores Moses::LexicalReordering::GetProb ( const Phrase f,
const Phrase e 
) const

Definition at line 70 of file LexicalReordering.cpp.

References Moses::ARRAY_SIZE_INCR, and Moses::LexicalReorderingTable::GetScore().

Referenced by Moses::TranslationOptionCollection::CacheLexReordering().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:


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

Generated on Wed Feb 8 23:04:10 2012 for Moses by  doxygen 1.5.9