Skip to main content

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])
>>> word_tree.next_char(wt, '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.

Filename, size & hash SHA256 hash help File type Python version Upload date
word_tree-1.0-py3-none-any.whl (3.1 kB) Copy SHA256 hash SHA256 Wheel py3
word_tree-1.0.tar.gz (1.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page