跳转到主要内容

有界Levenshtein距离(Ukkonen)的实现

项目描述

Build Status Azure DevOps coverage pre-commit.ci status

ukkonen

有界Levenshtein距离(Ukkonen)的实现

端口

这是一个从javascript到c++ / python的ukkonen的端口,通过cffi实现。

安装

pip install ukkonen
  • 大多数情况下,轮子应该在pypi上可用

API

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

计算编辑距离,限制为k

>>> import ukkonen
>>> ukkonen.distance('hello', 'world', 5)
4
>>> ukkonen.distance('hello', 'world', 2)
2

项目详情


下载文件

下载适合您平台文件的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

ukkonen-1.0.1.tar.gz (4.1 kB 查看散列)

上传时间:

构建分发

ukkonen-1.0.1-cp38-abi3-macosx_12_0_arm64.whl (6.7 kB 查看散列)

上传时间: CPython 3.8+ macOS 12.0+ ARM64

ukkonen-1.0.1-cp37-abi3-macosx_10_14_x86_64.whl (6.5 kB 查看哈希值)

上传时间 CPython 3.7+ macOS 10.14+ x86-64

ukkonen-1.0.1-cp36-abi3-win_amd64.whl (10.7 kB 查看哈希值)

上传时间 CPython 3.6+ Windows x86-64

ukkonen-1.0.1-cp36-abi3-win32.whl (10.2 kB 查看哈希值)

上传时间 CPython 3.6+ Windows x86

ukkonen-1.0.1-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28.4 kB 查看哈希值)

上传时间 CPython 3.6+ manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面