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

lemur::langmod::OneStepMarkovChain Class Reference

One step markov chain translation model, not fully tested yet. More...

#include <OneStepMarkovChain.hpp>

List of all members.

Public Member Functions

 OneStepMarkovChain (const lemur::utility::WeightedIDSet &docSet, const lemur::api::Index &homeIndex, double *wdNorm, double stopProbAlpha)
 construct a MC restricted to a subset of docs

 ~OneStepMarkovChain ()
Iteration support
void startFromWordIteration (lemur::api::TERMID_T toWord) const
 Start iteration over w's for t(toWord |w).

bool hasMoreFromWord () const
void nextFromWordProb (lemur::api::TERMID_T &fromWord, double &prob) const
 Fetch the next word and the prob of "translating" it to the toWord.

Private Member Functions

void computeFromWordProb (lemur::api::TERMID_T toWord) const

Private Attributes

const lemur::api::Indexind
double alpha
int * dSet
double * norm
double * fromWordPr
lemur::api::TERMID_T itPos
lemur::api::TERMID_T curToWord

Detailed Description

One step markov chain translation model, not fully tested yet.

This code is included mainly to illustrate how the toolkit can be used for estimating such models.

Constructor & Destructor Documentation

lemur::langmod::OneStepMarkovChain::OneStepMarkovChain const lemur::utility::WeightedIDSet docSet,
const lemur::api::Index homeIndex,
double *  wdNorm,
double  stopProbAlpha

construct a MC restricted to a subset of docs

lemur::langmod::OneStepMarkovChain::~OneStepMarkovChain  ) 

Member Function Documentation

void lemur::langmod::OneStepMarkovChain::computeFromWordProb lemur::api::TERMID_T  toWord  )  const [private]

bool lemur::langmod::OneStepMarkovChain::hasMoreFromWord  )  const [inline]

void lemur::langmod::OneStepMarkovChain::nextFromWordProb lemur::api::TERMID_T fromWord,
double &  prob

Fetch the next word and the prob of "translating" it to the toWord.

void lemur::langmod::OneStepMarkovChain::startFromWordIteration lemur::api::TERMID_T  toWord  )  const

Start iteration over w's for t(toWord |w).

Given a word, this provides a way to access the translation probability from any word to this word. E.g., given w, each iteration would give us t(w|w1), t(w|w2), ..., t(w|w_n).

Member Data Documentation

double lemur::langmod::OneStepMarkovChain::alpha [private]

lemur::api::TERMID_T lemur::langmod::OneStepMarkovChain::curToWord [mutable, private]

int* lemur::langmod::OneStepMarkovChain::dSet [private]

double* lemur::langmod::OneStepMarkovChain::fromWordPr [mutable, private]

const lemur::api::Index& lemur::langmod::OneStepMarkovChain::ind [private]

lemur::api::TERMID_T lemur::langmod::OneStepMarkovChain::itPos [mutable, private]

double* lemur::langmod::OneStepMarkovChain::norm [private]

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