in reply to word association problem

Should this not all fit into memory then I'd suggest you solve the file based lookup problem first. Might want to research 'tries'.

A trie (from retrieval), is a multi-way tree structure useful for storing strings over an alphabet. It has been used to store large dictionaries of English (say) words in spelling-checking programs and in natural-language "understanding" programs...(1)
Try http://theoryx5.uwinnipeg.ca/CPAN/data/Tree-Trie/README.html

(1) from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Tree/Trie.html.

--hsm

"Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Replies are listed 'Best First'.
Re: Re: word association problem
by jackdied (Monk) on Aug 08, 2002 at 00:28 UTC
    Dr. Dobbs Article on Ternary search trees as well

    http://www.ddj.com/documents/s=921/ddj9804a/9804a.htm

    I've always meant to publish a ternary search tree module for CPAN, I guess waiting paid off - someone else has done it.