Dictionary Code Library?

Discussion in 'Public Game Developers Forum' started by MindJuice, Jan 11, 2010.

  1. 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.
     
  2. daveak

    daveak Well-Known Member

    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.
     
  3. 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!
     
  4. #4 MindJuice, Jan 12, 2010
    Last edited: Jan 12, 2010
    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.
     
  5. cfreshmedia

    cfreshmedia Well-Known Member

    Aug 25, 2009
    72
    0
    0
    Game developer, designer
    Austin, TX
    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.
     
  6. What do you mean by "free play game mode"?
     

Share This Page