Moses::BilingualLM Class Reference

#include <BilingualLM.h>

Inheritance diagram for Moses::BilingualLM:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BilingualLM (const std::string &line)
bool IsUseable (const FactorMask &mask) const
virtual const FFStateEmptyHypothesisState (const InputType &input) const
 return the state associated with the empty hypothesis for a given sentence
void Load (AllOptions::ptr const &opts)
 override to load model files
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.
FFStateEvaluateWhenApplied (const ChartHypothesis &cur_hypo, int featureID, ScoreComponentCollection *accumulator) const
void SetParameter (const std::string &key, const std::string &value)

Protected Attributes

std::string m_filePath
int target_ngrams
int source_ngrams
FactorType word_factortype
FactorType pos_factortype
const FactorBOS_factor
const FactorEOS_factor
Word BOS_word
Word EOS_word


Detailed Description

Definition at line 50 of file BilingualLM.h.


Constructor & Destructor Documentation

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

Definition at line 11 of file BilingualLM.cpp.

References Moses::FactorCollection::AddFactor(), BOS_, BOS_factor, BOS_word, EOS_, EOS_factor, EOS_word, Moses::FactorCollection::Instance(), and Moses::Word::SetFactor().

Here is the call graph for this function:


Member Function Documentation

virtual const FFState* Moses::BilingualLM::EmptyHypothesisState ( const InputType input  )  const [inline, virtual]

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

Implements Moses::StatefulFeatureFunction.

Definition at line 116 of file BilingualLM.h.

FFState * Moses::BilingualLM::EvaluateWhenApplied ( const ChartHypothesis cur_hypo,
int  featureID,
ScoreComponentCollection accumulator 
) const [virtual]

FFState * Moses::BilingualLM::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 192 of file BilingualLM.cpp.

References Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Hypothesis::GetManager(), Moses::Phrase::GetSize(), Moses::Manager::GetSource(), Moses::ScoreComponentCollection::PlusEquals(), and source_ngrams.

Here is the call graph for this function:

bool Moses::BilingualLM::IsUseable ( const FactorMask mask  )  const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 113 of file BilingualLM.h.

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

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 23 of file BilingualLM.cpp.

References Moses::FeatureFunction::m_options, and Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

void Moses::BilingualLM::SetParameter ( const std::string &  key,
const std::string &  value 
) [virtual]

Reimplemented from Moses::FeatureFunction.

Definition at line 468 of file BilingualLM.cpp.

References m_filePath.


Member Data Documentation

Definition at line 105 of file BilingualLM.h.

Referenced by BilingualLM().

Word Moses::BilingualLM::BOS_word [mutable, protected]

Definition at line 107 of file BilingualLM.h.

Referenced by BilingualLM(), and EvaluateWhenApplied().

Definition at line 106 of file BilingualLM.h.

Referenced by BilingualLM().

Word Moses::BilingualLM::EOS_word [mutable, protected]

Definition at line 108 of file BilingualLM.h.

Referenced by BilingualLM().

std::string Moses::BilingualLM::m_filePath [protected]

Definition at line 98 of file BilingualLM.h.

Referenced by SetParameter().

Definition at line 104 of file BilingualLM.h.

Definition at line 100 of file BilingualLM.h.

Referenced by EvaluateWhenApplied().

Definition at line 99 of file BilingualLM.h.

Definition at line 103 of file BilingualLM.h.


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

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