Open NicklasXYZ opened 2 months ago
How would you compute that?
I would simply divide the computed edit distance by the size of the longest string (the upper bound in the edit distance).
Mmh, I'm not entirely sure if this should be part of the library itself or could just be implemented by the user if they need it since it looks pretty straightforward
Depending on how advanced you want the library to be it could be worth adding. For example, if you're allowed to use non-uniform weights for the edit operations then the (maximum) factor you need to normalize by might not be too straight forward for the users themselves to compute.
Enable the option to compute the normalized distance, which returns a value between 0 and 1. A result of 0 indicates no similarity between the provided strings, while a result of 1 indicates a perfect match as determined by the similarity function. This feature could be useful when applying a threshold to determine whether two strings are sufficiently similar.