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.

Filename, size & hash SHA256 hash help File type Python version Upload date
GADDAG-0.4-cp37-cp37m-macosx_10_13_x86_64.whl (10.7 kB) Copy SHA256 hash SHA256 Wheel cp37 Sep 23, 2018
GADDAG-0.4.tar.gz (247.7 kB) Copy SHA256 hash SHA256 Source None Sep 23, 2018

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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page