博客
关于我
nltk.download(‘stopwords‘)报错,解决方案
阅读量:119 次
发布时间:2019-02-26

本文共 764 字,大约阅读时间需要 2 分钟。

nltk.download(‘stopwords’)报错,解决方案如下

#尝试网络下载,报错信息如下False[nltk_data] Error loading stopwords: 
False

1.解决方案

手动下载数据,并放在指定位置

下载地址:https://files-cdn.cnblogs.com/files/douzujun/stopwords.zip

下载解压之后放在哪里???

根据提示信息: 如下提示信息是在上面没有成功下载的情况下,试图使用nltk而报错提出的。

please use the NLTK Downloader to obtain the resource:nltk.download('stopwords')searched in:- '目录1'- '目录2'- ...- 'D:\\installation\\anaconda3'- 'D:\\installation\\anaconda3\\share\\nltk_data'

根据上述提示信息,我们将下载的文件解压:(上述任何一个满足即可)

例如:

  • 步骤1:我在D:\installation\anaconda3’目录下新建文件夹:nltk_data

  • 步骤2:在nltk_data文件夹中新建文件夹:corpora

综上:最终解压之后的文件放置位置为:

'D:\\installation\\anaconda3\\nltk_data\\corpora'

测试可用。两个代码块,False是说明没成功通过网络下载,下面的一个代码块,是在解决了问题之后运行代码的结果,所以没有出现有关放置目录的信息。

在这里插入图片描述

或者参考官方文档,

NLTK 3.5 官方文档参考连接:https://www.nltk.org/data.html

在这里插入图片描述

转载地址:http://jcbu.baihongyu.com/

你可能感兴趣的文章
Nginx 集成Zipkin服务链路追踪
查看>>
nginx 集群配置方式 静态文件处理
查看>>
Nginx+Django-Python+BPMN-JS的整合工作流实战项目
查看>>
Nginx+Keepalived实现简单版高可用主备切换
查看>>
nginx+mysql+redis+mongdb+rabbitmq 自动化部署脚本
查看>>
nginx+php的搭建
查看>>
nginx+tomcat+memcached
查看>>
Nginx+Tomcat实现动静分离
查看>>
nginx+Tomcat性能监控
查看>>
nginx+uwsgi+django
查看>>
nginx+vsftp搭建图片服务器
查看>>
Nginx-http-flv-module流媒体服务器搭建+模拟推流+flv.js在前端html和Vue中播放HTTP-FLV视频流
查看>>
nginx-vts + prometheus 监控nginx
查看>>
Nginx/Apache反向代理
查看>>
Nginx: 413 – Request Entity Too Large Error and Solution
查看>>
nginx: [emerg] getpwnam(“www”) failed 错误处理方法
查看>>
nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:
查看>>
nginx:Error ./configure: error: the HTTP rewrite module requires the PCRE library
查看>>
Nginx:objs/Makefile:432: recipe for target ‘objs/src/core/ngx_murmurhash.o‘解决方法
查看>>
Nginx、HAProxy、LVS
查看>>