会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
flow-laic
博客园
首页
新随笔
联系
订阅
管理
2020年11月14日
jieba 分词--西游记相关的分词,统计出现次数最高的20个。
摘要: import jieba txt = open("《西游记》.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for word
阅读全文
posted @ 2020-11-14 23:14 flow-laic
阅读(514)
评论(0)
推荐(0)
编辑
公告