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
Hi, while porting some python code to java I discovered that the Token Sort and Token Set Ratios calculated by this library oftentimes do not match the ones calculated by the python fuzzywuzzy library.
Here is an example:
Python Code:
from fuzzywuzzy import fuzz
print(str(fuzz.token_sort_ratio("efwe fwef","wef wefwef")))
print(str(fuzz.token_set_ratio("efwe fwef","wef wefwef")))
Output:
53
53
Java Code:
import me.xdrop.fuzzywuzzy.FuzzySearch;
public class Main {
public static void main(String[] args) {
System.out.println(FuzzySearch.tokenSortRatio("efwe fwef","wef wefwef"));
System.out.println(FuzzySearch.tokenSetRatio("efwe fwef","wef wefwef"));
}
}
Output:
84
84
Where is this difference coming from? Shouldn't these two outputs be equal?
The text was updated successfully, but these errors were encountered:
We only ported the python-levenshtein module and not the built-in python difflib (for speed). Are you using the Python library with the python-levenshtein module installed?
Hi, while porting some python code to java I discovered that the Token Sort and Token Set Ratios calculated by this library oftentimes do not match the ones calculated by the python fuzzywuzzy library.
Here is an example:
Python Code:
Output:
Java Code:
Output:
Where is this difference coming from? Shouldn't these two outputs be equal?
The text was updated successfully, but these errors were encountered: