2017年9月29日

中文统计

摘要: import jieba txt=open('a.txt','r',encoding='utf-8').read() words=list(jieba.cut(txt)) print(words) d={} for w in words: if len(w)==1: continue else: d[w]=d.get(w,0)+1#去除单个... 阅读全文

posted @ 2017-09-29 09:52 张木清 阅读(93) 评论(0) 推荐(0) 编辑

导航