用python 對下面兩個句子中的“bank”進行語義消歧,找出每個句子中的“bank”對應到WordNet中的哪一個語義。初學者求指教l The bank will not be accepting cash on Saturdays.l The river overflowed the bank.
1 回答

叮當貓咪
TA貢獻1776條經驗 獲得超12個贊
你可以參考一下這個 Word sense disambiguation in NLTK Python
查看 alvas 這個用戶的回答
//...>>> from nltk.wsd import lesk>>> sent = 'I went to the bank to deposit my money'>>> ambiguous = 'bank'>>> lesk(sent, ambiguous) Synset('bank.v.04')>>> lesk(sent, ambiguous).definition()u'act as the banker in a game or in gambling'//...
添加回答
舉報
0/150
提交
取消