-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
Hi, my name is Cristiano and I'm using the library to determine how far someone has read, by comparing a transcript to a text to be read.
And strangely, for the same parameters and strings, the function find_near_matches returned two different results, in 5 to 6 times that i runned the script.
I'm using the version 0.7.3 of fuzzysearch.
I'm leaving an example of a script in which this case is happening. If you want, just run around 7 times to see the results changing at least two times.
Thanks in advance!
Example:
from fuzzysearch import find_near_matches
def fuzzy_extract(qs, ls, threshold):
for match in find_near_matches(qs, ls, max_l_dist=10):
match = ls[match.start:match.end]
index = ls.find(match)
yield (match, index)
ref = "bruna ficava perto da casa de fátima e brincava de bola perto da lagoa"
ret = list(fuzzy_extract("d dê néká m",ref,0))
print("fuzzy_search: "+str(ret))
P.S.: The text in the script is in Portuguese.