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
相關文章
相關標籤/搜索