问题
I am trying to see if a word is in the dictionary or not. Is there any way to do that?
回答1:
Get a list of (assumingly) English words and put it in a database (probably Sqlite for portability). You can get lists of words here:
http://wordlist.sourceforge.net/
Or here (found at https://stackoverflow.com/questions/824422):
http://www.curlewcommunications.co.uk/wordlist.html
Use a library corresponding to the database of your choice to query the table for a word. Here's a Sqlite engine written in pure Java:
http://sqljet.com/
来源:https://stackoverflow.com/questions/5918838/word-is-in-dictionary-or-not