4
from nltk.corpus import wordnet
syn=wordnet.synsets('cookbook')[0]
print syn.definition
預期輸出:沒有得到使用WORDNET同義詞集的定義方法所需的輸出
'a book of recipes and cooking directions'
實際輸出:
bound method Synset.definition of Synset('cookbook.n.01')
我無法找出我的代碼,這是造成的錯誤實際產出與預期產出之間的差異。
謝謝:)。我瘋狂地瀏覽解決方案。 – APD