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 ()
virtual LanguageModelDuplicate (ScoreIndexManager &scoreIndexManager) const =0
std::size_t GetNumScoreComponents () const
 see ScoreProducer.h
bool OOVFeatureEnabled () const
float GetWeight () const
float GetOOVWeight () const
std::string GetScoreProducerWeightShortName (unsigned) const
 returns the weight parameter name of this producer (used in n-best list)
virtual void InitializeBeforeSentenceProcessing ()
virtual void CleanUpAfterSentenceProcessing ()
virtual const FFStateEmptyHypothesisState (const InputType &input) const =0
 return the state associated with the empty hypothesis for a given sentence
virtual bool Useable (const Phrase &phrase) const =0
virtual void CalcScore (const Phrase &phrase, float &fullScore, float &ngramScore, std::size_t &oovCount) const =0

Protected Member Functions

 LanguageModel ()
void Init (ScoreIndexManager &scoreIndexManager)

Protected Attributes

bool m_enableOOVFeature


Detailed Description

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

Definition at line 38 of file Base.h.


Constructor & Destructor Documentation

Moses::LanguageModel::LanguageModel (  )  [protected]

Definition at line 35 of file Base.cpp.

References Moses::StaticData::GetLMEnableOOVFeature(), Moses::StaticData::Instance(), and m_enableOOVFeature.

Here is the call graph for this function:

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

Definition at line 43 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]

Referenced by Moses::LMList::CalcScore().

Here is the caller graph for this function:

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

Reimplemented in Moses::LMRefCount.

Definition at line 69 of file Base.h.

Referenced by Moses::TranslationSystem::CleanUpAfterSentenceProcessing().

Here is the caller graph for this function:

virtual LanguageModel* Moses::LanguageModel::Duplicate ( ScoreIndexManager scoreIndexManager  )  const [pure virtual]

Implemented in Moses::LMRefCount.

Referenced by Moses::StaticData::LoadLanguageModels().

Here is the caller graph for this function:

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

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

Implements Moses::StatefulFeatureFunction.

Implemented in Moses::LMRefCount.

size_t Moses::LanguageModel::GetNumScoreComponents (  )  const [virtual]

see ScoreProducer.h

Implements Moses::ScoreProducer.

Definition at line 46 of file Base.cpp.

References m_enableOOVFeature.

float Moses::LanguageModel::GetOOVWeight (  )  const

Definition at line 60 of file Base.cpp.

References Moses::StaticData::GetAllWeights(), Moses::ScoreProducer::GetScoreBookkeepingID(), Moses::StaticData::GetScoreIndexManager(), Moses::StaticData::Instance(), and m_enableOOVFeature.

Referenced by Moses::LMList::CalcScore().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Moses::LanguageModel::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 63 of file Base.h.

float Moses::LanguageModel::GetWeight (  )  const

Definition at line 54 of file Base.cpp.

References Moses::StaticData::GetAllWeights(), Moses::ScoreProducer::GetScoreBookkeepingID(), Moses::StaticData::GetScoreIndexManager(), and Moses::StaticData::Instance().

Referenced by Moses::LMList::CalcScore().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::LanguageModel::Init ( ScoreIndexManager scoreIndexManager  )  [protected]

Definition at line 39 of file Base.cpp.

References Moses::ScoreIndexManager::AddScoreProducer().

Referenced by Moses::LMRefCount::LMRefCount().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in Moses::LMRefCount.

Definition at line 67 of file Base.h.

Referenced by Moses::TranslationSystem::InitializeBeforeSentenceProcessing().

Here is the caller graph for this function:

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

Definition at line 56 of file Base.h.

References m_enableOOVFeature.

Referenced by Moses::LanguageModelImplementation::Evaluate().

Here is the caller graph for this function:

virtual bool Moses::LanguageModel::Useable ( const Phrase phrase  )  const [pure virtual]

Implemented in Moses::LMRefCount.

Referenced by Moses::LMList::CalcScore().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 45 of file Base.h.

Referenced by GetNumScoreComponents(), GetOOVWeight(), LanguageModel(), and OOVFeatureEnabled().


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

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