统计文本中特定词汇的出现频率

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
相关文章
相关标签/搜索