Moses::LanguageModel Class Reference

Abstract base class which represent a language model on a contiguous phrase. More...

#include <Base.h>

Inheritance diagram for Moses::LanguageModel:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~LanguageModel ()
bool OOVFeatureEnabled () const
virtual void SetParameter (const std::string &key, const std::string &value)
virtual const FFStateEmptyHypothesisState (const InputType &input) const =0
 return the state associated with the empty hypothesis for a given sentence
virtual void CalcScore (const Phrase &phrase, float &fullScore, float &ngramScore, std::size_t &oovCount) const =0
virtual void CalcScoreFromCache (const Phrase &phrase, float &fullScore, float &ngramScore, std::size_t &oovCount) const
virtual void IssueRequestsFor (Hypothesis &hypo, const FFState *input_state)
virtual void sync ()
virtual void SetFFStateIdx (int state_idx)
virtual void IncrementalCallback (Incremental::Manager &manager) const
virtual void ReportHistoryOrder (std::ostream &out, const Phrase &phrase) const
virtual void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const

Static Public Member Functions

static const LanguageModelGetFirstLM ()

Protected Member Functions

 LanguageModel (const std::string &line)

Protected Attributes

bool m_enableOOVFeature


Detailed Description

Abstract base class which represent a language model on a contiguous phrase.

Definition at line 44 of file Base.h.


Constructor & Destructor Documentation

Moses::LanguageModel::LanguageModel ( const std::string &  line  )  [protected]

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

Definition at line 48 of file Base.cpp.


Member Function Documentation

virtual void Moses::LanguageModel::CalcScore ( const Phrase phrase,
float &  fullScore,
float &  ngramScore,
std::size_t &  oovCount 
) const [pure virtual]

Implemented in Moses::InMemoryPerSentenceOnDemandLM.

Referenced by EvaluateInIsolation(), and Moses::Incremental::PhraseAndFeatures().

Here is the caller graph for this function:

virtual void Moses::LanguageModel::CalcScoreFromCache ( const Phrase phrase,
float &  fullScore,
float &  ngramScore,
std::size_t &  oovCount 
) const [inline, virtual]

Reimplemented in Moses::InMemoryPerSentenceOnDemandLM.

Definition at line 73 of file Base.h.

Referenced by Moses::InMemoryPerSentenceOnDemandLM::CalcScoreFromCache().

Here is the caller graph for this function:

virtual const FFState* Moses::LanguageModel::EmptyHypothesisState ( const InputType input  )  const [pure virtual]

void Moses::LanguageModel::EvaluateInIsolation ( const Phrase source,
const TargetPhrase targetPhrase,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedScores 
) const [virtual]

Reimplemented from Moses::StatefulFeatureFunction.

Reimplemented in Moses::InMemoryPerSentenceOnDemandLM.

Definition at line 62 of file Base.cpp.

References Moses::ScoreComponentCollection::Assign(), CalcScore(), and m_enableOOVFeature.

Referenced by Moses::InMemoryPerSentenceOnDemandLM::EvaluateInIsolation().

Here is the call graph for this function:

Here is the caller graph for this function:

const LanguageModel & Moses::LanguageModel::GetFirstLM (  )  [static]

Definition at line 89 of file Base.cpp.

References Moses::StatefulFeatureFunction::GetStatefulFeatureFunctions(), and NULL.

Referenced by Moses::Incremental::Manager::Decode(), and Moses::Incremental::PhraseAndFeatures().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::LanguageModel::IncrementalCallback ( Incremental::Manager manager  )  const [virtual]

virtual void Moses::LanguageModel::IssueRequestsFor ( Hypothesis hypo,
const FFState input_state 
) [inline, virtual]

Reimplemented in Moses::InMemoryPerSentenceOnDemandLM.

Definition at line 76 of file Base.h.

Referenced by Moses::InMemoryPerSentenceOnDemandLM::IssueRequestsFor().

Here is the caller graph for this function:

bool Moses::LanguageModel::OOVFeatureEnabled (  )  const [inline]

void Moses::LanguageModel::ReportHistoryOrder ( std::ostream &  out,
const Phrase phrase 
) const [virtual]

virtual void Moses::LanguageModel::SetFFStateIdx ( int  state_idx  )  [inline, virtual]

Reimplemented in Moses::InMemoryPerSentenceOnDemandLM.

Definition at line 81 of file Base.h.

Referenced by Moses::InMemoryPerSentenceOnDemandLM::SetFFStateIdx().

Here is the caller graph for this function:

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

virtual void Moses::LanguageModel::sync (  )  [inline, virtual]

Reimplemented in Moses::InMemoryPerSentenceOnDemandLM.

Definition at line 79 of file Base.h.

Referenced by Moses::InMemoryPerSentenceOnDemandLM::sync().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 49 of file Base.h.

Referenced by EvaluateInIsolation(), LanguageModel(), OOVFeatureEnabled(), and SetParameter().


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