![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
自然语言处理
tttmusic
这个作者很懒,什么都没留下…
展开
-
NLP with python 1 语言处理与python
1.1语言计算 文本和单词>>> from __future__ import division>>> 1/30.33333333333333331>>> import nltk>>> from nltk.book import *>>> text2.concordance("world")Displaying 25 of 93 matches:原创 2013-02-01 15:24:41 · 2613 阅读 · 0 评论 -
NLP with python 2 获取文本语料和词汇资源
1、获取文本语料库for fileid in gutenberg.fileids():num_chars = len(gutenberg.raw(fileid));num_words = len(gutenberg.words(fileid));num_sents = len(gutenberg.sents(fileid));num_vocab = len(set([w.low原创 2013-02-01 17:49:20 · 3526 阅读 · 0 评论 -
NLP with python 笔记 前言
为了加速,偷懒看中文版了我的想法是一天按照四个课时的任务完成。原创 2013-01-21 16:15:05 · 1945 阅读 · 0 评论 -
NLP with python 3 处理原始文本
1、从网络和硬盘访问文本>>> from urllib import urlopen>>> url = "http://www.gutenberg.org/files/2554/2554.txt">>> raw = urlopen(url).read()>>> type(raw)>>> len(raw)288>>> raw[:100]'\n\n403 Forbi原创 2013-02-20 15:04:14 · 2197 阅读 · 0 评论