Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Installing NLTK
-
Playing with it some more I've found that it also wants Tkinter. Depending on which packages you load you might get a warning:
Documents/site-packages/nltk/draw/__init__.py:14: UserWarning: nltk.draw package not loaded (please install Tkinter library). warnings.warn("nltk.draw package not loaded "
So text#.dispersion_plot() won't work, but oddly FreqDist(text#).plot(#) does. Evidently plot uses Matplotlib, but dispersion_plot() uses Tkinter.
-
Spoke too soon. I changed line 456 in nltk.text.py to
from nltk.draw.dispersion import dispersion_plot
And now the dispersion_plot works. Not sure what in the draw package requires Tkinter, but that wasn't it.