Home | Trees | Indices | Help |
|
---|
|
object --+ | list --+ | Text
A text object, which can be loaded with a sequence of words, and which supports counting, concordancing, collocation discovery, etc. This class is intended to support initial exploration of texts. It is initialized with a list of words, e.g.:
>>> moby = Text(nltk.corpus.gutenberg.words('melville-moby_dick.txt'))
Many of the methods simply print their results, and are intended for use via the interactive console.
|
|||
new list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
string |
|
||
string |
|
||
Inherited from Inherited from |
|
|||
Inherited from |
|
Create a Text object.
|
Print a concordance for the word with the specified context window.
|
Print collocations derived from the text.
|
Print random text, generated using a trigram language model.
|
Distributional similarity: find other words which appear in the same contexts as the specified word.
|
str(x)
|
repr(x)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:58 2008 | http://epydoc.sourceforge.net |