★ TouchArcade needs your help. Click here to support us on Patreon.

Dictionary Code Library?

01-11-2010, 06:18 PM
#1
Joined: Sep 2009
Location: Vancouver, Canada
Posts: 977
Send a message via MSN to MindJuice Send a message via Skype™ to MindJuice
Dictionary Code Library?

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.
01-11-2010, 06:30 PM
#2
Joined: May 2009
Location: Durham, UK
Posts: 96
Send a message via MSN to daveak
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.

Alpha Numeric - Find words and solve sums against the clock.
01-11-2010, 06:36 PM
#3
Joined: Sep 2009
Location: Vancouver, Canada
Posts: 977
Send a message via MSN to MindJuice Send a message via Skype™ to MindJuice
Quote:
Originally Posted by daveak View Post
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!
01-12-2010, 05:20 PM
#4
Joined: Sep 2009
Location: Vancouver, Canada
Posts: 977
Send a message via MSN to MindJuice Send a message via Skype™ to MindJuice
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.

Last edited by MindJuice; 01-12-2010 at 05:39 PM.
01-12-2010, 06:27 PM
#5
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.

Developer of: Rummage and Rummage Lite
01-12-2010, 06:51 PM
#6
Joined: Sep 2009
Location: Vancouver, Canada
Posts: 977
Send a message via MSN to MindJuice Send a message via Skype™ to MindJuice
Quote:
Originally Posted by cfreshmedia View Post
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.
What do you mean by "free play game mode"?