Reputation: 21
I have one string of words say s1. I also have multiple strings in other set say s2, s3, s4.
I want to match the words in string s1 with each of the strings s2, s3 and so on. Based on the maximum similarity score, I want to find which strings from s2, s3 matches maximum with s1.
I want to use PATH algorithm of wordNet. Please suggest, what should be the best approach.
Upvotes: 1
Views: 1313
Reputation: 4318
For using path similarity in WordNet, first you need to disambiguate each word with their synset in WordNet. Then you can calculate the WordNet-based similarity of two texts.
In this paper, they called it conceptual similarity using Wu-Palmer path similarity. They basically considered synsets as concepts in the text, and Wu-Palmer path similarity as conceptual similarity measure.
If p and q are two texts, and and are corresponding set of synsets in these two texts conceptual similarity of two texts calculated by:
Which is the Wu-palmer similarity of two synsets.
Upvotes: 3