用python 對(duì)下面兩個(gè)句子中的“bank”進(jìn)行語(yǔ)義消歧,找出每個(gè)句子中的“bank”對(duì)應(yīng)到WordNet中的哪一個(gè)語(yǔ)義。初學(xué)者求指教l The bank will not be accepting cash on Saturdays.l The river overflowed the bank.
1 回答

叮當(dāng)貓咪
TA貢獻(xiàn)1776條經(jīng)驗(yàn) 獲得超12個(gè)贊
你可以參考一下這個(gè) Word sense disambiguation in NLTK Python
查看 alvas 這個(gè)用戶的回答
//...>>> 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'//...
添加回答
舉報(bào)
0/150
提交
取消