find a word or approximate word in another dataframe sentences in python
import pandas as pd
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
def checker(wrong_options,correct_options):
names_array=[]
ratio_array=[]
for wrong_option in wrong_options:
if wrong_option in correct_options:
names_array.append(wrong_option)
ratio_array.append(‘100’)
else:
x=process.
extractOne(wrong_option,correct_options,scorer=fuzz.token_set_ratio)
names_array.append(x[0])
ratio_array.append(x[1])
return names_array,ratio_array