X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Futils%2Fleven.py;h=d1ba2740c966cca475c11c42e5af21c5f6769b52;hb=7a017681a7646e8f8a3d7226b4ae9e1f6d7dbf41;hp=9b269df4357bc8db740a1f4777646e697a0966ab;hpb=24993cd99b847733894f57fd004ed52b5390244a;p=mpd-sima.git diff --git a/sima/utils/leven.py b/sima/utils/leven.py index 9b269df..d1ba274 100644 --- a/sima/utils/leven.py +++ b/sima/utils/leven.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2009, 2010, 2013 Jack Kaliko +# Copyright (c) 2009, 2010, 2013 kaliko # # This file is part of sima # @@ -16,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.""" @@ -38,6 +39,7 @@ def levenshtein(a_st, b_st): return current[n_a] + def levenshtein_ratio(string, strong): """ Compute levenshtein ratio.