Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SmoothedMLEstimator Class Reference

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

#include <UnigramLM.hpp>

Inheritance diagram for SmoothedMLEstimator:

UnigramLM DirichletUnigramLM InterpUnigramLM LaplaceUnigramLM MLUnigramLM List of all members.

Public Methods

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

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

virtual bool hasMore () const
virtual void nextWordProb (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 (TERMID_T wordIndex, double wdCount, double sumCount) const=0
 individual model differs in its implementation of probEstimate() method


Protected Attributes

const Counterct
const string lexID

Detailed Description

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


Constructor & Destructor Documentation

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

virtual SmoothedMLEstimator::~SmoothedMLEstimator   [inline, virtual]
 


Member Function Documentation

virtual bool SmoothedMLEstimator::hasMore   const [inline, virtual]
 

Implements UnigramLM.

virtual const string SmoothedMLEstimator::lexiconID   [inline, virtual]
 

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

Implements UnigramLM.

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

Implements UnigramLM.

virtual double SmoothedMLEstimator::prob TERMID_T    wordIndex const [inline, virtual]
 

return p(w)

Implements UnigramLM.

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

individual model differs in its implementation of probEstimate() method

Implemented in MLUnigramLM, LaplaceUnigramLM, DirichletUnigramLM, and InterpUnigramLM.

virtual void SmoothedMLEstimator::startIteration   [inline, virtual]
 

iteration over non-zero probability entries

Implements UnigramLM.


Member Data Documentation

const Counter& SmoothedMLEstimator::ct [protected]
 

const string SmoothedMLEstimator::lexID [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Nov 3 12:59:55 2004 for Lemur Toolkit by doxygen1.2.18