Comparison of Handwritten Recognition Methods on Arabic and Latin Characters

In this article, machine learning techniques and deep learning methods were applied to the digit datasets created using the Arabic and Latin alphabets, and the methods' performances were compared. Furthermore, each method was tested with various parameters, and the results were analyzed. In addition, this study also observed the recognizability of handwritten numeral datasets created using different alphabets. For experiments, an Arabic alphabet handwritten digit dataset (60,000 training and 10,000 testings) and a Latin alphabet handwritten digit dataset (60,000 training and 10,000 testings) were used. When the results of the experiment are examined, it is seen that successful results are obtained in the classification made with the MADBase dataset in some methods, and the classification made with the MNIST dataset in some methods. As a result, it can be stated that a method's handwriting character recognition success cannot be measured only by the classification made on a dataset. Also, the digits in the Arabic alphabet appear to be almost more recognizable than those in the Latin alphabet.


Introduction
Throughout history, handwriting recognition and comprehension have been seen as a problem to be solved, and different languages and alphabets have been developed for this. However, many algorithms and learning methods for handwriting recognition have been developed and continue to be developed today.
While developing handwriting recognition algorithms and methods, datasets can be used where needed, and in this context, datasets were created for commonly used alphabets, although not for all alphabets.
Pattern recognition, which is the most important stage of character recognition, was first taken into account by Grimsdale, and a study was conducted in this context [1]. However, most research on handwritten character recognition is based on a technique known as analysis by synthesis, proposed by Eden in 1968 [2]. This technique has been used in all methods, and structural character recognition approaches over time.
The creation of the CEDAR dataset, one of the handwritten Latin character datasets, dates back to 1994. It contains characters for handwritten words, letters, and numbers, such as city names and postal codes [3]. In 1995, NIST published the "Special Dataset 19," which consists of Latin script and cursive characters (letters and numbers). The NIST dataset has 62 labeled classes for numbers and letters [4]. In 1998, a 28x28 pixel MNIST (Modified-NIST) dataset, consisting of numbers (10,000 tests, 60,000 trainings), was published using the dataset published by NIST [5]. MNIST, consisting of Latin letters, is frequently used by researchers in many studies as a handwritten digit dataset.
Like the Latin alphabet, the Arabic alphabet is a universal one known worldwide. Arabic is officially used in 25 more than 300 million countries [6][7][8]. For this reason, the Arabic alphabet, like the Latin alphabet, is frequently the subject of research in handwritten character classification studies, and many studies are carried out in this field.
In this article, both machine learning techniques and deep learning methods were applied to handwritten digit datasets created using Arabic and Latin alphabets, and the recognition performances of the methods were compared. Some machine learning methods were applied with various parameters on handwritten datasets, and the results were analyzed. Likewise, the parameters specified by the authors in Deep learning methods were applied to handwritten datasets, and the results were examined. In addition, this study also compared the recognizability of handwritten digit datasets created using different alphabets (Latin and Arabic). The Arabic handwritten digit dataset MADBase [10] (60,000 training and 10,000 tests) and the Latin handwritten digit dataset MNIST [5] (60,000training and 10,000 tests) were used.

Related Works
Character datasets such as Arabic [9][10][11][12] and Latin [4,13,14] were created from different alphabets and languages to be used in handwriting character recognition. There are handwritten character recognition studies on many languages and alphabets in the literature. The literature review reveals some studies on handwritten character recognition and development.
It is reported that a 94% accuracy rate was obtained in the CNN-based handwritten digit recognition study conducted by the researchers using the MNIST dataset [15]. K-nearest neighbor (KNN) is a basic classification method that can be used for classification when the data distribution is unknown [16].
Karakaya states that in her study, where machine learning methods are applied to the MNIST dataset, the methods that provide the highest efficiency are the K-nearest neighbor algorithm and the K-mean algorithm [17]. In another study using Convolutional Neural Networks (CNN) with an MNIST dataset, 98.51% accuracy was reported for handwritten digit recognition [18]. Support Vector Machine (SVM) is a method proposed by Vapnik and attracting much attention in machine learning research. Numerous recent studies have shown that SVM can generally provide better overall performance, achieving better type accuracy than alternative data classification algorithms [19]. In this study, in which the MNIST dataset was used, it is stated that the highest accuracy rate of 95.88% among all machine learning algorithms was achieved with SVM, one of the machine learning algorithms, for the identification of handwritten digits [20].
In this study, in which a CNN-SVM hybrid model is proposed for handwritten digit recognition, it is reported that 99.28% classification accuracy is achieved for the MNIST dataset by combining the advantage of CNN and SVM classifiers in handwriting digit recognition [21]. Furthermore, it is stated that SVM, MLP (Multilayer Perceptron), and CNN methods based on Machine learning and Deep learning algorithms are applied by using MNIST, and CNN gives more successful results for handwritten digit recognition [22].

