Next, implement linSimilarities and resSimilarities using NLTK.
These functions are given a list of word pairs and a WordNet IC corpus, and each should return a dictionary of (word1, word2): score entries. For this exercise, represent each word in the pair as
the first noun in its WordNet synset. If no noun is found, represent it as the first verb in its
WordNet synset.
Note that the NLTK Lin scores are between 0 and 1; these will need to be scaled by a factor of 10
to be comparable to the human similarity scores.
3
Next, implement linSimilarities and resSimilarities using NLTK.
These functions are given a list of word pairs and a WordNet IC corpus, and each should return a dictionary of (word1, word2): score entries. For this exercise, represent each word in the pair as the first noun in its WordNet synset. If no noun is found, represent it as the first verb in its WordNet synset.
Note that the NLTK Lin scores are between 0 and 1; these will need to be scaled by a factor of 10 to be comparable to the human similarity scores.
Hint: You can find out more about NLKT’s similarity functions here: http://www.nltk.org/howto/wordnet.html