#include <OneStepMarkovChain.hpp>
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::Index & | ind |
double | alpha |
int * | dSet |
double * | norm |
double * | fromWordPr |
lemur::api::TERMID_T | itPos |
lemur::api::TERMID_T | 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). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|