# Hybridizing Fuzzy String Matching and Machine Learning for Improved Ontology Alignment
## 4 Proposed Method
13.otLabels \(\leftarrow\) SPARQL(
14.\"SELECT DISTINCT? label
15.WHERE [ <\"+uriTarget+\"> rdfs:label? label]\"
16.) 17.EndFor
18.For each sourceElem, targetElem in oslabels, otlabels Do
19.scLev \(\leftarrow\) [PERSON](sourceElem, targetElem)
20.scLcs \(\leftarrow\) [PERSON](sourceElem, targetElem)
21.scJaccard \(\leftarrow\) [PERSON](sourceElem, targetElem)
22.scJaro \(\leftarrow\) [PERSON](sourceElem, targetElem)
23.scBert \(\leftarrow\) [PERSON](sourceElem, targetElem)
24.EndFor
* finalScores.AddRow(scBert, scJaro, scLev, scLcs, scJaccard)
* (27). * **For each** score, row **in** refAMLFile, finalScores **Do**
* (29) finalScores.AddColumn(row, score)
* (30) **EndFor**
* (31). * (32) SMKnnModel \(\leftarrow\) SM-KNNTraining(finalScores)
* (33) SMSvrModel \(\leftarrow\) SM-SVRTraining(finalScores)
* (34) SMDtrModel \(\leftarrow\) SM-DTRTraining(finalScores)
* (35). * (36) smKNNScores \(\leftarrow\) getScorePredictions(SMKnnModel, finalScores)
* (37) smSVRScores \(\leftarrow\) getScorePredictions(SMSvrModel, finalScores)
* (38) smDTRScores \(\leftarrow\) getScorePredictions(SMDtrModel, finalScores)

## 5 Experimental Results and Discussion

As explained in Algorithm 1, the AML alignment system was used as the baseline for generating the reference similarity scores, for training the classifiers in the proposed method. Furthermore, the reference alignment provided in OAEI 2022 prescribed a similarity score of 1.0 for each pair of aligned classes. By setting the threshold to 0.60 in the AML system, we were able to obtain 1400 pairs of similar classes from the _mouse_ and _human_ ontologies. Three different thresholds, 0.70, 0.80, and 0.90, were used to evaluate the performance of the algorithms in the proposed method. In the following subsections, we present the similarity scores obtained by the fuzzy string-matching algorithms and BERT. This is followed by an analysis of the performance of these algorithms, in terms of precision, recall, F1-score, and accuracy. Finally, the performance of the proposed method is evaluated by analyzing the performance of the three hybrid models of the proposed method, namely, SM-kNN, SM-SVR, and SM-DTR, using the precision, recall, F1-score, and accuracy, as well as the running time, MSE, and RMSE. ### Performance Evaluation of Fuzzy String-Matching Algorithms and BERT

Table 2 provides the top 10 best similarity scores for the fuzzy string-matching algorithm, the BERT deep learning model, as well as the similarity scores obtained by the AML reference system. The scores are ranked from the highest (Sc1) to the lowest (Sc10). It can be seen that the Jaro-Winkler algorithm achieved the highest similarity score compared to the other fuzzy algorithms. In contrast, BERT recorded the best similarity score of 1.0, indicating close semantic relations between the input ontologies. Table 2 further indicates that the Jaccard, Levenshtein, and LCS fuzzy string-matching algorithms yielded equivalent similarity scores to the baseline's performance of 0.94 for some pair of classes in the input ontologies. However, the Jaro-Winkler algorithm performed better than the baseline score, achieving a higher similarity score of 0.96 for some pair of classes in the input ontologies. Furthermore, although the remaining scores for Levenshtein, LCS, and Jaccard algorithms are slightly lower than the baseline's performance of 0.94, the Jaro-Winkler algorithm achieved better similarity scores than the baseline for the remaining scores in Table 2. In contrast, BERT demonstrated consistent and superior per