python3统计词频程序

import re from collections import Counter txt = open("D:/a1.txt").read() new_txt = re.split('\W+', txt) result = Counter(new_txt) a = result.most_common(10) print(a) python3统计词频程序,可用。python
相关文章
相关标签/搜索