#include <OneStepMarkovChain.hpp>
Public Methods | |
| OneStepMarkovChain (const WeightedIDSet &docSet, const Index &homeIndex, double *wdNorm, double stopProbAlpha) | |
| construct a MC restricted to a subset of docs | |
| ~OneStepMarkovChain () | |
Iteration support | |
| void | startFromWordIteration (int toWord) const |
| Start iteration over w's for t(toWord |w). | |
| bool | hasMoreFromWord () const |
| void | nextFromWordProb (int &fromWord, double &prob) const |
| Fetch the next word and the prob of "translating" it to the toWord. | |
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.18