Hi there, Just wondering if anyone has found a freely available library for loading a dictionary and looking up words. I wrote such a beast a while back (10 years ago maybe!) and it's being used on the http://www.a2zwordfinder.com web site by an old acquaintance, but I would have some porting work to do to get that up and running. I wrote a tool that took a word list and filtered and compressed it into a fairly compact format, and a C library for reading it back and for doing normal word lookups and anagram lookups. All I want at the moment is the ability to lookup a word and see if it is in the dictionary. Eventually it would be nice to have a library that does returns a list of all the anagrams too. If I have to, I'll port my library and tools, but I would rather find something already done. Thanks.
Just rewrite your code Read up a little on Tries. Couple of hundred lines of (nicely formatted) code and you can have your word list loading, word lookup, anagram solving.
Yes, I know, but the hallmark of a good programmer is being lazy and reusing code when you can. The other way I would have to write a tool to parse the file, generate a trie and store it into a file efficiently and write the library to read the file, regenerate the trie and then write the query methods. If I can simply include a couple of files in my project, it is much easier!
I guess I have to do it myself then! It's something I'll get around to in a little bit, and then I'll make the tool and code available for others to use.
Id love that. I've been flirting with adding a free play game mode to Rummage, but I haven't looked to deep into Tries yet. Keep me posted, I'll lend a hand if I can.