Calculate similarity between sets of keywords in Python

349 views Asked by At

For my project I want to compare to sets of keywords that are stored in lists and obtain a similarity index.

An example would look like the following:

db_1: list of 5 keywords db_2: list of 10 keywords

The data was obtained mostly through web scraping and keyword engineering with rake_nltk therefore they don't exactly match. Semantically there are differences despite the keywords have the same meaning.

Is there any way to get a more or less reliable similarity index, to determine how similar the entries of db_1 and db_2 are?

Please find an example here: enter image description here

I tried to calculate similarity using the spacy library, nevertheless I can't import the module because my environment is not compatible with all versions I tried to install.

Do you know any alternatives?

0

There are 0 answers