kgrams
0.1.0
|
Maximum-Likelihood continuation probability smoother. More...
#include <Smoothers.h>
Public Member Functions | |
MLSmoother (kgramFreqs &f) | |
Initialize an AddkSmoother from a kgramFreqs object with a fixed constant 'k'. More... | |
double | operator() (const std::string &word, std::string context) |
Return Maximum-Likelihood continuation probability of a word given a context. More... | |
Friends | |
class | Sampler< MLSmoother > |
Maximum-Likelihood continuation probability smoother.
|
inline |
Initialize an AddkSmoother from a kgramFreqs object with a fixed constant 'k'.
f | a kgramFreqs class object. k-gram frequency table from which "bare" k-gram counts are read off. |
|
inline |
Return Maximum-Likelihood continuation probability of a word given a context.
word | A string. Word for which the continuation probability is to be computed. |
context | A string. Context conditioning the probability of 'word'. |