Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Latest commit

 

History

History
48 lines (32 loc) · 1.51 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.51 KB

DEPRECATED

  • upstream now provides wheels
  • I think (?) the algorithm isn't a correct Levenshtein distance
  • I created ukkonen instead

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