kailash
kailash

Reputation: 21

How to calculate semantic similarity of words in two strings using WordNet path algorithm

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

Answers (1)

Mehdi
Mehdi

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 C_p and C_q are corresponding set of synsets in these two texts conceptual similarity of two texts calculated by:

ss(p, q) = \frac{\sum_{c_1 \in C_p}{\max_{c_2 \in C_q} s(c_1, c_2)}}{| C_p |}

Which s(c_1, c_2) is the Wu-palmer similarity of two synsets.

Upvotes: 3

Related Questions