Coverage for nltk.model.api : 54%
![](keybd_closed.png)
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Natural Language Toolkit: API for Language Models # # Copyright (C) 2001-2012 NLTK Project # Author: Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT
# should this be a subclass of ConditionalProbDistI?
""" A processing interface for assigning a probability to the next word. """
'''Create a new language model.''' raise NotImplementedError()
'''Evaluate the probability of this word in this context.''' raise NotImplementedError()
'''Evaluate the (negative) log probability of this word in this context.''' raise NotImplementedError()
'''Randomly select a word that is likely to appear in this context.''' raise NotImplementedError()
'''Generate n words of text from the language model.''' raise NotImplementedError()
'''Evaluate the total entropy of a message with respect to the model. This is the sum of the log probability of each word in the message.''' raise NotImplementedError()
|