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]
 

virtual SmoothedMLEstimator::~SmoothedMLEstimator   [inline, virtual]
 


Member Function Documentation

virtual bool SmoothedMLEstimator::hasMore   [inline, virtual]
 

Implements UnigramLM.

virtual const char* 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 int &    wordIndex,
double &    prob
[inline, virtual]
 

Implements UnigramLM.

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

return p(w)

Implements UnigramLM.

virtual double SmoothedMLEstimator::probEstimate int    wordIndex,
double    wdCount,
double    sumCount
[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

Counter& SmoothedMLEstimator::ct [protected]
 

const char* SmoothedMLEstimator::lexID [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Sep 30 14:14:20 2002 for LEMUR by doxygen1.2.18