Using NLTK, how to get a dispersion plot of a list?
nltk, python
Solution
In using my own corpora, it should be loaded as:
myText = nltk.Text(...)
I can then use the additional class-based functions such as `.concordance()`, etc.
Problem
Using the NLTK imported data, I can call `text1.dispersion_plot(...)`, however I'm unable to use the `dispersion_plot()` function on a list of words/tokens. I'm starting out with plain text achieved by: ``` tokens = nltk.word_tokenize(...) ``` Which returns a list type. `text1` in the NLTK book's context is of type `class 'nltk.text.Text'`. How can I use `dispersion_plot()` and other functions on my own text?