ukkonen 1.0.1


pip install ukkonen

  Latest version

Released: Nov 19, 2021

Project Links

Meta
Author: Anthony Sottile
Requires Python: >=3.6.1

Classifiers

License
  • OSI Approved :: MIT License

Programming Language
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.6
  • Python :: 3.7
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Build Status Azure DevOps coverage pre-commit.ci status

ukkonen

Implementation of bounded Levenshtein distance (Ukkonen)

port

this is a port of ukkonen from javascript to c++ / python via cffi.

installation

pip install ukkonen
  • wheels should be available on pypi in most cases

api

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

compute the edit distance, bounded by k

>>> import ukkonen
>>> ukkonen.distance('hello', 'world', 5)
4
>>> ukkonen.distance('hello', 'world', 2)
2
Extras: None
Dependencies:
cffi (>=1)