Skip to main content

A package to build word chains from a given list of words.

Project description

Word Chain

A package to build word chains from a given list of words.

Tests

Installation

pip install python-wordchain

Sample Usage

from wordchain.wordchain import WordChainer

WORD_LIST = ["bird", "bind", "bord", "bond", "bend", "bing", "bong", "sing", "song"]

chainer = WordChainer(word_list=WORD_LIST)
chainer.get_chains('bird', 'song')

This yields:

[('bird', 'bord', 'bond', 'bong', 'song'),
 ('bird', 'bind', 'bing', 'sing', 'song'),
 ('bird', 'bind', 'bond', 'bong', 'song'),
 ('bird', 'bind', 'bing', 'bong', 'song')]

Testing

Running the test suite from repository root:

pytest -v tests/tests.py

Run tests using docker and tox:

docker run --rm $(docker build -q . -f Dockerfile.tox) tox

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

python_wordchain-0.4.2.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

python_wordchain-0.4.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file python_wordchain-0.4.2.tar.gz.

File metadata

  • Download URL: python_wordchain-0.4.2.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for python_wordchain-0.4.2.tar.gz
Algorithm Hash digest
SHA256 82f1c87f97f86f49bfb1ddb8d32e0fefff5de9f84b604733c82f91ef6452eec9
MD5 1864d463ff992fb95cfa62a0d640afcf
BLAKE2b-256 1aa4a947c39d8569ff3575e6a69da333d5ce6af595ca5ab0a4c42cb5ea051f68

See more details on using hashes here.

File details

Details for the file python_wordchain-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_wordchain-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6c5eb8f625d6a97bfbd051ec124e6b053a52071cc7a4331ec137ee1ca40357b5
MD5 3fd97a60879d6ab743a90e613595d596
BLAKE2b-256 83de8f54095400297942cd3a24c712d00942a19af04e2651e3ba8e13bfa303ed

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