Python 中文文件統計詞頻 + 中文詞雲

1. 詞頻統計:html 1 import jieba 2 txt = open("threekingdoms3.txt", "r", encoding='utf-8').read() 3 words = jieba.lcut(txt) 4 counts = {} 5 for word in words: 6 if len(word) == 1: 7 con
相關文章
相關標籤/搜索