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

lemur::langmod::UnigramLM Class Reference

Abstract Unigram Language Model class. More...

#include <UnigramLM.hpp>

Inheritance diagram for lemur::langmod::UnigramLM:

lemur::langmod::SmoothedMLEstimator lemur::langmod::DirichletUnigramLM lemur::langmod::InterpUnigramLM lemur::langmod::LaplaceUnigramLM lemur::langmod::MLUnigramLM List of all members.

Public Member Functions

virtual double prob (lemur::api::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 (lemur::api::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 lemur::langmod::UnigramLM::hasMore  )  const [pure virtual]
 

Implemented in lemur::langmod::SmoothedMLEstimator.

virtual const string lemur::langmod::UnigramLM::lexiconID  )  const [pure virtual]
 

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

Implemented in lemur::langmod::SmoothedMLEstimator.

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

Implemented in lemur::langmod::SmoothedMLEstimator.

virtual double lemur::langmod::UnigramLM::prob lemur::api::TERMID_T  wordIndex  )  const [pure virtual]
 

return p(w)

Implemented in lemur::langmod::SmoothedMLEstimator.

virtual void lemur::langmod::UnigramLM::startIteration  )  const [pure virtual]
 

iteration over non-zero probability entries

Implemented in lemur::langmod::SmoothedMLEstimator.


The documentation for this class was generated from the following file:
Generated on Tue Jun 15 11:03:06 2010 for Lemur by doxygen 1.3.4