#include <OneStepMarkovChain.hpp>
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 | |
| Index & | ind |
| double | alpha |
| int * | dSet |
| double * | norm |
| double * | fromWordPr |
| int | itPos |
| int | curToWord |
This code is included mainly to illustrate how the toolkit can be used for estimating such models.
|
||||||||||||||||||||
|
construct a MC restricted to a subset of docs
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Fetch the next word and the prob of "translating" it to the 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). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.16