String fuzzy-matching From R to Python

Author: Magic-fanCreated Jul 6, 2021Updated Jul 8, 2021

I am trying to use string fuzzy-matching with both R and Python. I am actually using two packages:

  • stringdist from R
  • fuzzywuzzy from Python

When I try amatch("PARI", c("HELLO", "WORLD"), maxDist = 2) on R, I get NA as a result, which is intuitive. But when I try the same thing with Python : process.extract("PARI", ["HELLO", "WORLD"], limit = 2), I get [('world', 22), ('HELLO', 0)]

How could I get the same result as in R ?

Thanks in advance