# Burapha-TH: A Multi-Purpose Character, Digit, and Syllable Handwriting Dataset
## 3 Burapha-TH Dataset Construction
### Statistical Properties  
The raw standard collection sheet images of characters and digits form 1156 sheets, and after segmentation yielded 107,506 images. Simultaneously, there were 1920 sheets of Thai syllables, and those sheets were segmented to produce 279,730 images. We did not resize the images, making the sizes of images non-uniform. For the next step, Thai language experts eliminated some images by using majority voting. The conditions for eliminating images were: (1) incorrect writing, (2) unreadable, (3) heavily distorted, and (4) over edge cut. Some eliminated example images are shown in Figure 6.  
After unclear images were eliminated, the number of remaining characters and digits was 87,600 samples (19,906 were removed), and the number of remaining syllables was 268,056 (11,674 were removed). Thus, the total number of proper images is 355,656 samples, and 31,583, or about 8%, were discarded, as shown in Table 2.  
Figure 6: Example of eliminated images: (**a**) depicts incorrect writing, (**b**) depicts unreadable images, (**c**) shows examples of heavily distorted images, and (**d**) shows over edge cuts.  
Currently, Burapha-TH has three categories: characters, digits, and syllables. The character dataset has 68 classes consisting of 44 Thai characters, 20 Thai vowels, and 4 Thai tone markers. We separated it into 63,327 samples of the training set and 13,600 samples of the test set. The average number of images in the training set is about 931 samples in each class, and the minimum and maximum are 790 and 995. The testing set has 200 samples in each class.  
The digit dataset has 10 classes. We sequenced several Thai digits from zero to nine. The images have 10,673 samples, which we divided into training and testing sets with 8673 and 2000 samples, respectively. The average number of images in the training set is about 867 samples in each class, and the minimum and maximum are 772 and 923.  
We created a new Thai syllable dataset for extending handwriting recognition research. The number of images in the training and testing sets is 236,056 and 32,000 samples. The average number of images in the training set is about 738 samples, and 503 and 905 are the minimum and maximum counts. The statistics of the proposed Burapha-TH are described in Table 3.  
The Burapha-TH handwriting images are written in cursive forms, with or without a head, and they usually have several writing styles. We have tried to gather various collections of Thai scripts in our proposed datasets, as shown in Figure 7. The dataset has example consonants, vowels, and tone markers for characters. The digit dataset depicts Thai digits from zero to nine. Simultaneously, the syllable dataset consists of Thai syllables with different styles of consonants and vowels. The complete version of our proposed dataset includes Table A1 Thai characters with 68 classes, Table A2 Thai digits with 10 classes, and Table A3 Thai syllables with 320 classes.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Category** & **Collection Sheets** & **Segmented Images** & **Image Dataset** \\ \hline Character + Digit & 1156 & 107,506 & 87,600 \\ Syllable & 1920 & 279,730 & 268,056 \\
**Total** & **3076** & **387,236** & **355,656** \\ \hline \hline \end{tabular}
\end{table}
Table 2: The statistics of raw, segmented, and current data of Burapha-TH Dataset.  
\begin{table}
\begin{tabular}{l r r r} \hline \hline
**Statistic Topics** & **Character** & **Digit** & **Syllable** \\  & **Dataset** & **Dataset** & **Dataset** \\ \hline Number of Class & 68 & 10 & 320 \\ Number of Train & 63,327 & 8673 & 236,056 \\ sample & 13,600 & 2000 & 32,000 \\ Average sample in & 931 & 867 & 738 \\ Train/class & 790–995 & 772–923 & 503–905 \\ Number of samples & 200 & 200 & 100 \\ in Test/class & **3076** & **387,236** & **355,656** \\ \hline \hline \end{tabular}
\end{table}
Table 3: Number of images in our proposed Burapha-TH datasets.