Skip to main content

Fast implementation of the edit distance (Levenshtein distance)

Project description

Build Status Azure DevOps coverage pre-commit.ci status

editdistance-s

Fast implementation of the edit distance (Levenshtein distance).

fork

this is a fork of editdistance with the following changes:

  • __hash__ based support is removed as it makes incorrect assumptions
  • only strings (type str) are supported
  • cffi replaces cython (so abi3 wheels can be produced)
  • the module is renamed to editdistance_s
  • the public api does not contain eval (only distance)

installation

pip install editdistance-s
  • wheels should be available on pypi in most cases

api

distance(s1: str, s2: str) -> int

compute the edit distance

>>> import editdistance_s
>>> editdistance_s.distance('hello', 'hell☃')
1

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

editdistance_s-1.0.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distributions

editdistance_s-1.0.0-pp37-pypy37_pp73-manylinux2010_x86_64.whl (16.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

editdistance_s-1.0.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl (16.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

editdistance_s-1.0.0-cp38-abi3-macosx_12_0_arm64.whl (12.5 kB view hashes)

Uploaded CPython 3.8+ macOS 12.0+ ARM64

editdistance_s-1.0.0-cp36-abi3-win_amd64.whl (16.5 kB view hashes)

Uploaded CPython 3.6+ Windows x86-64

editdistance_s-1.0.0-cp36-abi3-win32.whl (18.4 kB view hashes)

Uploaded CPython 3.6+ Windows x86

editdistance_s-1.0.0-cp36-abi3-manylinux1_x86_64.whl (155.2 kB view hashes)

Uploaded CPython 3.6+

editdistance_s-1.0.0-cp36-abi3-macosx_10_14_x86_64.whl (12.7 kB view hashes)

Uploaded CPython 3.6+ macOS 10.14+ x86-64

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