Dictionary optimised for progressive lookup
Project description
Efficient lookup of next possible character(s) given a starting word fragment. This is intended for use in word game strategies (Boggle, Scrabble, Anagram).
To use:
>>> import word_tree >>> with open('words.lst') as wl: ... wt = word_tree.make_word_tree([w.strip() for w in wl]) ... >>> wt.next_char('do') ['c', 'e', 'd', 'g', 'i', 'm', 'l', 'o', 'n', 'p', 's', 'r', 'u', 't', 'w', 'v', 'z', None]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
word_tree-0.1.tar.gz
(1.8 kB
view hashes)