Wordnet (JWI): Get example sentences for a word

232 views Asked by At

I'm trying to implement the Lesk Algorithm for word sense disambiguation using Wordnet and it's Java API JWI. 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. 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. How do I get those sentences?

1

There are 1 answers

0
Darren Cook On BEST ANSWER

It may not be there. Examples are attached to synsets (e.g. 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().

(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.)