Skip to main content

A pure Python Levenschtein implementation that's not freaking GPL'd.

Project description

A pure Python Levenschtein 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.levenschtein('kitten', 'sitting')
assert(distance, 3)

License

New BSD.

Tests

Setup:

$ git clone https://github.com/toastdriven/pylev.git
$ cd pylev
$ virtualenv env --distribute
$ . env/bin/activate
$ pip install unittest2

Running:

$ python -m unittest2 tests

Version History

  • 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 Levenschtein.

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

pylev-1.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file pylev-1.1.0.tar.gz.

File metadata

  • Download URL: pylev-1.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pylev-1.1.0.tar.gz
Algorithm Hash digest
SHA256 569e038dbb863396e6bbd3b1cdd44a50559f4a046422e864c5cc6d2429cd624f
MD5 90ef3372d907bc13a21b342c3837278d
BLAKE2b-256 f3a7d48071f549aea73a7ed513e0e87a9754d1181e35e094d21970d38a09031e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page