Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to decrease False positive matches? (process.extract / WRatio) #328

Open
Pranav082001 opened this issue Aug 2, 2022 · 3 comments
Open

Comments

@Pranav082001
Copy link

I am using process.extract method, And I know it uses WRatio under the hood for calculating score. Following is the case in which I am getting very high score of 90 despite the string hardly equal. Is there any way to fix this in WRatio?

inp_name="america"

name_list=["american Futures and Options Exchange"]
        
process.extractOne(inp_name,name_list)

Output--> ('american Futures and Options Exchange', 90.0, 0)

PS: I know other alternatives likes fuzz.ratio, partial_ratio, token_sort_ratio. But WRatio works pretty well for my usecase. So any workaround for the same would be appreciated... Thanks!

@maxbachmann
Copy link

Maybe write your own version of WRatio, which does not fall back to the partial version of the algorithms.

@Pranav082001
Copy link
Author

Could you please help me. Do I need to set try_partial parameter False in def WRatio?

try_partial = True

@maxbachmann
Copy link

Yes thats what I would try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants