Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fuzzyset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import math
import operator
import collections
import Levenshtein
import pyxDamerauLevenshtein

__version__ = (0, 0, 18)

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down