Main Page   Namespace List   Class Hierarchy   Alphabetical List   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 (TERMID_T wordIndex) const=0
 return p(w)

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

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

virtual bool hasMore () const=0
virtual void nextWordProb (TERMID_T &wordIndex, double &prob) const=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]
 

Implemented in SmoothedMLEstimator.

virtual const string UnigramLM::lexiconID   [pure virtual]
 

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

Implemented in SmoothedMLEstimator.

virtual void UnigramLM::nextWordProb TERMID_T   wordIndex,
double &    prob
const [pure virtual]
 

Implemented in SmoothedMLEstimator.

virtual double UnigramLM::prob TERMID_T    wordIndex const [pure virtual]
 

return p(w)

Implemented in SmoothedMLEstimator.

virtual void UnigramLM::startIteration   [pure virtual]
 

iteration over non-zero probability entries

Implemented in SmoothedMLEstimator.


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