A fast C-implemented library for Levenshtein distance
Project description
Polyleven
Polyleven is a hyper fast Levenshtein distance library for Python.
Project page: http://ceptord.net/20181215-polyleven.html
Install
Just run setup.py.
$ python3 setup.py install
PyPI package is available too.
$ pip install polyleven
Usage
Use levenshtein() to compute Levenshtein distance.
>>> from polyleven import levenshtein
>>> levenshtein('abcde', 'abcd')
1
You can pass an integer to the third argument, which limits the maximum distance to compute. This makes the computation a lot more efficient.
>>> dist = levenshtein('abcde', 'abc', 2)
2
>>> dist = levenshtein('abcde', 'xxxxx', 2)
3
Source code
git clone http://ceptord.net/cgit/polyleven/
GitHub Mirror: https://github.com/fujimotos/polyleven
Send bug reports to fujimoto@ceptord.net.
License
Public Domain
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
polyleven-0.6.tar.gz
(4.5 kB
view details)
File details
Details for the file polyleven-0.6.tar.gz.
File metadata
- Download URL: polyleven-0.6.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
527f439e1550777205484aacfa3b0d81e55d642faae4b76cfd3683844474ab0b
|
|
| MD5 |
46b67821a5992661946ae13e784562bb
|
|
| BLAKE2b-256 |
6c1316128a054a3c5fd9092319a211977d359ede29e51f2661c7376442b594c7
|