scramblingbalam / F2016_EECS595_NLP

Programing assignments for Natural Language Processing
0 stars 0 forks source link

B2: Use WordNet to measure similarity #5

Closed scramblingbalam closed 7 years ago

scramblingbalam commented 7 years ago

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