how to get wordNet lexical categories ( noun categories and verb categories ) using JAWS pacakage

921 Views Asked by At

If i have array List of words (String). I want to get lexical category of every word. Word Net has noun categories, verb categories and others. I want to get category of each word. How to get this in java using JAWS.

2

There are 2 best solutions below

0
On

Have a look at ReferenceSynset.getLexicalFileNumber. This will yield an integer that corresponds to a category which are all listed in man lexnames man page.

0
On

your one word can have multiple categories. mayb you can try something like :

list<Synset> list=database.getSynsets(word);
edu.smu.tspell.wordnet.SynsetType stype = list.get(0).getType()