
NLTK
TtingZh
这个作者很懒,什么都没留下…
展开
-
用python进行自然语言处理的有用代码,存在个别错误(已经标出)
from __future__ import division from nltk.book import * # 在text1中找到相关词,并显示上下文 text1.concordance("monstrous") # 找到与其用法意义相似的词 text1.similar("monstrous") # 找与该集合相似的词 text1.common_contexts(["monstrous",...原创 2018-08-27 21:59:38 · 515 阅读 · 0 评论 -
Python Text Processing with NLTK 2.0 Cookbook中比较有用的代码
有这本书的童鞋能共享一下最新版本么 para="hello world. it's good to see you. thanks for buying this book" from nltk.tokenize import sent_tokenize print(sent_tokenize(para)) print("----------------------------") fro...原创 2018-08-24 20:40:48 · 346 阅读 · 0 评论