会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
薛尚
博客园
首页
新随笔
联系
管理
订阅
2018年10月12日
完整的中英文词频统计
摘要: #读取fire文本文件 f = open('fire.txt','r',encoding='utf-8') fire = f.read() f.close() print(fire) #预处理 print(fire.lower()) #全部字母小写 a = ",.;:'`" #特殊符号归集为字符串 for b in a: fire.replace(b,' ') #利用for循环...
阅读全文
posted @ 2018-10-12 00:47 薛尚
阅读(193)
评论(0)
推荐(0)
编辑
公告