Python进行词频统计

基础python统计词频,未考虑到删除停用词python # 词频统计 def getText():#处理文件 txt=open("English.txt","r").read() txt = txt.lower()#将英文所有变为小写 for ch in '!"#$&*+,-./:;<=>?@[\\]^_{}|': txt = txt.replace(ch
相关文章
相关标签/搜索