打开文件,再用jieba库统计
import jieba with open("filename.txt","r") as f: data=f. read() word="".join(jieba. cut( data))