I want to check this - user='Jefferey Roberts' and fuzzywuzzy is giving this result - result=[('Jeremiah James Roberts Jr', 86), ('Jeffrey Scott Roberts', 81), ('Jeremiah J Roberts', 71)]
Code -
from fuzzywuzzy import process
user='Jefferey Roberts'
result=['Jeremiah James Roberts Jr', 'Jeffrey Scott Roberts', 'Jeremiah J Roberts']
output=process.extract(user,result)
print(output)
It should have given more scores to the second element of the result list.
And similarly, if I am using get_close_matches of difflib module for this list ['Gary Wayne Waller', 'Zayn Waller', 'Debra Kay Waller'] and search for 'Gary Waller', it returns Zayn Waller instead of Gary Wayne Waller at first index'
Code-
from difflib import get_close_matches
user='Gary Waller'
result= ['Gary Wayne Waller', 'Zayn Waller', 'Debra Kay Waller']
output=get_close_matches(user,result)
print(output)
Please help with any solution or any better accurate module other than fuzzywuzzy and get_close_matches.