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

asottile-archive/editdistance-s

Repository files navigation

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

About

Fast implementation of the edit distance (Levenshtein distance).

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published