X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Futils%2Fleven.py;h=d1ba2740c966cca475c11c42e5af21c5f6769b52;hb=beba5ba73dbb1b5c4d6161e472f89fe18f14aeeb;hp=adc48f78a39a4a2d82763d30d1183390f0e764cf;hpb=c1bda032095902bdcd183c530a9c4de28f3c828a;p=mpd-sima.git diff --git a/sima/utils/leven.py b/sima/utils/leven.py index adc48f7..d1ba274 100644 --- a/sima/utils/leven.py +++ b/sima/utils/leven.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - -# Copyright (c) 2009, 2010, 2013 Jack Kaliko +# Copyright (c) 2009, 2010, 2013 kaliko # # This file is part of sima # @@ -17,7 +16,8 @@ # You should have received a copy of the GNU General Public License # along with sima. If not, see . # -# +"""Computes levenshtein distance/ratio""" + def levenshtein(a_st, b_st): """Computes the Levenshtein distance between two strings.""" @@ -39,6 +39,7 @@ def levenshtein(a_st, b_st): return current[n_a] + def levenshtein_ratio(string, strong): """ Compute levenshtein ratio.