Dictionary of English Words for a J2ME app
I intend to develop a J2ME application, that should be able to read words from the English Dictionary. How do I interface to/and store a Dictionary ? Will I have to create the Dictionary myself, by inserting words, or is there a thi开发者_JAVA百科rd party Dictionary available with APIs?
There are several online dictionaries available, but if you want a quick, simple solution and you're running on a *NIX server, then try looking at /usr/share/dict/words
, which will be on most servers. It's a list of English words, one per line.
There are definitely free dictionary files, so you don't need to make one yourself!
A good starting point is looking at a Java SE implementation of a spell checker, such as Jazzy on Sourceforge. It has dictionary files included in the project, and by inspecting the code you can get an idea of how to integrate it into your own J2ME app.
Your major challenge will be to be able to search the dictionary in an efficient manner using J2ME since it can be slow in comparison to its desktop coutnerpart.
Try the word-lists detailed in Kevin's Word List; it contains links to many different English language word-lists and related resources.
You can download an appropriate one from the site and use it directly, no need for an API as the content should nominally be just plain-text which you can load into the program or store in a database to allow for fast lookups.
Just download the dictonary created by OpenOffice, it's for free.
精彩评论