Wordnet簡單實用畫樹形結構

NLTK是python的一個自然語言處理工具,其中提供了訪問wordnet各種功能的函數。 每個詞(word)對應不同的語義(sense),消除了多義性的詞叫lemma 1.導入wordnet: from nltk.corpus import wordnet 需要先下載wordnet語料包,纔可以導入成功。 2.獲得某個word的sense(語義) synsets = wn.synsets('do
相關文章
相關標籤/搜索