# Analysis of Recent Deep Learning Techniques for Arabic Handwritten-Text OCR and Post-OCR Correction
## 7 Discussion
### Robust OCR and Text-Correction Techniques  
There are works that are robust against difficult but limited conditions during OCR, which are limited to difficult paper conditions; however, no work is ultimately robust against all conditions, including a wide scope of text types and font variations. Moreover, even when facing difficult input conditions, there is still room and a need for development. The most robust OCR works from the analysis are described below  
[PERSON] et al. (2021) presented a CNN-Transformer trained on a custom dataset and KHATT with 7.27 CER and 8.29 WER. The architecture consists of 101 layers of Resnet101 and four encoders and decoders of Transformer, which are trained on multiple-length sequences of words. The main drawback is that it requires significant resources, millions of dataset examples, and high computational power, and it is a complex model that needs the availability of a large amount of annotated data for training, which are limited in Arabic. [PERSON] (2017) deployed a CNN-BLSTM-CTC architecture. The model was trained on 25,888 images of four printed fonts from P-KHATT, and then re-trained on KHATT and AHTID. The authors reported 2.03 CER and 15.85 WER. However, since the test was only conducted on 901 samples from the AHTID dataset, on which the model was trained it is uncertain how well the results can be generalized. Nevertheless, the current accuracy suggests a more robust result than those of other models when tested on other data. [PERSON] et al. (2018) utilized a CNN-RNN-CTC model. The dataset used was IFN/ENIT and 2.10 CER and 8.21 WER were reported. Five CNN and two RNN layers were trained on 487,350 samples after the augmentation. However, no testing of generalizations was conducted in this work. Nevertheless, their accuracy might suggest a better result than other models when tested on new data. [PERSON] (2021) used a CNN-RNN-CTC trained on multiple sets of Alexu, SRU-PHN, AHDB, ADAB, and IFN/ENIT. A beam-search decoder with data augmentation improved the results by using 63,403 words. The authors reported 0.94 CER and 2.62 WER, which are  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Work** & **Year** & **Technique** & **Dataset** & **CER** & **WER** & **Other Results** & **Description** & **Limitation(s)** \\ \hline \multirow{6}{*}{ \begin{tabular}{c} [PERSON]. [PERSON] \\ et al. \\ [69] \\ \end{tabular}  } & \multirow{6}{*}{2021} & \multirow{6}{*}{Four BiLSTMs} & \multirow{6}{*}{Tashkeela} & \multirow{6}{*}{3} & \multirow{6}{*}{8.99} & \multirow{6}{*}{N/A} & \multicolumn{6}{c}{Diactitics are} \\  & & & & &  
the best results from all the works analyzed if seen from a purely numerical perspective. However, only 5% of the training dataset was used to validate the model. Given the amount of data used for the training and the high results, this model, given the input conditions, may be the most robust under real-world testing. Similarly, no universal model can handle all conditions in text-correction steps. Nevertheless, many models are under development for dealing with difficult and complex texts, including the challenges of dialects and diacritization. The analysis revealed that much development is needed in this step. The current robust works on text correction are described below. [PERSON] et al. [61] combined AraBART with the SPIRAL dataset, which has eight kinds of error for training and testing. The best recall was reportedly 0.863, and it was for space-issued errors. However, an uneven distribution between the categories of error was noticeable, which may be the reason why the results were not better. Nevertheless, this high result suggests the potential for robust results if the model is trained on more datasets and shows the potential of applying more text embeddings. [PERSON] et al. [62] designed a model using AraVec, Bi-LSTM, attention mechanism, and a polynomial classifier for 150 error types. The used datasets were Arabic word lists for spell checking, Arabic Corpora3, KALIMAT4, and EASC5. The F-measure was quite reliable, at 93.89%.