Skip to main content

Word Ladder

Find path from one word to another, changing one letter each step, and each intermediate word must be in the dictionary, the dictionary is a text file with words separated by a line break like the one found in /usr/share/dict/words

Prerequisites

  • Python 3.4 and Linux

  • List of words separated by newlines

  • Virtual environment is recommended

Documentation

Installing

From PyPi

$ pip install word-ladder

Manually

Clone the repository (Pypi package comming soon)

$ git clone git@github.com:snebel29/word_ladder.git
$ cd word_ladder
$ pip install .

to install development dependencies as well

$ pip install -e .[dev]

Getting started

The word_ladder packges commes with both, a command line tool and a module that can be used to find word ladder paths

Command line tool

Once installed you can use the command line interface

$ word_ladder -h

Python module

You can import and use the module directly as well

>>> from word_ladder import WordLadder
>>> wl = WordLadder('tests/word_lists/linux_english_words')
>>> wl.find_path('fear', 'sail')
['fear', 'hear', 'heir', 'hair', 'hail', 'sail']
>>> wl.find_path('Abe', 'sail')
['Abe', 'be', 'bed', 'bid', 'aid', 'said', 'sail']
>>> wl.find_path('Am', 'sail')
['Am', 'am', 'aim', 'ail', 'sail']

Running the tests

You will have to use nose to run the tests

$ nosetests

Contributing

Clone development branch then create pull requests against it

References

Metadata

Release files for word-ladder 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for word-ladder 1.1.0
File Size Uploaded Provenance Actions
word-ladder-1.1.0.tar.gz 5.0 kB Without provenance Details for word-ladder-1.1.0.tar.gz

Release files / word-ladder-1.1.0.tar.gz

Download URL word-ladder-1.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6c025b7ac8f4b80578cdf675442226fd7be192f1ddf80e959fc8758fb8548d3a
BLAKE2b-256 checksum
How to use checksums
4904f4655ad1ce25bb34743c7c441949d63459510dc6e842ff75872177c204af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for word-ladder 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page