NLTK入门学习笔记
来源:互联网 发布:directx 9.0修复软件 编辑:程序博客网 时间:2024/05/22 10:30
参考http://hao.jobbole.com/nltk/ 作为自己的NLTK的入门篇,演练其代码,记录代码执行过程中的一些问题,以及应对方法;
Anaconda2\python.exe(上机环境)
1.刚调用nltk的word_tokenize就raise一个如下Error
LookupError:
Resource u’tokenizers/punkt/english.pickle’ not found. Please
use the NLTK Downloader to obtain the resource: >>>
nltk.download()
解决办法:
I had this same problem. Go into a python shell and type:
import nltk
nltk.download()
Then an installation window appears. Go to the ‘Models’ tab and select ‘punkt’ from under the ‘Identifier’ column. Then click Download and it will install the necessary files. Then it should work!
下载完punkt之后,word_tokenize可以分词成功了,但是执行pos_tag又报出找不到数据的错误,于是按照上面的步骤下载有Tagger字样的Model;
这类的问题好解决,也就是在使用nltk时,遇到什么报错就参考上面的步骤下载对应的包。
待续。。
- NLTK入门学习笔记
- nltk 学习入门
- NLTK学习笔记
- NLTK 学习笔记(3)
- NLTK学习笔记
- NLTK学习笔记
- NLTK学习笔记
- NLTK 学习笔记(1)
- NLTK 学习笔记(2)
- NLTK 学习笔记(4)
- NLTK 学习笔记(5)
- NLTK学习笔记(6)
- Python NLTK 学习笔记0
- Python NLTK 学习笔记1
- NLTK学习笔记(三):NLTK的一些工具
- NLTK学习笔记(三):NLTK的一些工具
- nltk入门
- nltk入门
- HDOJ 1530 Maximum Clique(最大团模板题)
- 教材中没讲的goto语句
- SNMPv3原理-SNMPv3协议框架
- Codeforces777A Shell Game
- uniq指令详解
- NLTK入门学习笔记
- java集合系列12 Map
- 界面平移效果
- thinkphp create方法 用法 详解
- 总结Yii2.0中的Url::to(), Url::toRoute(), Url::current()用法
- index of Practical Software Engineering
- P1028--01背包
- Android 支付宝和微信支付集成
- linux-001之头文件signal.h