A pure Python Levenshtein implementation that's not freaking GPL'd.
Project description
A pure Python Levenshtein implementation that’s not freaking GPL’d.
Based off the Wikipedia code samples at http://en.wikipedia.org/wiki/Levenshtein_distance.
Requirements
Python 2.7.X, Python 3.3+ or PyPy 1.6.0+
Usage
Usage is fairly straightforward.:
import pylev distance = pylev.levenshtein('kitten', 'sitting') assert(distance, 3)
License
New BSD.
Tests
Setup:
$ git clone https://github.com/toastdriven/pylev.git $ cd pylev
Running:
$ python -m unittest tests
[![Build Status](https://travis-ci.org/toastdriven/pylev.png)](https://travis-ci.org/toastdriven/pylev)
Version History
v1.3.0
Implemented a considerably faster variants (orders of magnitude).
Tested & working on Python 2.7.4, Python 3.3.1 & PyPy 1.9.0.
v1.2.0
Fixed all incorrect spellings of “Levenshtein” (there’s no “c” in it).
Old methods are aliased for backward-compatibility.
v1.1.0
Implemented a much faster variant (several orders of magnitude).
The older variant was renamed to classic_levenschtein.
Tested & working on Python 3.3 & PyPy 1.6.0 as well.
v1.0.2
Python packaging is REALLY hard. Including the README this time.
v1.0.1
Python packaging is hard. Including the README this time.
v1.0.0
Initial release, just the naive implementation of Levenshtein.
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
Built Distribution
File details
Details for the file pylev-1.3.0.tar.gz
.
File metadata
- Download URL: pylev-1.3.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063910098161199b81e453025653ec53556c1be7165a9b7c50be2f4d57eae1c3 |
|
MD5 | 3be579cfc32ce5140cc04001f898741b |
|
BLAKE2b-256 | cc61dab2081d3d86dcf0b9f5dcfb11b256d76cd14aad7ccdd7c8dd5e7f7e41a0 |
File details
Details for the file pylev-1.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pylev-1.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d29a87beb45ebe1e821e7a3b10da2b6b2f4c79b43f482c2df1a1f748a6e114e |
|
MD5 | 6da14dfce5034873fc5c2d7a6e83dc29 |
|
BLAKE2b-256 | 401c7dff1d242bf1e19f9c6202f0ba4e6fd18cc7ecb8bc85b17b2d16c806e228 |