seatgeek / fuzzywuzzy

Fuzzy String Matching in Python
http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/
GNU General Public License v2.0
9.21k stars 874 forks source link

what is the algorithm used for the extract process? #244

Open fandyputram opened 5 years ago

fandyputram commented 5 years ago

i've try several function from the fuzzywuzzy library and i've noticed that the process.extract and fuzzy.ratio return different score. Is the algorithm used in both of the function is different? if yes, what algorithm being used?

PotStove commented 5 years ago

I think it depend on the scorer param of process.extract. Default is fuzz.WRatio which differs from fuzzy.ratio. May check the function comment for detail.

progressify commented 4 years ago

you can specify what function you want to use for extraction:

example: process.extractOne(sentence, choises, scorer=fuzz.partial_ratio)