Skip to content

Commit

Permalink
Merge pull request #83 from maxbachmann/master
Browse files Browse the repository at this point in the history
update rapidfuzz
  • Loading branch information
orsinium committed Aug 21, 2022
2 parents 6e62046 + a4af04e commit 31fc1d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'numpy', # for SmithWaterman and other
'python-Levenshtein', # for Jaro and Levenshtein
'pyxDamerauLevenshtein', # for DamerauLevenshtein
'rapidfuzz>=2.0.0', # for Jaro, Levenshtein and other
'rapidfuzz>=2.6.0', # for Jaro, Levenshtein and other
],

# needed for benchmarking, optimization and testing
Expand All @@ -23,7 +23,7 @@
'numpy',
'python-Levenshtein',
'pyxDamerauLevenshtein',
'rapidfuzz>=2.0.0',
'rapidfuzz>=2.6.0',
# slow
'distance',
'pylev',
Expand All @@ -40,26 +40,27 @@

# for algos, from fastest to slowest, only faster than textdistance:
'DamerauLevenshtein': [
'rapidfuzz>=2.6.0', # any iterators of hashable elements
'jellyfish', # only for text
'pyxDamerauLevenshtein', # for any iterators
],
'Hamming': [
'python-Levenshtein', # only same length and strings
'rapidfuzz>=2.0.0', # only same length, any iterators of hashable elements
'rapidfuzz>=2.6.0', # only same length, any iterators of hashable elements
'jellyfish', # only strings, any length
'distance', # only same length, any iterators
'abydos', # any iterators
],
'Jaro': [
'rapidfuzz>=2.0.0', # any iterators of hashable elements
'rapidfuzz>=2.6.0', # any iterators of hashable elements
'python-Levenshtein', # only text
],
'JaroWinkler': [
'rapidfuzz>=2.0.0', # any iterators of hashable elements
'rapidfuzz>=2.6.0', # any iterators of hashable elements
'jellyfish', # only text
],
'Levenshtein': [
'rapidfuzz>=2.0.0', # any iterators of hashable elements
'rapidfuzz>=2.6.0', # any iterators of hashable elements
'python-Levenshtein', # only text
# yeah, other libs slower than textdistance
],
Expand Down
4 changes: 4 additions & 0 deletions textdistance/libraries.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"DamerauLevenshtein": [
[
"rapidfuzz.distance.DamerauLevenshtein",
"distance"
],
[
"jellyfish",
"damerau_levenshtein_distance"
Expand Down
1 change: 1 addition & 0 deletions textdistance/libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class SameLengthTextLibrary(SameLengthLibrary, TextLibrary):
prototype.register('DamerauLevenshtein', LibraryBase('abydos.distance', 'DamerauLevenshtein'))
prototype.register('DamerauLevenshtein', LibraryBase('pyxdameraulevenshtein', 'damerau_levenshtein_distance'))
prototype.register('DamerauLevenshtein', TextLibrary('jellyfish', 'damerau_levenshtein_distance'))
prototype.register('DamerauLevenshtein', LibraryBase('rapidfuzz.distance.DamerauLevenshtein', 'distance'))

prototype.register('Hamming', LibraryBase('abydos.distance', 'Hamming'))
prototype.register('Hamming', SameLengthLibrary('distance', 'hamming'))
Expand Down

0 comments on commit 31fc1d9

Please sign in to comment.