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..
how is this helpful?
instanceofTom
2009-06-26 18:16:23
A:
Build a quick application to take the search string and call a synonym web service - like this one.
njebert
2009-06-26 16:33:29
+3
A:
If the user input is a word then do something like:
- Create a Hashtable that uses the word for its Key
- Store the synonyms in a List or String array
- Add the Key and synonyms to the hash table
- 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
2009-06-26 20:45:04
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
2009-06-26 20:41:03