A processing interface for assigning a probability to the next
word.
|
|
|
|
|
train(self,
text)
Train the model on the text. |
source code
|
|
|
|
probability(self,
word,
context)
Evaluate the probability of this word in this context. |
source code
|
|
|
|
choose_random_word(self,
context)
Randomly select a word that is likely to appear in this context. |
source code
|
|
|
|
entropy(self,
text)
Evaluate the total entropy of a message with respect to the model. |
source code
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|