Materials and Methods
Many machine learning and Deep learning methods are used in handwriting character recognition studies. Therefore, the literature review decided to use our experiments' KNN and SVM models from machine learning methods, LeNet5 [5] and Effective CNN [17] models from deep learning methods. In addition, the Arabic alphabet handwritten digit dataset MADBase [10] (60,000 training and 10,000 tests) and the Latin alphabet handwritten digit dataset MNIST [5] (60,000 training and 10,000 tests) were used.

MNIST Database
MNIST dataset; It was published as 28x28 pixels, formatted and preprocessed, composed of only numbers (60,000 training, 10,000 tests), written in the Latin alphabet by approximately 500 participants [5]. Handwriting is frequently used in number recognition applications. Some character examples from the MNIST dataset are shown in Figure 1.

Deep Learning Methods
LeNet5 [5] is the oldest convolutional neural network, which takes the grayscale image as input and consists of a multilayer structure with learnable parameters. LeNet5 [5] model was applied to MNIST and MADBase datasets. In experiments with LeNet5, epochs size 30 and batch size 128 were used. The LeNet5 Model summary is shown in Figure 3.

Results and Discussions
Handwriting digit recognition experiments were carried out by using ML and DL methods on MNIST datasets created with the Latin alphabet and MADBase created with the Arabic alphabet, the performance of the methods was measured, and the results were compared. The results of the experiments with the KNN method are shown in Table 1, the results of the experiments with the SVM method in Table 2, and the results of the experiments with the DL (LeNet5 and Effective CNN) methods are shown in Table 3. When Table 1 is examined, it is seen that the MADBase dataset written in the Arabic alphabet has a better recognition rate than the MNIST dataset written in the Latin alphabet. Likewise, when examined in terms of KNN metrics, it is understood that the Cosine distance metric is more successful in both data sets than the Euclidean distance metric.  it is seen that the Gaussian kernel metric is more successful than the Linear and Poly metrics in both data sets.When Table 1 and Table 2 are examined together, the MADBase dataset written in the Arabic alphabet exhibits better recognition performance in Machine learning methods compared to the MNIST dataset written in the Latin alphabet. When Table 3 is examined, it is seen that the MADBase dataset written in the Arabic alphabet exhibits better classification performance with the LeNet5 method. Likewise, it is observed that the MNIST dataset, written in the Latin alphabet, exhibits better classification performance with the Effective CNN method.
Considering the parameter numbers of the LeNet5 and Effective CNN methods (Figure 3 and Figure 4), it is thought that the MADBase dataset shows better classification success with the methods containing fewer parameters.
When Table 1, Table 2, and Table 3 are analyzed together, it is seen that the MADBase dataset written in the Arabic alphabet has better classification success in many methods. This may be due to the diversity of participants (MNIST 500 participants, MADBase 700 participants). In addition, it can be said that the Arabic alphabet is more recognizable than the Latin alphabet. However, to make the final decision, it is thought that the number of participants should be the same and the participants should consist of the same people, with the number of images being equal.
When all the experimental results are examined, it is seen that Deep learning methods provide better classification results than Machine learning methods. However, it is understood that a model or method does not show the same recognition success in datasets written in different alphabets. It is thought that this problem can be overcome by considering datasets written in different alphabets while developing the model.

Conclusions
In this article, some of the known machine learning and deep learning methods are applied to handwritten digit datasets created with Arabic and Latin alphabets, and the results are compared. KNN and SVM were applied from machine learning methods, LeNet5 [5], and Effective CNN [17] models from deep learning. Experiments show that Arabic numerals are almost more recognizable than Latin numerals. When the results obtained are examined, it is thought that the recognition success of a method or a developed model cannot be measured with a dataset written using only one alphabet, and its real performance can be revealed by classification with datasets written in different alphabets. Therefore, in our future study, it is considered to compare the performances of frequently used methods with datasets composed of handwritten letters written in different alphabets and to analyze the results.

Declaration of Competing Interest:
The author declares that he has no conflict of interest.