checking words in a dictionary [closed]

荒凉一梦 提交于 2019-11-30 22:16:36

You could use one of the open source dictionaries and load it into a database: ftp://ftp.cerias.purdue.edu/pub/dict/ and ftp://ftp.ox.ac.uk/pub/wordlists/

For scrambled words, you might want to look at the Jumble algorithm, an implementation of which is seen here.

If you don't need spell checking this would be really easy. Just load all your words into a HashSet and then check to see if that set contains the word you want to test. There are tons of word lists available.

If you do need a spell checker, then check out aspell or other free APIs.

aspell and its associated word lists and dictionaries might be the answer.

I think aspell has a Java version.

edit: actually it looks like you might do better with this aspell spinoff called Jazzy.

Maybe you can check some wordlist: http://wordlist.sourceforge.net/

This page has some word lists in text format, so you can process in Java yourself, most easily using a HashSet. You need to use more efficient data structures if efficiency is important.

Maybe you could try Peter Norvig's spelling checker. I think it's an elegant way to get 80-90% accuracy.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!