Skip to main content

A library to suggest similar strings.

Project description

Build status

Howabout is a Python library to suggest similar strings. Use it in a command-line project or anywhere where simple misspellings occur.

from howabout import best_match

choices = ['sat', 'sot']

# returns 'sat', since
#   'sat' -> 'sate'
#   'sot' -> 'sat' -> 'sate'
best_match('sate', choices)

Examples can be found under examples/.

Argparse

Python’s argparse library is not supported out of the box as it cannot be extended or patched.

Installation

Install with pip:

$ pip install howabout

Testing

Use tox to run the tests.

$ virtualenv --no-site-packages .python && source .python/bin/activate
$ pip install -r requirements.txt
$ tox

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 howabout, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size howabout-1.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page