I have a string and a list of strings. I just want to know which text in the list is 100% partially matched with the given string.
from fuzzywuzzy import fuzz
s1 = "Hello"
s_list= ["Hai all", "Hello world", "Thank you"]
fuzz.partial_ratio(s1, s_list)
For this am getting 100. Since "Hello" has a partial match with "Hello world" But how can I get "Hello World" as output?
Could anyone help me with this? Thanks in advance.
You do not need fuzzywuzzy for exact matching. Fuzzywuzzy is for fuzzy matching. Fuzzywuzzy cannot produce indexes for matches precisely because, in general, there is no "match", just distances.
All you need is Python.