# Improving Text Recognition Accuracy for Serbian Legal Documents Using BERT
## 4 Evaluation
The summary evaluation results per test issue, containing average success rates and the highest success rates per issue, are presented in Table 4. The obtained evaluation results differed between epochs. The best results were obtained from the issues published in 2001, and the average success rate for all pages in this epoch was 71.49%. The pages published in 1990 had an average success rate for all pages of 67.7%, and the lowest average success  
Figure 4: Example of a scanned paragraph, year 1990. Figure 5: Merged OCR output for scanned paragraph in Figure 4. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Issues** & **Number of Pages** & \multicolumn{1}{c}{**Total Number of**} & \multicolumn{1}{c}{**Distinct Number of**} & \multicolumn{1}{c}{**Total Number of**} \\  & & **Examples** & **Paragraphs** & **Words** \\ \hline
2001 & 30 & 2569 & 984 & 24,624 \\
1990 & 35 & 5498 & 1297 & 28,568 \\
1975, 1983 & 34 & 6537 & 799 & 25,935 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The structure of test examples. rate was 59.8% for all pages published in 1975 and 1983 together. The highest average success rate per issue was for an issue published in 2001 with 18 selected pages, with this value being 74.96%. When analyzed individually, seven pages had a success rate higher than 80%, and the highest value per page was 88.3%. These results are very promising and confirm that our approach corrects most of the OCR inaccuracies. At this point, we would like to emphasize that a manual analysis was performed for all situations where the approach did not provide an appropriate correction proposal. The analysis results and the reasons for incorrect correction proposals are presented in the rest of this section. This additional analysis provides a deeper understanding of the potential improvements that we also present. During the analysis of the results, it was noticed that of all the tests that were not matched, in 41% of tests, the model suggested a synonym to the expected word, a correct word expressed in a different form or a different case, or the expected word consisting of multiple tokens, like words that consist of two words separated by a hyphen. Also, it was noticed that within unmatched terms, some of the domain values were repeated multiple times in the same and different form and case. Moreover, 4.7% of all tests were words consisting of two words separated by a hyphen, and in many cases, the model suggested one of the combined words in the adequate form and case. An example of such a case is presented in a scanned paragraph from an issue published in 1975 in Figure 6. The depicted paragraph contains 18 words that needed to be verified (underlined in green) due to the lower accuracy returned by OCR or the merging of words. The corresponding context generated based on the OCR output is presented in Figure 7, and all words that were not correctly recognized are highlighted in yellow. Within this paragraph, there were two cases of words consisting of two words separated by a hypent-_dydythitseno-_polimetuski_ and _dydythitseno-_polimetuske_--both instances of the usage of an adequate case of the term _socio-political_. Both examples could not be presented with a single token, and for both examples, the model returned the term _social_ in the Serbian Cyrillic language in the correct form and case. Furthermore, within this paragraph, there were three more cases in which the model returned incorrect values. However, one of these words could not be represented by a single token, and the model proposed a word with a similar meaning. For the remaining tests, the model returned correct values. An analysis of the obtained results showed that for some specific domains, the model returned incorrect results more often due to the lack of particular words or their correct form for the specific usage.