Python《紅樓夢》人物出場統計

import jieba txt = open ("紅樓夢.txt","r",encoding='utf-8').read() words =jieba.lcut(txt) counts ={} for word in words: if len(word) ==1: #排除單個字符的分詞結果 continue else: counts[word
相關文章
相關標籤/搜索