Shi*_*ngh 10 python nltk wordnet
我已经搜索过网络(包括显示与Heroku,Anaconda等类似问题的6个链接,但共同的根本原因 - 未找到资源语料库/ wordnet)并执行了所有我可以包括但不限于 -
即使经过3个小时的尝试,我也无处可去.我真的很感激,如果有人能指出如何成功运行Quepy示例(python main.py"谁是汤姆克鲁斯?")的位置:quepy/examples/dbpedia.这不是Quepy的问题,但为什么在地球上它找不到资源.
这是确切的错误 -
Resource u'corpora/wordnet' not found. Please use the NLTK
Downloader to obtain the resource: >>> nltk.download()
Searched in:
- 'home/ubuntu/nltk_data'
Run Code Online (Sandbox Code Playgroud)
注意 -
我在没有问题的情况下在另一台机器上成功安装它并且它正确运行但在初始机器上问题仍未解决,完全相同的步骤,应用程序的确切版本及其相关工具/依赖项.
即使没有在错误日志中显示,我的类路径也以nltk.data.path所观察到的斜杠开头
你的路径似乎不完整。在 Unix 文件系统中,完整路径始终以斜杠开头:/path/to/file/is/well-formed/example.txt。在学习时,使用 .shell 检查 shell(即命令行)中的完整路径始终是一个好习惯ls。
$ ls /path/to/example/file.txt
/path/to/example/file.txt
$ ls /this/one/is/not/there.txt
ls: /this/one/is/not/there.txt: No such file or directory
Run Code Online (Sandbox Code Playgroud)
如果你得到No such file or directory,那么你的路就不好了。