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 (const std::string &line)
virtual ~LexicalReordering ()
void Load (AllOptions::ptr const &opts)
 override to load model files
virtual bool IsUseable (const FactorMask &mask) const
virtual FFState const * EmptyHypothesisState (const InputType &input) const
 return the state associated with the empty hypothesis for a given sentence
void InitializeForInput (ttasksptr const &ttask)
 Called before search and collecting of translation options.
Scores GetProb (const Phrase &f, const Phrase &e) const
virtual 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.
virtual FFStateEvaluateWhenApplied (const ChartHypothesis &, int featureID, ScoreComponentCollection *) const
bool GetHaveDefaultScores ()
float GetDefaultScore (size_t i)
virtual void SetCache (TranslationOption &to) const
virtual void SetCache (TranslationOptionList &tol) const
LRModel const & GetModel () const


Detailed Description

Definition at line 31 of file LexicalReordering.h.


Constructor & Destructor Documentation

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

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

Definition at line 82 of file LexicalReordering.cpp.


Member Function Documentation

FFState const * 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 119 of file LexicalReordering.cpp.

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

Implements Moses::StatefulFeatureFunction.

Definition at line 62 of file LexicalReordering.h.

References UTIL_THROW2.

FFState * Moses::LexicalReordering::EvaluateWhenApplied ( 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 105 of file LexicalReordering.cpp.

References Moses::LRState::Expand(), Moses::Hypothesis::GetInput(), Moses::Hypothesis::GetTranslationOption(), and VERBOSE.

Here is the call graph for this function:

float Moses::LexicalReordering::GetDefaultScore ( size_t  i  )  [inline]

Definition at line 73 of file LexicalReordering.h.

Referenced by Moses::LRState::CopyScores().

Here is the caller graph for this function:

bool Moses::LexicalReordering::GetHaveDefaultScores (  )  [inline]

Definition at line 68 of file LexicalReordering.h.

Referenced by Moses::LRState::CopyScores().

Here is the caller graph for this function:

LRModel const & Moses::LexicalReordering::GetModel (  )  const

Definition at line 154 of file LexicalReordering.cpp.

Referenced by Moses::Mmsapt::GetTargetPhraseCollectionLEGACY().

Here is the caller graph for this function:

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

Definition at line 98 of file LexicalReordering.cpp.

References Moses::ARRAY_SIZE_INCR.

Referenced by SetCache().

Here is the caller graph for this function:

void Moses::LexicalReordering::InitializeForInput ( ttasksptr const &  ttask  )  [inline, virtual]

Called before search and collecting of translation options.

Reimplemented from Moses::FeatureFunction.

Definition at line 47 of file LexicalReordering.h.

bool Moses::LexicalReordering::IsUseable ( const FactorMask mask  )  const [virtual]

Implements Moses::FeatureFunction.

Definition at line 126 of file LexicalReordering.cpp.

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

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 87 of file LexicalReordering.cpp.

References Moses::FeatureFunction::m_options.

void Moses::LexicalReordering::SetCache ( TranslationOptionList tol  )  const [virtual]

Definition at line 162 of file LexicalReordering.cpp.

References SetCache().

Here is the call graph for this function:

void Moses::LexicalReordering::SetCache ( TranslationOption to  )  const [virtual]


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

Generated on Thu Jul 6 00:33:05 2017 for Moses by  doxygen 1.5.9