Im coding a small app more or less like a word game.
There is a requirement to validate a word that the user may create to check if it is a valid english word or not.
I have thought of some ways to implement this —
1) Have a hashmap with every english word as a key and a boolean as value. this way i could search for the key at the time of user validation ans so on.
2) Send a HTTP request to some site like dictionary.com to verify if the word exists or not.
Though HTTP request seems to me like a nice way to get this implemented, I wanted to have a hashmap which is at first is filled in and then at periodic intervals updated from a source, say dictionary.com so that I could avoid the latencies involved in the HTTP request implementation.
Any pointers on how I could fill in the hashmap with the words from the source would be greatly appreciated.
Thanks
p1nG
You can use web services and Big Huge Thesaurus. It’s a REST Web services, so you might need tools like Jersey, or RestEasy.
An alternative would be Oanaware and its SOAP web service.
Resources :
On the same topic :