# Analysis of Recent Deep Learning Techniques for Arabic Handwritten-Text OCR and Post-OCR Correction
## 6 Analysis of Recent Works
### Post-OCR Correction Works [61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71]  
[PERSON] et al. [61] created a large dataset of spelling errors, called SPIRAL, for use as data for training deep-learning models that aim to fix spelling errors due to the lack of such a large set in Arabic. They collected textual data from various newspaper sites, such as Okaz and available open Arabic corpora sites, such as Maktabah Shamlah. Subsequently, they normalized the text by pre-processing and removing the punctuation, duplicate words, and numbers. Next, they generated eight kinds of error. The total number of words was 248,441,892. In total, 80% of this resultant set was used to fine-tune a pre-trained model on AraBART and 20% was used for testing. The results showed that the highest recall values were 0.863 for space issues and 0.856 for Tachkil errors, while the lowest recall values were 0.337 for deletions and 0.644 for keyboard errors. [PERSON] et al. [62] proposed a framework to detect and correct spelling and grammatical errors at the word level using AraVec word embeddings, Bi-LSTM, an intra-sentence attention mechanism, and a polynomial classifier. The manually revised corpus contains 15 million erroneous Arabic words, along with their annotation and validation. Even though 150 types of errors were derived, including NER, syntax, and morphological errors, the classifier only performed a binary classification, as the error types are not provided in unsupervised learning. [PERSON] et al. [63] proposed a complex model to correct different types of spelling, syntax, and grammatical errors. The model is based on seq2 seq, but features a multi-head attention Transformer, because seq2 seq models suffer from exposure-bias issues during inference, such that previous target words are replaced by words generated by the model. Further, a model for noising to construct a synthetic dataset was applied to generate 272,352,599 training pairs of target words and sources injected with back-translation, spelling, and normalization errors. To achieve the dynamic aggregation of information across layers, a capsule network that applied expectation-maximization routing was devised. Lastly, Kullback-Leibler divergence was applied as a bidirectional regularization term in the training to improve the arrangement between left-to-right and right-to-left alignments, ultimately overcoming the exposure-bias problem. The best model evaluated on the QALB-2014 and QALB-2015 datasets displayed F1 scores of 71.82 and 74.18, respectively, by employing right-to-left, EM-routing, bidirectional agreement, and re-ranking L2R. The model proved its ability to detect and correct Arabic errors. [PERSON] et al. [64] addressed soft Arabic-spelling errors, which usually occur due to typography, since Arabic letters possess orthographic variations. The BiLSTM network was proposed to correct such spelling errors at the character level. The problem is formulated as a one-to-one sequence transcription. Stochastic error injection and transformed input are utilized to bypass the costly encoder-decoder model. For the training and validation, either classical Arabic (Tashkeela with 2312K words) or MSA Arabic (ATB3 with 305K words) were used. The best model corrects 96.4% of the injected errors at a rate of 40% and achieved a 1.28% character error rate on a real test set. [PERSON] et al. [65] presented an unsupervised approach depending on the confusion function in order to increase the amount of training sets by generating artificial data for training. A fine-tuned convolutional seq2 seq model comprising nine layers of encoder-decoder with an attention mechanism is developed. For enhancing performance, feature extraction and classification were combined into one task, and the stacking of layers is considered an efficient way of capturing long-term dependencies in the local context. The generated synthetic data had 18,061,610 words from QALB and Alwatan articles.