【文件属性】:
文件名称:editdistance:快速实现编辑距离(Levenshtein距离)
文件大小:31KB
文件格式:ZIP
更新时间:2021-04-30 01:53:07
C++
编辑距离
快速实现编辑距离(Levenshtein距离)。
该库仅使用C ++和Cython实现。
该库中使用的算法由提出 。
二元轮
多亏了 ,Linux,Mac OS和Windows上都有二进制*。
安装
您可以通过pip安装:
pip install editdistance
用法
这很简单:
import editdistance
editdistance . eval ( 'banana' , 'bahama' )
# 2L
简单基准
使用IPython,我尝试了几个库:
在Python 2.7.5上:
a = 'fsffvfdsbbdfvvdavavavavavava'
b = 'fvdaabavvvvvadvdvavavadfsfsdafvvav'
import pylev
timeit pylev . levenshtein ( a , b )
# 100 l
【文件预览】:
editdistance-master
----setup.py(2KB)
----.travis.yml(712B)
----LICENSE(1KB)
----README.rst(4KB)
----appveyor.yml(430B)
----editdistance()
--------def.h(256B)
--------_editdistance.h(272B)
--------__init__.py(154B)
--------bycython.pyx(776B)
--------_editdistance.cpp(6KB)
--------bycython.cpp(128KB)
----test()
--------test_editdistance.py(234B)