记录一次pyspark中nltk中的错误
在使用nltk时两种下载方式
- 在github中下载
- 使用nltk.download()下载
GitHub下载地址不记录。
- 在执行nltk.download()的时候报出异常
需要在Server index中设置地址http://www.nltk.org/nltk_data/
点击Refresh
stopwords在Corpora下
需要解压到对应目录下
在使用stopwords时大概的报错信息如下
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "D:\pycharm\PyCharm 2021.3.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\pycharm\PyCharm 2021.3.2\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 19, in execfile
exec(compile