# Hybridizing Fuzzy String Matching and Machine Learning for Improved Ontology Alignment
## 4 Proposed Method
\begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline \hline
**Algorithm** & **Sc1** & **Sc2** & **Sc3** & **Set** & **Sc5** & **Sc6** & **Sc7** & **Sc8** & **Sc9** & **Sc10** \\ \hline Levenshtein & 0.941176471 & 0.9375 & 0.93333333 & 0.93333333 & 0.93333333 & 0.928571429 & 0.928571429 & 0.928571429 & 0.928571429 & 0.928571429 \\ LCS & 0.941176471 & 0.9375 & 0.933333333 & 0.93333333 & 0.933333333 & 0.928571429 & 0.928571429 & 0.928571429 & 0.928571429 & 0.928571429 \\ Jaccard & 0.94 & 0.94 & 0.93 & 0.93 & 0.93 & 0.93 & 0.93 & 0.93 & 0.93 & 0.93 \\ [PERSON] & 0.960784314 & 0.95555556 & 0.95555556 & 0.95555556 & 0.95280952 & 0.952830952 & 0.952830952 & 0.94871949 & 0.944444444 \\ BERT & 1.000004 & 1.000002 & 1.000002 & 1.000002 & 1.000002 & 1.000002 & 1.000002 & 1.000002 & 1.000002 & 1.0000002 & 1.0000002 \\ AML System & 0.94 & 0.94 & 0.94 & 0.94 & 0.94 & 0.94 & 0.94 & 0.94 & 0.94 & 0.94 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Top similarity scores obtained by the algorithms. formance across all similarity scores, outperforming the fuzzy string-matching algorithms. The top similarity score obtained by BERT was the same for the remaining scores, but with higher scores than the other algorithms, including the baseline AML system. These results highlight the effectiveness of BERT in achieving high similarity scores, indicating its potential for improving ontology alignment. The performance of the fuzzy string-matching algorithms and BERT was further evaluated in terms of precision, recall, and F1-score. The confusion matrices for all the algorithms are given in Figure 3 for a threshold of 0.70. From the confusion matrices, it is evident that BERT outperformed the fuzzy string-matching algorithms with the highest number of true positives at 1247. Among the fuzzy string-matching algorithms, Jaro-Winkler had the best performance in terms of true positives. Once again, the confusion matrices indicate the potential of BERT in ontology alignment. Table 3 presents the performance of each algorithm at threshold 0.70, in terms of precision, recall, F1-score, and accuracy. It is shown that the Jaccard algorithm achieved the highest precision of 1.0, followed by Levenshtein, LCS, Jaro-Winkler, and BERT, with precision scores of 0.987, 0.970, 0.965, and 0.928, respectively. On the other hand, BERT achieved the highest recall score of 0.962, outperforming the other algorithms. BERT also recorded the highest F1-score compared to the fuzzy string-matching algorithms. In terms of accuracy, BERT obtained the highest accuracy of 89.6%, outperforming all fuzzy string-matching algorithms, and followed by the Jaro-Winkler algorithm as the second-best with 81.5% accuracy. Jaccard had the lowest accuracy score of 69.8%. Overall, at the threshold of 0.70, BERT outperformed the fuzzy string-matching algorithms in ontology alignment. Among the fuzzy string-matching algorithms, Jaro-Winkler consistently performed better than LCS, Levenshtein, and Jaccard. The threshold was increased to 0.80 to obtain the confusion matrixes in Figure 4 for the fuzzy string-matching algorithms and BERT deep learning model. Figure 3: Confusion matrix for fuzzy string-matching algorithms and BERT at threshold 0.70. (**a**) Levenshtein, (**b**) LCS, (**c**) Jaccard, (**d**) Jaro–Winkler, (**e**) BERT. Table 4 displays the performance of the fuzzy string-matching algorithms and BERT deep learning model at threshold 0.80. The increasing of threshold to 0.80 resulted in a significant drop in recall for all fuzzy string-matching algorithms, with only slight improvements in precision. As shown in Table 4, the [PERSON] algorithm remained the best-performing algorithm, achieving an F1-score of 0.744 and an accuracy of 62.8%. Despite underperforming in precision compared to the fuzzy string-matching algorithms, BERT outperformed the algorithms in terms of recall and F1-score, with values of 0.883 and 0.900, respectively.