This project aims to find the most suitable meaning from a pre-defined set of possible meanings to a word given the word in a context
The 2 best performing models of this research are bidirectional LSTM and SVM which are located in the Implementation folder.
- Python <=3.6
- Open terminal and cd into the repository you wish to clone the project
- Download and extract the WSD dataset in this directory from here
- Clone the git repo:
https://github.com/c1531958/Word-sense-disambiguation.git
or extract the submitted .zip file here - cd into the cloned/ extracted repository
cd Word-sense-disambiguation
- Install requirements. This also can be done in a virtual environment
pip install -r requirements.txt
NOTE. Depending on the operating system and Python version, you might need to specify different version of keras, numpy and tensorflow. These requirements were installed on Deepin 20 beta.
- Run the following command to run the code.
python .\Implementation\lstm.py
python .\Implementation\svm.py
This folder contains other code snippets to test other classifiers such as knn, naive bayes and random forest.
This folder contains code snippets to acquire data used in data analyses and code to plot Pearson Correlation graphs.