# Reversal of the Word Sense Disambiguation Task Using a Deep Learning Model
## 5 Results
The training data excluded chart-bot generated examples of synsets in order to obtain consistency with the reference models (Most Frequent Sense (MFS) [18] and BERT\({}_{1024}\) 1-NN [1]). Additionally, it is essential to discuss the BERT\({}_{1024}\) 1-NN model, which played a pivotal role in our research. The BERT\({}_{1024}\) 1-NN model, which uses a BERT neural network [10], generates 1024-dimensional embedding vectors for each word in a sentence (using the first token's vector if a word is split). Word sense disambiguation is achieved by finding the closest training data vector to the new word's vector and assigning its corresponding synset value. This model's large size (>3 GB) limited its deployment on GitHub and motivated the development of the solution presented in this project. The evaluation in Table 1 focuses solely on nouns and verbs, aligning with the word forms used in the reference work [1]. While the BERT-2 NCA 1-NN model, using two fixed NCA components and a kNN classification with k = 1, exhibited a slightly lower F1 score compared with BERT\({}_{1024}\) 1-NN; the BERT-NCA k-NN model achieved a marginally higher F1 score. This improvement stemmed from its ability to dynamically determine the optimal number of NCA components and the k parameter for each lemma individually. This data-driven approach highlights the efficacy of dynamic parameter tuning in achieving superior performance for semantic classification tasks. Table 1 clearly demonstrates a significant improvement in the accuracy of noun classification for the WSD task when using neural networks such as BERT. Compared with the MFS baseline, which assigns the most frequent sense in the SemCor dataset to a word, BERT achieved an approximate 10% improvement in the F1 score (Table 1). This finding highlights the limitations of simple rule-based approaches and the effectiveness of deep learning for WSD. However, the observed improvement of 10% served as a basis for further exploration. We aimed to redefine the state of the art for WSD by pushing the boundaries of accuracy beyond this initial gain. This work further sought to transform WordNet into a formal ontology similar to established resources such as Cyc [30] or SUMO [31; 32]. This led to a two-pronged strategy: (1) enhancing the semantic knowledge base (WordNet) itself, and (2) enriching its training corpus with meticulously annotated sentences. The ultimate objective of this approach was to achieve near-perfect WSD accuracy. We implemented three distinct types of modifications to WordNet during the project. 1. **Refinement of the synsets**: To enhance the accuracy of sense representation, our system implements refinement of the synset. In specific cases, the system automatically replaces synsets with more contextually appropriate alternatives. For instance, in Figure 3, all training and testing examples containing words with the synset value level%1:26:00:: were automatically replaced with level%1:26:01::. The rationale for this replacement is detailed in Section 3. Notably, the system prioritizes user control, allowing easy modification or removal of these replacements through the synset_to_synset.tsv file. 2. **Pruning**: In the synset_to_synset.tsv file, we conveniently specify the DELETE keyword for synset values we wish to discard. These values correspond to synsets that have been identified as having negligible semantic value, especially those associated with niche domains. 3. **Expansion of the lexicon**: Novel synsets were introduced to broaden the scope and capture the evolving nature of language. Consider the word \"window\" as an example. While WordNet lacks a semantic meaning specifically denoting a user interface element in software systems, we addressed this gap by introducing new synset values. To achieve this, we updated the project file NewSynsets.tsv by adding the word \"window\". We provided a web address (such as a Wikipedia article) where information about this value can be found.