Main Page   Namespace List   Class Hierarchy   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 (Counter &counter,const char *lexiconID)
virtual ~SmoothedMLEstimator ()
virtual double prob (int wordIndex)
 return p(w).

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

virtual bool hasMore ()
virtual void nextWordProb (int &wordIndex,double &prob)
virtual const char* lexiconID ()
 return a string ID of the lexicon on which the word index should be interpreted.

virtual double probEstimate (int wordIndex,double wdCount,double sumCount)=0
 individual model differs in its implementation of probEstimate() method.


Protected Attributes

Counterct
const char* lexID

Detailed Description

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


Constructor & Destructor Documentation

SmoothedMLEstimator::SmoothedMLEstimator ( Counter & counter,
const char * lexiconID ) [inline]
 

SmoothedMLEstimator::~SmoothedMLEstimator ( ) [inline, virtual]
 


Member Function Documentation

bool SmoothedMLEstimator::hasMore ( ) [inline, virtual]
 

Reimplemented from UnigramLM.

const char * SmoothedMLEstimator::lexiconID ( ) [inline, virtual]
 

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

Reimplemented from UnigramLM.

void SmoothedMLEstimator::nextWordProb ( int & wordIndex,
double & prob ) [inline, virtual]
 

Reimplemented from UnigramLM.

double SmoothedMLEstimator::prob ( int wordIndex ) [inline, virtual]
 

return p(w).

Reimplemented from UnigramLM.

double SmoothedMLEstimator::probEstimate ( int wordIndex,
double count,
double sum ) [pure virtual]
 

individual model differs in its implementation of probEstimate() method.

Reimplemented in MLUnigramLM, LaplaceUnigramLM, DirichletUnigramLM, and InterpUnigramLM.

void SmoothedMLEstimator::startIteration ( ) [inline, virtual]
 

iteration over non-zero probability entries.

Reimplemented from UnigramLM.


Member Data Documentation

Counter & SmoothedMLEstimator::ct [protected]
 

const char * SmoothedMLEstimator::lexID [protected]
 


The documentation for this class was generated from the following file:
Generated at Fri Jul 26 18:22:59 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000