用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
提交
取消