Question: Q 1 . Lesk Algorithm for Word Sense Disambiguation: Code [ 1 0 ] In this question, you will implementing Simplified Lesk algorithm for Word

Q1. Lesk Algorithm for Word Sense Disambiguation: Code [10]
In this question, you will implementing Simplified Lesk algorithm for Word Sense Disambiguation task.
1. Load SemCor corpus using NLTK ^(1) with semcor. sents(). Similarly, load WordNet model in NLTK as import wordnet as wn. Randomly select 50 sentences and store the sentences (sents()) and their corresponding tagged version (tagged_sents()) as data and labels for first 2 models.
2. Our first model for word sense disambiguation is Most Frequent Sense model, in which, as the name suggests, we choose most frequent sense for each word from the senses in a labelled corpus. For wordnet, this corresponds to the first sense in synset(). Using synset () and definition(), find the sense for each word. Evaluate and report the results using precision, recall and F-score.
3. Our second model is Simplified-Lesk algorithm as follows:
function SIMPLIFIED LESK(word, sentence) returns best sense of word.
Here, ComputeOverlap method calculates the number of words overlapping in the context
(sentence) and the definition of the word from wordnet excluding the stopwords. The sense with largest overlap is chosen.
4. Evaluate and report the results with tags from the dataset using precision, recall and F-score.
Q 1 . Lesk Algorithm for Word Sense

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!