A dictionary optimised for progressive lookup
Project description
Word Tree
Efficient lookup of next possible character(s) given a starting word fragment.
This is intended for use in word game strategies (Boggle, Scrabble, Anagram).
Usage:
>>> 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-1.1.2.tar.gz
(14.8 kB
view hashes)
Built Distribution
word_tree-1.1.2-py3-none-any.whl
(14.9 kB
view hashes)
Close
Hashes for word_tree-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48e35f985fefb61bd8b10a1603d3e352cf0a40f19992cd2ea0586624cfc684a3 |
|
MD5 | 32fc6430606a7cd9192f457f9a33c720 |
|
BLAKE2b-256 | f8429c235cc540c86009f5ee394ae9226b6417ad816eb75c57868f1e6a71d700 |