Heroku和NLKT?

问题描述

我的nltk.txt文件包含我需要的模块,但是由于某些原因,我不断出现这些崩溃?即使我在nltk.txt中也有punkt

2020-08-17T07:40:45.191758+00:00 app[worker.1]:     raise LookupError(resource_not_found)
2020-08-17T07:40:45.191774+00:00 app[worker.1]: LookupError: 
2020-08-17T07:40:45.191775+00:00 app[worker.1]: **********************************************************************
2020-08-17T07:40:45.191775+00:00 app[worker.1]:   Resource [93mpunkt[0m not found.
2020-08-17T07:40:45.191775+00:00 app[worker.1]:   Please use the NLTK Downloader to obtain the resource:
2020-08-17T07:40:45.191775+00:00 app[worker.1]: 
2020-08-17T07:40:45.191776+00:00 app[worker.1]:   [31m>>> import nltk
2020-08-17T07:40:45.191776+00:00 app[worker.1]:   >>> nltk.download('punkt')
2020-08-17T07:40:45.191777+00:00 app[worker.1]:   [0m
2020-08-17T07:40:45.191777+00:00 app[worker.1]:   For more information see: https://www.nltk.org/data.html
2020-08-17T07:40:45.191777+00:00 app[worker.1]: 
2020-08-17T07:40:45.191777+00:00 app[worker.1]:   Attempted to load [93mtokenizers/punkt/PY3/english.pickle[0m
2020-08-17T07:40:45.191778+00:00 app[worker.1]: 
2020-08-17T07:40:45.191778+00:00 app[worker.1]:   Searched in:
2020-08-17T07:40:45.191778+00:00 app[worker.1]:     - '/app/.heroku/python/nltk_data'
2020-08-17T07:40:45.191778+00:00 app[worker.1]:     - '/app/nltk_data'
2020-08-17T07:40:45.191778+00:00 app[worker.1]:     - '/app/.heroku/python/nltk_data'
2020-08-17T07:40:45.191779+00:00 app[worker.1]:     - '/app/.heroku/python/share/nltk_data'
2020-08-17T07:40:45.191779+00:00 app[worker.1]:     - '/app/.heroku/python/lib/nltk_data'
2020-08-17T07:40:45.191779+00:00 app[worker.1]:     - '/usr/share/nltk_data'
2020-08-17T07:40:45.191779+00:00 app[worker.1]:     - '/usr/local/share/nltk_data'
2020-08-17T07:40:45.191779+00:00 app[worker.1]:     - '/usr/lib/nltk_data'
2020-08-17T07:40:45.191780+00:00 app[worker.1]:     - '/usr/local/lib/nltk_data'
2020-08-17T07:40:45.191780+00:00 app[worker.1]:     - ''
2020-08-17T07:40:45.191780+00:00 app[worker.1]: *********************************************************************

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)