I have a list consisting of some lines.I want to print the line matching word 'good' with highest fuzzyratio.
Problem: Its only printing word instead of line in the list
Coding:
from fuzzywuzzy import fuzz
c = ['I am python', 'python is good', 'Everyone are humans']
print(max(c, key=lambda a: fuzz.ratio(a, 'good')))
Expected Output:
python is good
I get a single word instead of line of highest fuzzyvalue from the list. Please help to fix my code! Answers will be appreciated!