赞
踩
首先手动下载nltk数据集(所有的)
nltk官方网站github下载
或者直接下载下面的文件包
https://pan.baidu.com/s/1oUsf-FgVAZnQAtZWRwiK4w 提取码:9sor
(感谢@Irene 提供的数据)
然后把下载好的压缩包解压至上图中的Download Directory目录下,即
C:\Users\Administrator\AppData\Roaming\nltk_data
或
C:\nltk_data
D:\nltk_data
E:\nltk_data
目录下,每个人的机子这个地方可能不一样。
安装成功
安装成功后,在命令行界面输入以下命令:
from nltk.book import *
如果输出提示语句:
*** Introductory Examples for the NLTK Book ***
Loading text1, ..., text9 and sent1, ..., sent9
Type the name of the text or sentence to view it.
Type: 'texts()' or 'sents()' to list the materials.
text1: Moby Dick by Herman Melville 1851
text2: Sense and Sensibility by Jane Austen 1811
text3: The Book of Genesis
text4: Inaugural Address Corpus
text5: Chat Corpus
text6: Monty Python and the Holy Grail
text7: Wall Street Journal
text8: Personals Corpus
text9: The Man Who Was Thursday by G . K . Chesterton 1908
说明安装成功,可以进一步进行使用。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。