Python進行詞頻統計

基礎python統計詞頻,未考慮到刪除停用詞python # 詞頻統計 def getText():#處理文件 txt=open("English.txt","r").read() txt = txt.lower()#將英文所有變爲小寫 for ch in '!"#$&*+,-./:;<=>?@[\\]^_{}|': txt = txt.replace(ch
相關文章
相關標籤/搜索