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

UnigramLM Class Reference

Abstract Unigram Language Model class. More...

#include <UnigramLM.hpp>

Inheritance diagram for UnigramLM:

SmoothedMLEstimator DirichletUnigramLM InterpUnigramLM LaplaceUnigramLM MLUnigramLM List of all members.

Public Methods

virtual double prob (int wordIndex)=0
 return p(w).

virtual const char* lexiconID ()=0
 return a string ID of the lexicon on which the word index should be interpreted.

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

virtual bool hasMore ()=0
virtual void nextWordProb (int &wordIndex,double &prob)=0

Detailed Description

Abstract Unigram Language Model class.

The index range ([0,N]) is assumed to be defined by the lexicon. The caller is responsible for boundary check if necessary. Any undefined index would have a zero probability.


Member Function Documentation

virtual bool UnigramLM::hasMore ( ) [pure virtual]
 

Reimplemented in SmoothedMLEstimator.

const char * UnigramLM::lexiconID ( ) [pure virtual]
 

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

Reimplemented in SmoothedMLEstimator.

virtual void UnigramLM::nextWordProb ( int & wordIndex,
double & prob ) [pure virtual]
 

Reimplemented in SmoothedMLEstimator.

double UnigramLM::prob ( int wordIndex ) [pure virtual]
 

return p(w).

Reimplemented in SmoothedMLEstimator.

void UnigramLM::startIteration ( ) [pure virtual]
 

iteration over non-zero probability entries.

Reimplemented in SmoothedMLEstimator.


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