Question: Q 2 . Neural Network Approach for WSD: Code [ 1 0 ] In this question, you will build WSD using a Bi - directional

Q2. Neural Network Approach for WSD: Code [10]
In this question, you will build WSD using a Bi-directional LSTM. You may use PyTorch for this task.
1. Load SemCor corpus using NLTK1 with semcor.sents(). Similarly, load WordNet model in NLTK2 as import wordnet as wn. Randomly select 50 sentences as the test set for this question and remaining sentences will be the train set. Build a vocabulary of all the words in the SemCor dataset and assign unique index to each word.
2. Extract WordNet tags as the labels for evaluation. Note that for stop words, the data does not have the tags.
3. Build a neural network model with an Embedding layer of dimension 100, Bi-directional LSTM layers, a Dense layer, and an output layer with the SoftMax activation function.
4. Train the model assuming your own hyper-parameters such as epochs, optimizer, learning rate, etc.
5. Evaluate the model using test set with metrics precision, recall, and F-score. Report the hyper-parameters used for model training.
6. With examples from test set, compare and analyse the results of the 3 modelsl. Your analysis will include the performance of each model, if the model is able to disambiguate the senses, if it fails then why, etc.
Q 2 . Neural Network Approach for WSD: Code [ 1 0

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!