Page 3 of 3

Re: Hypothetical: Making a word game and needing to check wo

Posted: Thu Jan 26, 2012 11:00 pm
by Taehl
Of course. But I thought the goal was to avoid loading everything into memory?

Re: Hypothetical: Making a word game and needing to check wo

Posted: Fri Jan 27, 2012 12:18 am
by Robin
Taehl wrote:Of course. But I thought the goal was to avoid loading everything into memory?
Even loading the full 228,000 words, and if each word took up 10 bytes, it would be 2 MB RAM used. Not enough to write a swapping mechanism for these days, I reckon.

Re: Hypothetical: Making a word game and needing to check wo

Posted: Fri Jan 27, 2012 12:18 pm
by vrld
In the same vain you shouldn't worry about runtime so much. For 250000 entries a hash will work just fine, even if there are collisions. Only when the number of words gets really big (and I mean really big, as in Google's search engine, or the wordnet database) you should invest your time in sophisticated data-structures and algorithms.

Re: Hypothetical: Making a word game and needing to check wo

Posted: Fri Jan 27, 2012 8:39 pm
by josefnpat
I have an English regex dictionary that I wrote, and here's the word library, maybe this helps.

I don't remember where I got this :(
words.english.txt
(217.3 KiB) Downloaded 84 times