A library to suggest similar strings.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
howabout-1.1.tar.gz
(3.7 kB
view details)
File details
Details for the file howabout-1.1.tar.gz
.
File metadata
- Download URL: howabout-1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099e60c64ca76577faaf5c0d58150bf45bde0613fef5a9f9773b0a829206fc5c |
|
MD5 | 1b32efaad5f706cb4c3db43934267429 |
|
BLAKE2b-256 | fa807748e165144725ee82ae252d6407314170cfd1a5b048356a559890a5f55c |