Skip to content

Commit

Permalink
Merge pull request #95 from juliangilbey/remove-distance-package-refs
Browse files Browse the repository at this point in the history
Remove support for unmaintained "distance" library
  • Loading branch information
orsinium authored Sep 9, 2024
2 parents 9cf4a14 + f188167 commit c3aca91
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ hamming('text', 'testit')

Supported libraries:

1. [Distance](https://github.com/doukremt/distance)
1. [jellyfish](https://github.com/jamesturk/jellyfish)
1. [py_stringmatching](https://github.com/anhaidgroup/py_stringmatching)
1. [pylev](https://github.com/toastdriven/pylev)
Expand Down Expand Up @@ -248,7 +247,6 @@ Without extras installation:
| Hamming | Levenshtein | 0.00038 |
| Hamming | rapidfuzz | 0.00044 |
| Hamming | jellyfish | 0.00091 |
| Hamming | distance | 0.00812 |
| Hamming | **textdistance** | 0.03531 |
| Jaro | rapidfuzz | 0.00092 |
| Jaro | jellyfish | 0.00191 |
Expand All @@ -260,7 +258,6 @@ Without extras installation:
| Levenshtein | Levenshtein | 0.00122 |
| Levenshtein | jellyfish | 0.00254 |
| Levenshtein | pylev | 0.15688 |
| Levenshtein | distance | 0.28669 |
| Levenshtein | **textdistance** | 0.53902 |

Total: 24 libs.
Expand Down
2 changes: 0 additions & 2 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
'pyxDamerauLevenshtein',
'rapidfuzz>=2.6.0',
# slow
'distance',
'pylev',
'py_stringmatching',
# other
Expand Down Expand Up @@ -65,7 +64,6 @@
'Levenshtein', # only same length and strings
'rapidfuzz>=2.6.0', # only same length, any iterators of hashable elements
'jellyfish', # only strings, any length
'distance', # only same length, any iterators
],
'Jaro': [
'rapidfuzz>=2.6.0', # any iterators of hashable elements
Expand Down
8 changes: 0 additions & 8 deletions textdistance/libraries.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
[
"jellyfish",
"hamming_distance"
],
[
"distance",
"hamming"
]
],
"Jaro": [
Expand Down Expand Up @@ -71,10 +67,6 @@
[
"pylev",
"levenshtein"
],
[
"distance",
"levenshtein"
]
]
}
2 changes: 0 additions & 2 deletions textdistance/libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ class SameLengthTextLibrary(SameLengthLibrary, TextLibrary):
reg(alg, LibraryBase('rapidfuzz.distance.OSA', 'distance', conditions=dict(restricted=True)))

alg = 'Hamming'
reg(alg, SameLengthLibrary('distance', 'hamming'))
reg(alg, SameLengthTextLibrary('Levenshtein', 'hamming'))
reg(alg, TextLibrary('jellyfish', 'hamming_distance'))
reg(alg, SameLengthLibrary('rapidfuzz.distance.Hamming', 'distance'))
Expand All @@ -192,7 +191,6 @@ class SameLengthTextLibrary(SameLengthLibrary, TextLibrary):
# reg(alg, TextLibrary('Levenshtein', 'jaro_winkler', conditions=dict(winklerize=True)))

alg = 'Levenshtein'
reg(alg, LibraryBase('distance', 'levenshtein'))
reg(alg, LibraryBase('pylev', 'levenshtein'))
reg(alg, TextLibrary('jellyfish', 'levenshtein_distance'))
reg(alg, TextLibrary('Levenshtein', 'distance'))
Expand Down

0 comments on commit c3aca91

Please sign in to comment.