javawordnetjaws-wordnet

How to tag monosemous words


i am using JAWS-Java API for wordnet searching.i have been searching alot but unable to find how to count the number of senses the given word can have.Is there any function for it? And after finding how the monosemous words can be tagged.


Solution

  • If a word belongs to only one synset, it has only one meaning -> monosemy.

    JAWS Code snippet:

    WordNetDatabase database = WordNetDatabase.getFileInstance();
    Synset[] synsets = database.getSynsets("monosemous");
    if(synsets.length == 0) //not found
    else if(synsets.length == 1) //monosemous word
    

    PS: "monosemous" is a monosemous word.