解决NLTK包下载出错问题及nltk测试
来源:互联网 发布:unity3d 文件格式 编辑:程序博客网 时间:2024/06/10 21:59
官方下载地址
http://www.nltk.org/nltk_data/
安装NLTK-Data
你可以作死的尝试:
>>>import nltk>>>nltk.download()
先点击Refresh,刷新下,之后选中all-corpora点击左下角下载就好,至于路径
要么在C盘中,要么在Python的根目录下!C盘根目录最靠谱!
这里才是正确的下载方式:最好的方法是用使用@V_can打包好的的包网盘下载下载地址1:云盘密码znx7,下来的包nltk_data.zip 解压到C盘根目录下,这样是最保险的,防止找不到包。下载地址2:云盘密码4cp3
NLTK测试
In[4]:from nltk.book import *# 只输入import nltk 会出错的,但却有很多博客上都这么写,我也母鸡
之后会出现如下显示:
*** Introductory Examples for the NLTK Book ***Loading text1, ..., text9 and sent1, ..., sent9Type the name of the text or sentence to view it.Type: 'texts()' or 'sents()' to list the materials.text1: Moby Dick by Herman Melville 1851text2: Sense and Sensibility by Jane Austen 1811text3: The Book of Genesistext4: Inaugural Address Corpustext5: Chat Corpustext6: Monty Python and the Holy Grailtext7: Wall Street Journaltext8: Personals Corpustext9: The Man Who Was Thursday by G . K . Chesterton 1908
继续测试输入:
In[5]:text1
会输出:
Out[5]: <Text: Moby Dick by Herman Melville 1851>
再测试输入:
In[6]: text1.concordance("monstrous")
输出:
Displaying 11 of 11 matches:ong the former , one was of a most monstrous size . ...
ok,这里就演示那么多,到此,NLP的环境就装好了,调试完毕,可以用于自己的实验了。
阅读全文
0 0
- 解决NLTK包下载出错问题及nltk测试
- 解决NLTK包下载出错问题及NLP环境测试
- NLTK下载
- NLTK
- nltk
- python自然语言处理nltk包离线下载
- ubuntu安装NLTK并且下载NLTK数据
- 词频统计包----nltk
- NLTK数据下载
- NLTK自然语言处理问题
- Pyhon 自然语言处理(一)NLTK及语料库下载
- 裂墙干货之jieba,wordcloud,nltk下载及安装
- 安装numpy、nltk问题汇总
- 安装numpy、nltk问题汇总
- 安装numpy、nltk问题汇总
- Python自然语言处理 NLTK包中的 text3.generate() 命令出错 'Text' object has no attribute 'generate'
- mac下 安装python包numpy, nltk
- Python的Nltk包安装使用
- 递归求解兔子对数问题
- Python语言入门(七)list集合切片体验Python语法简洁
- document.querySelector以及document.querySelectorAll中的转义符
- AVL树的插入和删除
- STM32基础知识3-STM32串口USART1的使用方法和程序
- 解决NLTK包下载出错问题及nltk测试
- Linux :service network restart :bringing up interface eth0:unknown connection
- 排序代码实现总结(1)--- 冒泡排序
- Spring 集成定时器quartz
- centos6.5-64bit安装htop
- 解决idea maven依赖不处理的办法
- Combining several static libraries into one using CMake
- 我对px em rem的简单理解
- Android屏幕适配的哪些事