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
相關文章
相關標籤/搜索