rapidfuzz / RapidFuzz

Rapid fuzzy string matching in Python using various string metrics
https://rapidfuzz.github.io/RapidFuzz/
MIT License
2.7k stars 119 forks source link

Support distance calculation for types other than strings #100

Closed maxbachmann closed 3 years ago

maxbachmann commented 3 years ago

RapidFuzz currently only works with strings. E.g. https://github.com/roy-ht/editdistance will always calculate the edit distance between two sequences where each element has to be hashable. RapidFuzz should be able to calculate the edit distance between any hashable objects as well.

In the common case of a string the unnecessary hashing in editdistance is quite slow. In RapidFuzz this should be implemented in the following way:

maxbachmann commented 3 years ago

Support added