用Python进行词频统计
英文文本词频统计def getText(): txt = open("hamlet.txt","r").read()#读取文件 txt = txt.lower() #把文本全部变为小写 for ch in '|"#$%&^()*+,-./:;<>=?@[]\\_‘{}~':#把特殊字符变为空格 txt = txt.replace(ch,...