You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing an app that uses this library. I think I found a possible bug, or at the very least, a surprising (to me) behavior.
When computing the distance between two strings in case-insensitive mode, the highest match in my data set doesn't match what I expected. I looked at the code and the "problem" happens here - the inputs are being compared without regard for the user's selected settings.
jaroWinkler("haka","Shakasi",{caseSensitive: false});// ~0.857jaroWinkler("haka","Hakatiz",{caseSensitive: false});// ~0.857 Expected this one to be equal to ~0.91// since the prefixes match in case insensitive mode
Hello,
I'm developing an app that uses this library. I think I found a possible bug, or at the very least, a surprising (to me) behavior.
When computing the distance between two strings in case-insensitive mode, the highest match in my data set doesn't match what I expected. I looked at the code and the "problem" happens here - the inputs are being compared without regard for the user's selected settings.
Example
I've provided an example here - typescript playground.
Actual Behavior
Expected Behavior
Workaround
Converting the strings to upper/lowercase ourselves avoids the issue entirely and results in the expected behavior:
Potential "fix"
Before the loop in line 95, add the very same check that's present in the jaro function:
The text was updated successfully, but these errors were encountered: