Find synonym and root of a word in java

7.8k Views Asked by At

I am developing a JAVA application where user enters a word in textbox,the synonyms of the word has to be autoprompted to him.

Given a word,is it possible to find its synonyms and its root in JAVA?should i use a dictionary?

eg:

word:   killer
synonym: murderer butcher hitman

word:   killing
root:   kill
4

There are 4 best solutions below

2
On BEST ANSWER

One option would be to use WordNet with a Java API, e.g. JAWS: http://lyle.smu.edu/~tspell/jaws

0
On

You definitely have to use a dictionary, at least for the synonyms, as there are no standard "synonym-lists" available in the JRE.

1
On

As for roots this process is called stemming (google for that). There are some (Java) libraries like that: http://snowball.tartarus.org/download.php

0
On

I would suggest looking for an API for a online site where you can access a synonym dictionary instead of having to build your own. It will be large enough that you will not want to keep it in memory therefore you are going to have to have some external storage location if you are going to do it yourself.