小编laz*_*rus的帖子

尽管安装了matplotlib,dispersion_plot也无法正常工作

我已经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)

我是新来的蟒蛇......任何人都可以提出,如果有安装一个更好的方式matplotlibnltk.

nltk python-2.7

5
推荐指数
1
解决办法
2628
查看次数

babelize_shell()无效

我正在使用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)

python

4
推荐指数
1
解决办法
3403
查看次数

标签 统计

nltk ×1

python ×1

python-2.7 ×1