Spaces:
Sleeping
Sleeping
File size: 299 Bytes
ef2509f | 1 2 3 4 5 6 7 8 9 | from fuzzywuzzy import fuzz, process
from constants import builders
def find_best_match(query):
best_matches = process.extractBests(query, choices=builders, scorer=fuzz.token_set_ratio, limit=3)
best_matches.insert(0, " ")
return "\n".join([str(item[0]) for item in best_matches])
|