javawordnetjaws-wordnetword-sense-disambiguation

Finding the roots of a word in java using wordnet


I am aware of the hypernym in wordnet , but since there are a number of meaning for every term i am forced to using Lesk algorithm to find the contextual meaning of a word .

In the process , i got to see the question . I am trying to implement this algorithm which has been speicified as the answer.

But my main issue is in finding " product of the inverse of the number of nodes between the two nodes"

how do i find the number of nodes between two words.

When i try using hypernyms , it returns a set of words which are one level above the current word in the hierarchy

example : if i take the word application . Wordnet suggests 6 meanings and for each meaning there are a set of root words , now which word should i consider as the next level in the hierarchy

for the 1th meaning of application the hypernyms are 
request petition postulation 
for the 2th meaning of application the hypernyms are 
use usage utilization utilisation employment exercise 
for the 3th meaning of application the hypernyms are 
program programme computer program computer programme 
for the 4th meaning of application the hypernyms are 
manual labor manual labour 
for the 5th meaning of application the hypernyms are 
remedy curative cure therapeutic 
for the 6th meaning of application the hypernyms are 
effort elbow grease exertion travail sweat 

Now which word should i consider as the next word in the hierarchy to built to the root in order to find the distance ?

Please help , i am in an urgent need


Solution

  • The algorithm you link to seems a bit confusing to me. I assume you have the same aim as the other person who asked the question: find appropriate synonyms for a word. This task can be divided in two steps:

    1. disambiguate word that you are going to find synonyms for, so you end up with one sense only
    2. get its synonyms

    Even if you need to access the hypernyms, step 1 should be done first, using the Lesk algorithm, it's simplified version or one of the alternatives. Then you have only the hypernyms for that sense.

    For disambiguation you don't need to compute node distance (at least as part of Lesk), you just need to compare the glosses of each to find the most probable meaning. Don't hesitate to comment if it's not clear or if I didn't get the question right.