Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::langmod::SmoothedMLEstimator Class Reference

Common implementation of a (smoothed) unigram LM estimated based on a counter. More...

#include <UnigramLM.hpp>

Inheritance diagram for lemur::langmod::SmoothedMLEstimator:

lemur::langmod::UnigramLM lemur::langmod::DirichletUnigramLM lemur::langmod::InterpUnigramLM lemur::langmod::LaplaceUnigramLM lemur::langmod::MLUnigramLM List of all members.

Public Member Functions

 SmoothedMLEstimator (const lemur::utility::Counter &counter, const string &lexiconID)
virtual ~SmoothedMLEstimator ()
virtual double prob (lemur::api::TERMID_T wordIndex) const
 return p(w)

virtual void startIteration () const
 iteration over non-zero probability entries

virtual bool hasMore () const
virtual void nextWordProb (lemur::api::TERMID_T &wordIndex, double &prob) const
virtual const string lexiconID () const
 return a string ID of the lexicon on which the word index should be interpreted

virtual double probEstimate (lemur::api::TERMID_T wordIndex, double wdCount, double sumCount) const =0
 individual model differs in its implementation of probEstimate() method


Protected Attributes

const lemur::utility::Counterct
const string lexID

Detailed Description

Common implementation of a (smoothed) unigram LM estimated based on a counter.


Constructor & Destructor Documentation

lemur::langmod::SmoothedMLEstimator::SmoothedMLEstimator const lemur::utility::Counter counter,
const string &  lexiconID
[inline]
 

virtual lemur::langmod::SmoothedMLEstimator::~SmoothedMLEstimator  )  [inline, virtual]
 


Member Function Documentation

virtual bool lemur::langmod::SmoothedMLEstimator::hasMore  )  const [inline, virtual]
 

Implements lemur::langmod::UnigramLM.

virtual const string lemur::langmod::SmoothedMLEstimator::lexiconID  )  const [inline, virtual]
 

return a string ID of the lexicon on which the word index should be interpreted

Implements lemur::langmod::UnigramLM.

virtual void lemur::langmod::SmoothedMLEstimator::nextWordProb lemur::api::TERMID_T wordIndex,
double &  prob
const [inline, virtual]
 

Implements lemur::langmod::UnigramLM.

virtual double lemur::langmod::SmoothedMLEstimator::prob lemur::api::TERMID_T  wordIndex  )  const [inline, virtual]
 

return p(w)

Implements lemur::langmod::UnigramLM.

virtual double lemur::langmod::SmoothedMLEstimator::probEstimate lemur::api::TERMID_T  wordIndex,
double  wdCount,
double  sumCount
const [pure virtual]
 

individual model differs in its implementation of probEstimate() method

Implemented in lemur::langmod::MLUnigramLM, lemur::langmod::LaplaceUnigramLM, lemur::langmod::DirichletUnigramLM, and lemur::langmod::InterpUnigramLM.

virtual void lemur::langmod::SmoothedMLEstimator::startIteration  )  const [inline, virtual]
 

iteration over non-zero probability entries

Implements lemur::langmod::UnigramLM.


Member Data Documentation

const lemur::utility::Counter& lemur::langmod::SmoothedMLEstimator::ct [protected]
 

const string lemur::langmod::SmoothedMLEstimator::lexID [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Jun 15 11:03:06 2010 for Lemur by doxygen 1.3.4