Skip to main content

Python wrapper of cGADDAG

Project description

GADDAG is a Python wrapper around cGADDAG.

A GADDAG data structure provides rapid word lookups for prefixes, suffixes and substrings, making it ideal for use in applications such as move generation in word games such as Scrabble.

Basic usage:

>>> import gaddag
>>> words = ["foo", "bar", "foobar", "baz"]
>>> gdg = gaddag.GADDAG(words)
>>> "foo" in gdg
True
>>> "bor" in gdg
False
>>> gdg.contains("ba")
['bar', 'foobar', 'baz']

GADDAG currently only supports the ASCII alphabet.

Installation

From PyPI:

pip install gaddag

Documentation

Documentaion is available at http://gaddag.readthedocs.io.

License

Licensed under the MIT License, see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for GADDAG, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size GADDAG-0.4-cp37-cp37m-macosx_10_13_x86_64.whl (10.7 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size GADDAG-0.4.tar.gz (247.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page