作业一
ubuntu向nltk中载入nltk_data
下载nltk_data并载入
- 通过github官网,下载速度较慢
import nltk
nltk.download()
-
手动方式下载
nltk_data压缩包百度网盘,下载完成后,解压缩。
import nltk
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
>>>
加载成功