nltk学习第一章
一,入门
1,nltk包的导入和报的下载
import nltk
nltk.download() (eg: nltk.download(‘punkt’),也可以指定下载那个包)
2,book图书集,是一些数据,
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
text1
<Text: Moby Dick by Herman Melville 1851>
Python自然语言处理-nltk初学者指南

本文是关于Python自然语言处理库nltk的学习笔记,涵盖了nltk的基本操作,如导入、数据集加载、文本搜索、上下文检索、频率计数、词语搭配和词意消岐等概念。
最低0.47元/天 解锁文章
1127

被折叠的 条评论
为什么被折叠?



