Image for post
Image for post
1984這部小說裡,最常見的100個單字

安裝NLTK

安裝NLTK包

載入內建的書籍文字檔

計算單字頻率並繪圖

移除停用詞Stop Words

分開英文句子(斷句)

分開英文單字(斷詞)

分開非英文文字

使用WordNet顯示同義/反義詞

Image for post
Image for post

去除字尾Stemming

更精確的去除字尾Lemmatization

找出高頻率單字

Part of speech tagging (POS)詞性標記

Named entity recognition命名實體標註(NER)

Chunking資訊提取

n-gram

拼字錯誤(edit-distance)

Written by

Machine Learning / Deep Learning / Python / Flutter cakeresume.com/yanwei-liu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store