我已经matplotlib在ubuntu 14.04 LTS中使用pip 安装..但是在运行时dispersion_plot显示以下错误..
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/nltk/text.py", line 455, in dispersion_plot
from nltk.draw import dispersion_plot
ImportError: cannot import name dispersion_plot
Run Code Online (Sandbox Code Playgroud)
我是新来的蟒蛇......任何人都可以提出,如果有安装一个更好的方式matplotlib在nltk.
我正在使用python通过NLP,我发现以下错误:
babelize_shell()
NLTK Babelizer: type 'help' for a list of commands.
Babel> how long before the next flight to Alice Springs?
Babel> german
Babel> run
0> how long before the next flight to Alice Springs?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/nltk/misc/babelfish.py", line 175, in babelize_shell
for count, new_phrase in enumerate(babelize(phrase, 'english', language)):
File "/usr/local/lib/python2.7/dist-packages/nltk/misc/babelfish.py", line 126, in babelize
phrase = translate(phrase, next, flip[next])
File "/usr/local/lib/python2.7/dist-packages/nltk/misc/babelfish.py", line 106, in translate
if not match: raise …Run Code Online (Sandbox Code Playgroud)