From 6e7f252521776ab8c18f32c827a726a6febdc6d4 Mon Sep 17 00:00:00 2001 From: Hesham Elabyad Date: Wed, 19 Jun 2019 14:02:16 +0200 Subject: [PATCH 1/2] change pythonLevenstehin lib to pyxDamerauLevenshtein --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 05f141b..b171c4d 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ def read(fname): url = "https://github.com/axiak/fuzzyset/", packages=['fuzzyset'], long_description=read('README.rst'), - install_requires=['python-levenshtein', 'texttable'], + install_requires=['pyxDamerauLevenshtein', 'texttable'], classifiers=[ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", From 65d8c8a4676bd51f315cd1d7f30b57881a1c3826 Mon Sep 17 00:00:00 2001 From: Hesham Elabyad Date: Wed, 19 Jun 2019 14:07:47 +0200 Subject: [PATCH 2/2] change lib call --- fuzzyset/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzzyset/__init__.py b/fuzzyset/__init__.py index a05584e..74a2864 100644 --- a/fuzzyset/__init__.py +++ b/fuzzyset/__init__.py @@ -2,7 +2,7 @@ import math import operator import collections -import Levenshtein +import pyxDamerauLevenshtein __version__ = (0, 0, 18) @@ -98,7 +98,7 @@ def __len__(self): def _distance(str1, str2): - distance = Levenshtein.distance(str1, str2) + distance = pyxdameraulevenshtein.damerau_levenshtein_distance(str1, str2) if len(str1) > len(str2): return 1 - float(distance) / len(str1) else: