searching algorithm

Sébastien Ramage sebastien.ramage at gmail.com
Thu May 10 13:55:16 EDT 2007


I have made a script that search anagram based on the ODS file ( call
OSW in english, Official Scrabble Words)
it load a file that contain 369085 words (one word per line)

I create a dictionnary and store word into using the length of the
word as key
example : mydict[2] contain a list of word with length = 2

first I select the correct dict entry and in a second time I scan this
list searching correct word

my file contains 369085 and it's pretty fast

Seb




More information about the Python-list mailing list