词频统计

from  collections import Counter
import re
filename='中国姓名.txt'

words=re.findall('\w+',open(filename).read().lower())

str=Counter(words).most_common(100)
print(str)

 

posted @ 2020-05-18 16:40  王者2  阅读(148)  评论(0编辑  收藏  举报