一个纯粹的python levenshtein实现,它没有吓坏gpl'd。

pylev的Python项目详细描述


一个纯粹的python levenshtein实现,它没有吓坏gpl。

基于wikipedia代码示例 http://en.wikipedia.org/wiki/Levenshtein_distance

要求

  • python 2.7.x、python 3.3+或pypy 1.6.0+

用法

用法相当简单。

import pylev
distance = pylev.levenshtein('kitten', 'sitting')
assert(distance, 3)

许可证

新的疯牛病。

测试

设置:

$ git clone https://github.com/toastdriven/pylev.git
$ cd pylev

跑步:

$ python -m unittest tests

[![生成状态](https://travis-ci.org/toastdriven/pylev.png)](https://travis-ci.org/toastdriven/pylev

版本历史记录

  • 1.3.0版

    • Implemented a considerably faster variants (orders of magnitude).
    • Tested & working on Python 2.7.4, Python 3.3.1 & PyPy 1.9.0.
  • 1.2.0版

    • Fixed all incorrect spellings of “Levenshtein” (there’s no “c” in it).
    • Old methods are aliased for backward-compatibility.
  • 1.1.0版

    • Implemented a much faster variant (several orders of magnitude).
    • The older variant was renamed to ^{tt1}$.
    • Tested & working on Python 3.3 & PyPy 1.6.0 as well.
  • 1.0.2版

    • Python packaging is REALLY hard. Including the README this time.
  • 1.0.1版

    • Python packaging is hard. Including the README this time.
  • 1.0.0版

    • Initial release, just the naive implementation of Levenshtein.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在中间的AcLtCudio中“椭圆”标题?   java如何使用Hibernate获取不完整的集合?   将xml代码解码为Java对象的最佳方法?   java如何在本地和远程服务器上存储内容   java如何解决CWE ID 501信任边界冲突   regex Java word finder程序不会捕获字符串中的所有唯一项   sql将存储过程消息直接打印到Java控制台   java删除JTable行   Java中的泛型转换   datetime Java DateTimeFormatter在时区为+0000时添加Z   java根据报告中的变量显示不同的标头   java文件管理器总是抛出FilerException   递归为什么我在递归java方法中得到“线程中的异常”main“java.lang.StackOverflowerr”?