tags:

views:

182

answers:

4

Hi all!! i need to implement a dictionary application in java i.e. which wil retrieve the synonyms of the user input.. jus give me an idea to do this..

+2  A: 

do a dictionary.com search on the word and scrape the synonyms..

Jreeter
how is this helpful?
instanceofTom
A: 

Build a quick application to take the search string and call a synonym web service - like this one.

njebert
+3  A: 

If the user input is a word then do something like:

  1. Create a Hashtable that uses the word for its Key
  2. Store the synonyms in a List or String array
  3. Add the Key and synonyms to the hash table
  4. When the user inputs a word print the list associted with that key

I am assuming this is homework and you will be hard coding the dictionary and synonyms

Remember to put some rude words in there; they are the first ones that anyone looks at when they get a new dictionary
oxbow_lakes
A: 

"retrieve the synonyms"

Where are you getting the synonyms? Are they stored in a DB/file, hard-coded? Or do you need to get retrieve them yourself from an external service?

If you already have a list of synonyms, populate a HashMap and key the list of synonyms with the search word.

Cambium
thx!! it worked..