码迷,mamicode.com
首页 >  
搜索关键字:综合练习    ( 214个结果
综合练习:词频统计
综合练习 词频统计预处理 下载一首英文的歌词或文章 将所有,.?!’:等分隔符全部替换为空格 结果如下: Love and hatenever failed to seize the dayDon t give yourself awayOh when the night fallsAnd your ...
分类:其他好文   时间:2018-03-26 12:37:50    阅读次数:152
综合练习:词频统计
f=open('/Users/Administrator/Desktop/we.txt','r') text=f.read() f.close() print(text) rep = ''',.!:?''' exclude={'a','the','for','in','i','my','that',... ...
分类:其他好文   时间:2018-03-26 12:37:25    阅读次数:105
综合练习:词频统计
file = open('song.txt', 'r') # 只读打开文件 lyrics = file.read() # 读取文件内容 file.close() # 关闭文件资源 sep=''',.?!:'-''' for c in sep: song = song.replace(c,'') wo ...
分类:其他好文   时间:2018-03-26 12:35:50    阅读次数:125
综合练习:词频统计
song = ''' just colse your eyes,the sun is going down you‘ll be all right,no one can hurt you now come morning light ,you and i ’ll be safe and sound ...
分类:其他好文   时间:2018-03-26 12:35:17    阅读次数:159
综合练习:词频统计
综合练习 词频统计预处理 下载一首英文的歌词或文章 将所有,.?!’:等分隔符全部替换为空格 将所有大写转换为小写 生成单词列表 生成词频统计 排序 排除语法型词汇,代词、冠词、连词 输出词频最大TOP20 将分析对象存为utf-8编码的文件,通过文件读取的方式获得词频分析内容。 ...
分类:其他好文   时间:2018-03-26 12:33:13    阅读次数:127
综合练习:英文词频统计
截图: ...
分类:其他好文   时间:2018-03-26 12:29:12    阅读次数:126
综合练习:词频统计
C:\Users\Administrator\PycharmProjects\bd\venv\Scripts\python.exe C:/Users/Administrator/PycharmProjects/bd/gzcc.py('students', 4)('for', 2)('college' ...
分类:其他好文   时间:2018-03-26 12:29:05    阅读次数:131
综合练习:词频统计
text= open("aaa.txt","r") ls=text.read() text.close() print(ls) str = ''',.'"!?:''' enclude={'for','you','a','and','the',} for i in str: ls = ls.repla... ...
分类:其他好文   时间:2018-03-26 12:28:43    阅读次数:97
综合练习:英文词频统计
截图: ...
分类:其他好文   时间:2018-03-26 00:48:42    阅读次数:156
综合练习:英文词频统计
结果截图: ...
分类:其他好文   时间:2018-03-25 23:06:08    阅读次数:296
214条   上一页 1 ... 8 9 10 11 12 ... 22 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!