Skip to main content

A dictionary optimised for progressive lookup

Project description

Word Tree pipeline status coverage report

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])
...
>>> 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.

Source Distribution

word_tree-2.0.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

word_tree-2.0.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file word_tree-2.0.0.tar.gz.

File metadata

  • Download URL: word_tree-2.0.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for word_tree-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a28eab09ee43547c5c126ede89cd9dc6752993071054904e7e2dfe05dff073d6
MD5 45d44bdec335baa1efc0388b0292c57d
BLAKE2b-256 b44814d0b3e470c4f797722cfa80f58289bca9f018761aca9cbebf35d3526f34

See more details on using hashes here.

File details

Details for the file word_tree-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: word_tree-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for word_tree-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db4c28ccafc6fb9444b4fede73bdbaf9e8273fde9851a0480d55ec6d4a17de0c
MD5 10f63de1c1345e9d856fe55f9fffe569
BLAKE2b-256 3d24ea43d9348a86b3821daaa4365ac00e19c24d38f458e288e138d3b6993ff3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page