class documentation
class Smoothing: (source)
Known subclasses: nltk.lm.smoothing.KneserNey
, nltk.lm.smoothing.WittenBell
Constructor: Smoothing(vocabulary, counter)
Ngram Smoothing Interface
Implements Chen & Goodman 1995's idea that all smoothing algorithms have certain features in common. This should ideally allow smoothing algorithms to work both with Backoff and Interpolation.
Method | __init__ |
No summary |
Method | alpha |
Undocumented |
Method | unigram |
Undocumented |
Instance Variable | counts |
Undocumented |
Instance Variable | vocab |
Undocumented |
overridden in
nltk.lm.smoothing.KneserNey
, nltk.lm.smoothing.WittenBell
Parameters | |
vocabulary:nltk.lm.vocab.Vocabulary | The Ngram vocabulary object. |
counter:nltk.lm.counter.NgramCounter | The counts of the vocabulary items. |