简体   繁体   English

Wordnet (JWI):获取单词的例句

[英]Wordnet (JWI): Get example sentences for a word

I'm trying to implement the Lesk Algorithm for word sense disambiguation using Wordnet and it's Java API JWI.我正在尝试使用 Wordnet 和 Java API JWI 实现 Lesk 算法以进行词义消歧。 One of the steps requires to build a bag of words from the gloss and example sentences of the target word.其中一个步骤需要从目标词的词汇表和例句中构建一个词袋。 I can easily get the gloss from the method getGloss() in class ISynset, but I don't see a method to get the example sentences.我可以很容易地从 ISynset 类中的 getGloss() 方法中获取光泽,但是我没有看到获取例句的方法。 I'm sure I'm missing something obvious since JWI is described as "full-featured" on wordnet's site, but i can't find anything useful in the documentation or the internet.我确定我遗漏了一些明显的东西,因为 JWI 在 wordnet 的网站上被描述为“全功能”,但我在文档或互联网中找不到任何有用的东西。 How do I get those sentences?我如何得到这些句子?

It may not be there.它可能不存在。 Examples are attached to synsets (eg they are a sibling function to getting lemmas and definitions in the NLTK API), but the 2.4.0 JWI docs for synset only have functions for getGloss() and getWords() .示例附加到同义词集(例如,它们是在 NLTK API 中获取引理和定义的同级函数),但synset2.4.0 JWI 文档仅具有用于getGloss()getWords()函数。

(If it turns out there is a way to get them from JWI, can someone leave me a comment, and I'll then delete this answer.) (如果事实证明有办法从 JWI 获取它们,有人可以给我留言,然后我将删除此答案。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM