Polyleven
Polyleven is a fast Levenshtein distance library for Python.
Project page: http://ceptord.net/20181215-polyleven.html
Install
$ pip install polyleven
Usage
Polyleven provides a single interface function "levenshtein()". You can use this function to measure the similarity of two strings.
>>> from polyleven import levenshtein
>>> levenshtein('aaa', 'ccc')
3
If you only care about distances under a certain threshold, you can pass the max threshold to the third argument.
>>> levenshtein('acc', 'ccc', 1)
1
>>> levenshtein('aaa', 'ccc', 1)
2
In general, you can gain a noticeable speed boost with threshold k < 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
From v0.7, polyleven is released under MIT License. See LICENSE for the full license text.
Metadata
Release files for polyleven 0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| polyleven-0.7.tar.gz | 5.1 kB | Without provenance | Details for polyleven-0.7.tar.gz |
Release files / polyleven-0.7.tar.gz
| Download URL | polyleven-0.7.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2307bd46746ee6e4d56ab2673d5bb4bdb88d3c77b954dd86f03d1363085f4c6d
|
|
BLAKE2b-256 checksum How to use checksums |
e6c05900bddc1897a0ad88021e2254413eb26031bfb68e71ad3811aee9485e66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for polyleven 0.7
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.