我正在尝试在Heroku上使用NLTK和wordnet。我已经完成了
heroku run python
nltk.download()
wordnet
pip install -r requirements.txt
但是我得到了这个错误:
Resource 'corpora/wordnet' not found. Please use the NLTK
Downloader to obtain the resource: >>> nltk.download()
Searched in:
- '/app/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
不过,我查看了/app/nltk_data目录,并且它确实存在,所以我不确定发生了什么事情。