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

OneStepMarkovChain Class Reference

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

#include <OneStepMarkovChain.hpp>

List of all members.

Public Methods

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

 ~OneStepMarkovChain ()
Iteration support
void startFromWordIteration (int toWord)
 Start iteration over w's for t(toWord |w).

bool hasMoreFromWord ()
void nextFromWordProb (int &fromWord, double &prob)
 Fetch the next word and the prob of "translating" it to the toWord.


Private Methods

void computeFromWordProb (int toWord)

Private Attributes

Indexind
double alpha
int * dSet
double * norm
double * fromWordPr
int itPos
int 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

OneStepMarkovChain::OneStepMarkovChain WeightedIDSet   docSet,
Index   homeIndex,
double *    wdNorm,
double    stopProbAlpha
 

construct a MC restricted to a subset of docs

OneStepMarkovChain::~OneStepMarkovChain  
 


Member Function Documentation

void OneStepMarkovChain::computeFromWordProb int    toWord [private]
 

bool OneStepMarkovChain::hasMoreFromWord   [inline]
 

void OneStepMarkovChain::nextFromWordProb int &    fromWord,
double &    prob
 

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

void OneStepMarkovChain::startFromWordIteration int    toWord
 

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 OneStepMarkovChain::alpha [private]
 

int OneStepMarkovChain::curToWord [private]
 

int* OneStepMarkovChain::dSet [private]
 

double* OneStepMarkovChain::fromWordPr [private]
 

Index& OneStepMarkovChain::ind [private]
 

int OneStepMarkovChain::itPos [private]
 

double* OneStepMarkovChain::norm [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Feb 6 07:12:05 2004 for LEMUR by doxygen1.2.16