Python jieba中文分词的使用

Python jieba 中文分词的使用 使用jieba分词来实现《本草纲目》里面常用药材。 #得出不需要的常用词首先你要下载一份《本草纲目》.txt,这样程序才能正常运行 import jieba txt=open(‘本草纲目.txt’,‘rb’).read() words=jieba.lcut(txt) counts={} print(words) for word in words: if
相关文章
相关标签/搜索