統計文本中特定詞彙的出現頻率

import jieba txt=open('threekingdoms.txt','r',encoding='gb18030').read() excludes={'將軍','卻說','荊州','二人','不可','不能','如此'} words=jieba.lcut(txt) counts={} for word in words: if len(word)==1: c
相關文章
相關標籤/搜索