Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def jaro_apply(x):
try:
return jellyfish.jaro_distance(x[0], x[1])
except Exception as err:
if pandas.isnull(x[0]) or pandas.isnull(x[1]):
return np.nan
else:
raise err
def compute_jaro_distance(text, api_text):
return ({'Al': 'jellyfishjaro', 'Text': text, 'Score': (jellyfish.jaro_distance(api_text, text) * 100)})