nltk.ConcordanceIndex
¶
-
class
nltk.
ConcordanceIndex
(tokens, key=<function <lambda>>)[source]¶ An index that can be used to look up the offset locations at which a given word occurs in a document.
Methods¶
__init__ (tokens[, key]) |
Construct a new concordance index. | ||
offsets (word) |
|
||
print_concordance (word[, width, lines]) |
Print a concordance for word with the specified context window. |
||
tokens () |
|
||
unicode_repr () |