I have a list of strings as a query and a few hundrends of other lists of strings. I want to compare the query with every other list and extract a similarity score between them.
Example:
query = ["football", "basketball", "martial arts", "baseball"]
list1 = ["apple", "football", "basketball court"]
list2 = ["ball"]
list3 = ["martial-arts", "baseball", "banana", "food", "doctor"]
What I am doing now and I am not satisfied with the results is an absolute compare of them.
score = 0
for i in query:
if i in list1:
score += 1
score_of_list1 = score*100//len(list1)
I found a library that may help me fuzzywuzzy, but I was thinking if you have any other way to suggest.