CommIT (Communication & Information Technology) Journal 13(1), 25–30, 2019

Javanese Document Image Recognition Using Multiclass Support Vector Machine

Yuna Sugianela1 and Nanik Suciati2 1−2Departemen Informatika, Fakultas Teknologi Informasi dan Komunikasi, Institut Teknologi Sepuluh Nopember Jawa Timur 60111, Email: [email protected], [email protected]

Abstract—Some ancient documents in Indonesia are uses the (writing continuously) written in the script. Those documents contain model [4] or script that does not use spaces or other the knowledge of history and culture of Indonesia, espe- . cially about . However, only a few people understand the . Thus, the automation system is Moreover, the of the Javanese script con- needed to translate the document written in the Javanese sists of 20 main characters which are syllabic. Javanese script. In this study, the researchers use the classification script also has Sandhangan character, Pasangan char- method to recognize the Javanese script written in the acter, Murda characters, Swara character, punctuation document. The method used is the Multiclass Support marks, and numbers [5–7]. There are several studies on Vector Machine (SVM) using One Against One (OAO) strategy. The researchers use seven variations of Javanese Javanese script and other ancient scripts in different script from the different document for this study. There culture and country. The topics of this research are are 31 classes and 182 data for training and testing data. about segmentation, feature extraction, recognition or The result shows good performance in the evaluation. classification, and transliteration. Reference [3] pro- The recognition system successfully resolves the problem posed the Hidden Markov Model (HMM) to recognize of color variation from the dataset. The accuracy of the study is 81.3%. the character of the Javanese script. The study had good performance. The accuracy is 85.7%. In 2017, Ref. [4] Index Terms—Javanese Script, Recognition, Classifica- improved the method on her research, but the accuracy tion, Multiclass Support Vector Machine, One Against One Strategy was still in 85.7%. Reference [2] also proposed the new method in recognition of the Javanese script. He used the deep learning technique to classify the dataset. .INTRODUCTION The datasets for his study were handwritten Javanese HE Javanese script is often used in ancient character. He showed a good result in performance Javanese documents that contain Javanese and with an accuracy of 94.57%. T The challenge in the study of Javanese script auto- Nusantara (Indonesian) culture [1]. However, only a matic translation system is to get a high accuracy in few people understand the Javanese script [2,3]. The the recognition system and solve the various kind of automation system is needed to translate the book script for the dataset. The variations are from the shape with the Javanese script. Thus, it will help people of the letter and color of the letter and background. to understand the document written in the Javanese In this study, the researchers propose a method in script and help people to study the knowledge of those classification to recognize the Javanese script written documents. in the document. The method used in the study is The automatic translation of the Javanese script the Multiclass Support Vector Machine (SVM). The consists of four main stages. The first stage is the strategy of the multiclass classification is One Against segmentation to get the Region of Interest (ROI) image, One (OAO). This method has been proposed in the each character of Javanese script, or letter. The second ancient script by Ref. [8]. In that study, they used step is feature extraction of each ROI. In the third English and Bengali script document for the dataset. step, each character is recognized as the alphabet using the classification method. The last step is combining II.LITERATURE REVIEW the alphabet into meaningful words. The Javanese A. Characteristics of the Javanese Script

Received: Jan. 10, 2019; received in revised form: Apr. 04, 2019; is one of popular culture that shows accepted: Apr. 09, 2019; available online: Apr. 30, 2019. the identity of Nusantara or Indonesian. Many intel- 1 Javanese Document Image Recognition using

Multiclass Support Vector Machine

Abstract— Some ancient documents in Indonesia are written in The challenge in the study of Javanese script automatic the Javanese script. Those documents contain the knowledge of translation system is to get a high accuracy in the recognition history and culture of Indonesia, especially about Java. However, only a few people understand the Javanese script. Thus, the system and solve the various kind of script for the dataset. The automation system is needed to translate the document written in variations are from the shape of the letter and color of the the Javanese script. In this study, the researchers use the letter and background. In this study, the researchers propose a classification method to recognize the Javanese script written in method in classification to recognize the Javanese script the document. The method used is the Multiclass Support Vector written in the document. The method used in the study is the Machine (SVM) using One Against One (OAO) strategy. The researchers use seven variations of Javanese script from the Multiclass Support Vector Machine (SVM). The strategy of different document for this study. There are 31 classes and 182 the multiclass classification is One Against One (OAO). This data for training and testing data. The result shows good method has been proposed in the ancient script by Tikader et performance in the evaluation. The recognition system al. [8]. In that study, they used English and Bengali script successfully resolves the problem of color variation from the dataset. The accuracy of the study is 81.3%. document for the dataset.

Index Terms—Javanese script, Recognition, Classification, II. Characteristics of the Javanese Script Multiclass Support Vector Machine, One Against One strategy. Javanese culture is one of popular culture that shows the identity of Nusantara or Indonesian. Many intellectual I. Introduction properties about the culture are written in the ancient book AVANESE script is often used in ancient using the Javanese script. The contents of ancient Javanese The J Javanese documents that contain Javanese and books are linguistics, myths, religion, philosophy, laws and Nusantara (Indonesian) culture [1]. However, only a few norms, folklore, kingdoms, and histories. people understand the Javanese script. [2], [3]. The The Javanese script consists of 20 main characters known as automation system is needed to translate the book with the ----. The name of Ha-Na-Ca-Ra-Ka is from five Javanese script. Thus, it will help people to understand the first letters of Javanese script. Figure 1 is the list of the main document written in the Javanese script and help people to character of the Javanese script. study the knowledge of those documents. The Javanese script also consists of Sandhangan letters. The automatic translation of the Javanese script consists of Those can change the pronounce of the main character. The four main stages. The first stage is the segmentation to get the main character can be added by one or more Sandhangan. For Region of Interest (ROI) image, each character of Javanese example, if there is the main character of Ha and Sandhangan script, or letter. The second step is feature extraction of Citeeach thisWulu, articleHa is changed as: Y. into Sugianela Hi. Moreover, and if there N. is Suciati, the main “Javanese Document Image Recognition Using Multiclass ROI. In the third step, each character is recognized asSupport the character Vector of Ka Machine”, and Sandhangan, CommIT Pepet and (Communication Cecek, Ka is & Information Technology) Journal 13(1), 25–30, 2019. alphabet using the classification method. The last step is changed into Keng. The example is shown in Fig. 2. combining the alphabet into meaningful words. The Javanese 2 script uses the scriptio continua (writing continuously) model TABLE I [4] or script that does not use spaces or other punctuation. THE SANDHANGAN LETTEROF JAVANESE SCRIPT. Moreover, the alphabet of the Javanese script consists of 20 main characters which are syllabic. Javanese script also has Sandhangan character, Pasangan character, Murda characters, TABLE I The SandhanganSandhangan Letter of Script. Meaning Meaning Swara character, punctuation marks, and numbers [5], [6], [7]. Sandhangan Name There are several studies on Javanese script and other Adeg-adeg Start of the sentence CecekStarting -ng ancient scripts in different culture and country. The topics of Adheg-adheg sentence this research are about segmentation, feature extraction, Koma , recognition or classification, and transliteration. Widiarti et al. Cecek -ng Layar -r [3] proposed the Hidden Markov Model (HMM) to recognize Koma ,

Pepet the character of the Javanese script. The study had good Layar -r performance. The accuracy is 85.7%. In 2017, Widiarti [4] Pepet e improved the method on her research, but the accuracy was Suku Suku u still in 85.7%. Wibowo [2] also proposed the new method in Fig 1. The main character of Javanese script. recognition of the Javanese script. He used the Deep Learning Taling e’ Fig. 1. TheFig 1. The main main charactercharacter of Javanese of Javanese script. script. Taling e’ Technique to classify the dataset. The datasets for his study Wulu i were handwritten Javanese character. He showed a good result Wulu i in performance with an accuracy of 94.57%. Taling - Tarung ----- Taling-tarung o + = Wignyan -h Wignya -h Titik . Titik Ha + Wulu = Hi . 2

a The other six datasets are the image of the Javanese script from the website. The examples of the dataset are shown in Table 2. Because of the good quality of the printed text, the + = + distance between the lines is consistent, but there are some + = overlaps between characters. From Table 2, it can be seen that Ka + Pepet + Cecek = Keng there are variations of shape and color of letters from a Ha + Wulu = Hidifferent source. b

Fig 2. The example combination main and Sandhangana letters of the Javanese Fig. 2.s Thecript: (a example) Hi, (b) Keng combination. main and Sandhangan letters of the Javanese script: (a) Hi, (b) Keng. Table 1 is an example of Sandhangan letters. In this study, the researchers only discuss the main and Sandhangan letters of the Javanese Script. Seven variations of Javanese script are lectualused properties from a different about+ document. the culture One+ of the are datasets written= is the in the printed document of the Javanese script. The document title is ancient book using the Javanese script. The contents of BloemlezingKa Uit Javaansche+ Pepet Werken + Cecek (Proza) published= in Keng ancient1942. Javanese Although booksthe title is are written linguistics, in Dutch, the myths,content of the religion, document is written with the . Figure 3 is philosophy,one of the laws documents and used norms, in this research. folklore,b kingdoms, and histories. Fig 2. The example combination main and Sandhangan letters of the Javanese The Javanese script (a)Hi,script (b) Keng. consists of 20 main characters known as Ha-Na-Ca-Ra-Ka. The name of Ha-Na-Ca-

Ra-Ka Table 1 is an example of Sandhangan letters. In this study, is the from researchers five only first discuss letters the ofmain Javanese and Sandhangan script. letters

Figure1 isof the the listJavanese of the Script. main Seven character variations of theof Javanese Javanese script are

script. used from a different document. One of the datasets is the The Javanese printed document script of also the Javanese consists script. of TheSandhangan document title is letters. Those Bloemlezing can change Uit Javaansche the pronounce Werken (Proza) of the published main in 1942. Although the title is written in Dutch, the content of the character.document The main is written character with the can Javanese be added Language. by Figure one 3 is

or more oneSandhangan of the documentsletter. used For in this example, research. if there is TABLE I The Sandhangan Letter of Javanese Script. the main character of Ha and Sandhangan Wulu, Ha Fig. 3. Dataset from Javanese script. Meaning Fig 3. Dataset from Javanese script. is changed intoSandhanganHi. Moreover, Name if there is the main

character of Ka and Sandhangan, Pepet and CecekStarting, Ka Adheg-adheg TABLE 2 The Example of Dataset from Different Source. is changed into Keng. The example is shownsentence in Fig. 2. Character Figure3Script is one of the documentsSource 1 usedSource in 2 thisSource research. 3 TableI is an example of SandhanganCecek letters.-ng In this Label Koma , study, the researchers only discuss the main and Sand- The other six datasets are the image of the Javanese Main Layar -r hangan letters of the Javanese Script. Seven variations script fromHa the website. The examples of the dataset of Javanese script are used fromPepet a different document.e are shown in TableII. Because of the good quality Main Suku u One of the datasets is the printed document of the of the printed text, the distance between thelines Javanese script. The documentTaling title is Bloemlezinge’ is consistent, butMain there are some overlaps between Uit Javaansche Werken (Proza) published in 1942. characters. From TableII, it can be seen that there are Wulu i Although the title is written in Dutch, the content of variations of shapeMain and color of letters from a different Taling - Tarung o the document is written----- with the Javanese Language. source. Main Wignya -h

Titik . Sandhangan Taling

26 The other six datasets are the image of the Javanese script Sandhangan from the website. The examples of the dataset are shown in Wignya

Table 2. Because of the good quality of the printed text, the Sandhangan distance between the lines is consistent, but there are some Pepet overlaps between characters. From Table 2, it can be seen that Sandhangan there are variations of shape and color of letters from a Suku different source. Sandhangan Cecek Cite this article as: Y. Sugianela and N. Suciati, “Javanese Document Image Recognition Using Multiclass

Support Vector3Machine”, CommIT (Communication & Information Technology) Journal 13(1), 25–30, 2019.

TABLEIII. IISupport Vector Machine (SVM) THE EXAMPLEOF DATASET FROM DIFFERENT SOURCE. SVM was developed by Boser, Guyon, Vapnik, and HOG feature ROI presented the first time in 1992 in the Annual Workshop on extraction Script CharacterComputational Label Source Learning 1 Theory Source [9] 2. The Source concept 3 of SVM is the combination of computation theories that have existed Ha Main many years before such as margin hyperplane [10]. The basic Da Main idea of SVM is a linear classifier, but in the next development, Pa SVMMain can be used in the non-linear problem by using the Ma kernelMain trick concept. SVM is the method of learning machine Nya thatMain has a basic idea of Structural Risk Minimization (SRM). Multiclass Labelled ROI Taling SandhanganSVM works by finding the best hyperplane in the input . Hyperplane in the vector room in dimension d is d-1 SVM Wignya Sandhangandimension affine subspace that separates the vector room into Pepet Sandhangantwo parts that each of them corresponds to different classes Fig 4. The flow of the proposed method. Suku Sandhangan[11]. Fig. 4. The flow of the proposed method. In general, problems in the real world are rarely linear Cecek Sandhangan separable. Most of those are non-linear. To solve this problem, IV. Results and Discussion SVM is modified using kernel functions. In this study, the researchers use the Radial Basis Function (RBF) kernel [12]method.. First, it is getting ROI from the document The dataset for this research is from the printed document As mentioned in the Burges tutorial [13], the SVM methodimage. Second, each ROI image will be processed B. Support Vector Machine (SVM) and images from the website. The researchers select the main has been used for pattern recognition cases such as for isolated in featurecharacter extraction and Sandhangan using for theROI from Histogram seven Javanese of Oriented script handwritten digit recognition [10] and text recognition [14]. In SVM was developed by Boser, Guyon, and Vapnik, documents. There are many variations in the size of ROI, so pattern recognition case, dataset input is classified into manyGradient (HOG). Third, after getting the feature vector and presented the first time in 1992 in the Annual the researchers normalize the size of ROI into 64 x 64 pixels. classes. To solve the problem, the multiclass SVMfrom the HOG process, getting the label of each ROI If the height and width of the original ROI are not the same Workshop on Computationalclassification is needed. Learning One popular Theory strategy [9]. The in multiclass usingand multiclass the width is SVM less than in height the classification, we will add pad stepin the willleft be concept of SVMSVM is is theOAO. combination This strategy builds of an computation SVM for each pair of done.and The right label side. of More theover, document the researchers consists will ofadd name pad in and theories that haveclasses, existed so it is manyalso known years as pairwise before [15] such. This as method is kind (mainabove and or belowSandhangan side when the). height is less than the width. margin hyperplanelike a[ 10 knockout]. The system basic in idea the football of SVM tournaments is a . For a Thus, the height and width will be the same. problem with k classes, k ( k – 1 ) / 2 SVMs are trained to Figure 5 is the detail of the number for each letter we used linear classifier,separate but in the the input next dataset development, of a class from SVMthe dataset can of another for the IV. dataset. RESULTS The total AND of the D datasetISCUSSION is 182 images of be used in the non-linearclass [16]. problem by using the kernel Javanese script letter. Moreover, the researchers set the color trick concept. SVM is the methodIV. R ofesearch learning Method machine Theof datasetthe pad like for the this color research of the background is from image the of printed ROI. The doc- umentexamples and images of padding from step the are inwebsite. Fig 6b and The Fig researchers 6e. The that has a basic ideaIn this of study, Structural the researchers Risk use Minimization a multiclass SVM using number of datasets for each letter is different. (SRM). SVM worksOAO to recognize by finding the document the best of thehyperplane Javanese script. Figselecture the main character and Sandhangan for ROI in the input space.4 shows Hyperplane the steps of the in proposed the vector method room. First, it in is gettingfrom seven Javanese script documents. There are many ROI from the document image. Second, each ROI image will NUMBER OF DATASET dimension d is bed processed− 1 dimension in feature affine extraction subspace using the Histogramthat variations of in the size of ROI, so the researchers nor- separates the vectorOriented room Gradient into (HOG). two partsThird, athatfter getting each ofthe featmalizeure 8 the size of ROI into 64×64 pixels. If the height vector from the HOG process, getting the label of each ROI 7 them corresponds to different classes [11]. and width6 of the original ROI are not the same and the using multiclass SVM in the classification step will be done. 5 In general, problemsThe label of the in document the real consists world of name are and rarely kind (mainwidth or is less than height, the researchers will add pad 4 linear separable.Sandhangan Most). of those are non-linear. To in the3 left and right side. Moreover, the researchers solve this problem, SVM is modified using kernel will add2 pad in above and below side when the height is less1 than the width. Thus, the height and width will

functions. In this study, the researchers use the Radial 0

JA

LA

SA

TA

PA

KA

CA

RA

DA

HA

GA

NA

MA

WA

THA

NYA

DHA

NGA

TITIK SUKU

be the same. PEPET

CECEK

WULU

LAYAR KOMA

Basis Function (RBF) kernel [12]. As mentioned in the TALING WIGNYA Figure5 is the detail of the number forTARUNG each letter

Burges tutorial [13], the SVM method has been used ADHEG-ADHEG for pattern recognition cases such as for isolated hand- usedfor the dataset. The total of the dataset is 182 im- ages of Javanese script letter. Moreover, the researchers written digit recognition [10] and text recognition [14]. Fig 5. A number of datasets for each letter. In pattern recognition case, dataset input is classified set the color of the pad like the color of the background image ofThe ROI.next step The is extracting examples features of using padding the HOG step method. are in into many classes. To solve the problem, the multiclass The inputs in this stage are grayscale ROI image. HOG is a SVM classification is needed. One popular strategy Figs.6methodb and for6e. discriminating The number features. of datasetsThis feature for is a eachhistogram letter in multiclass SVM is OAO. This strategy builds an is different. SVM for each pair of classes, so it is also known as The next step is extracting features using the HOG pairwise [15]. This method is like a knockout system in method. The inputs in this stage are grayscale ROI the football tournaments. For a problem with k classes, image. HOG is a method for discriminating features. k(k − 1)/2 SVMs are trained to separate the input This feature is a histogram description based on edges dataset of a class from the dataset of another class [16]. and orientations that apply to object recognition. This method is widely used in face recognition, animals, and detection of vehicle images [17]. HOG is also used III.RESEARCH METHOD to extract features in the multiclass classification of In this study, the researchers use a multiclass SVM [18]. Reference [19] show the experiment result using OAO to recognize the document of the Javanese that the HOG method applied to Javanese scripts image script. Figure4 shows the steps of the proposed can achieve good accuracy for recognition.

27 4

description based on edges and orientations that apply to In Confusion Matrix, there is True Positive (TP) statistics, object recognition. This method is widely used in face which are the results of the correct system classification for recognition, animals, and detection of vehicle images [17]. class A. True Negative (TN) is the Non-A class. False Positive HOG is also used to extract features in the multiclass (FP) class is the Non-A class classified as an A class. Then, classification of Batik [18]. Sugianela [19] show the False Negative (FN) is A class which is classified as a Non-A experiment result that the HOG method applied to Javanese class. Figure 8 is an illustration of the confusion matrix [20]. scripts image can achieve good accuracy for recognition. There are some steps in the HOG method. It is started by System calculating the gradient of each pixel. After that, the ROI A class Non-A class image is segmented into four cells (32 x 32 pixels) to calculate the histogram cell. Fig 6c and 6f are examples of gradient A class TP FN illustration in the HOG method. Actual Every pixel in the cell gives the vote for a histogram Non-A FP TN channel based on orientation. The researchers use nine bin class orientations in voting to set the histogram value contribution. The number of voting is based on formula 3 - 4 in [19]. Fig 8. Illustration of the confusion matrix Histogram value in a cell is grouped with others to be normalized for reducing the difference of object brightness. The result shows good performance in the evaluation. There The number of the feature vector that the researchers get in are some mistakes in the model classification. Table 3 is a list this step is four cells x 9 bins = 36 feature vectors. Figure 7 is of mistakes in the recognition system. an example of the HOG results of Fig 6a. In this study, each class of letters has a different amount of training data. There are classes that have more than five training data such as Ha, Na, Ca, Ra, Ka, and Sandhangan Taling, Tarung, and Cecek. However, there are classes less than four training data such as Sandhangan Adheg-adheg, Titik, and Koma. This does not affect the classification results because the ROI classifies the class consisting of only one

a b c training data and has the correct results. The factor that impacts in misclassification is a similarity in the shape of the letter that gives the effect in similar value in the HOG. Figure 9 shows the detail results for each letter. The 4 recognition system successfully resolves the problem of color variation from the dataset. Most of the mistakes are from the Cite this article as: Y. Sugianela and N. Suciati, “Javanese Document Image Recognition Using Multiclass letters that have italic shape. It is shown in Table 3. d e f descriptionSupport Vector based on Machine”, edges and CommIT orientations (Communication that apply to &(FP) Information class is the Technology) Non-A class Journalclassified 13(1), as an 25A –class30,. 2019.Then, Fig 6. (a) Original ROI Ha, (b) Normalized ROI Ha, (c) Illustration of TABLE 3 object recognition. This method is widely used in face Falsegradient Negative in HOG Ha(FN), (d) isOriginal A class ROI whichTaling, (ise) Normalizedclassified ROI as aTaling Non, -(fA) EXAMPLE OF THE MISTAKE IN RECOGNITION SYSTEM recognition, animals, and detection of vehicle images [17]. class.Illustration Figure of g8radient is an inillustration HOG Taling .of the confusion matrix [20]. Actual HOG is also used to extract features in the multiclass Letter Classification Result 0.04 0.03 0.05 0.17 0.28 0.25 0.21 0.07 0.07 Class classification of Batik [18]. Sugianela [19] show the 0.04 0.03 0.05 0.18 0.28 System0.26 0.21 0.07 0.07 4 experiment result that the HOG method applied to Javanese 0.03 0.03 0.05 0.16 0.28 0.28 0.25 0.07 0.04 A class Non-A class Ya scripts image can achieve good accuracy for recognition. 0.03 0.03 0.06 0.15 0.28 0.28 0.27 0.08 0.04 Da

Theredescription are some based steps on in theedges HOG and method orientations. It is that started apply by to (FP) class is theA N classon-A class classifiedTP as an A classFN. Then, Fig.Actual 7. The example of Histogram of Oriented Gradient (HOG) calculatingobject the recognition. gradient of This each method pixel. is After widely that, used the inROI face FigFalse 7. The Negative example of(FN) HOG is feature A class vector which. is classified as a Non-A feature vector. Non-A FP TN Ca imagerecognition, is segmented animals, into four and cells detection (32 x 32 of pixels) vehicle to imagescalculate [17] . class. Figure 8 is an illustration of the confusion matrix [20]. class the histogramHOG is cell. also Fig used 6 cto an extractd 6f are features examples in ofthe gradient multiclass The next step in this study is classification using multiclass SVM with OAO strategy. Inputs for this stage are 36 feature illustrationclassification in the HOG of method. Batik [18] . Sugianela [19] show the System Ka vectors and a label for each letter. The researchers use all the Everyexperiment pixel in result the that cell the gives HOG the method vote for applied a histogram to Javanese Fig 8. Illustration of the confusion matrix dataset for training and testing data.A The class total classNon used-A classis 31, channelscripts based imag one can orientation. achieve good The accuracy researchers for recognitiouse ninen . bin Ya andThe the result total shows number good of datasetsperformance is 182 in. the evaluation. There orientationTheres in arevoting some to steps set the in thehistogram HOG method value .contribution. It is started by A class TP FN ToActual evaluate the performance of our proposed method, the The numbercalculating of votheting gradient is based of each on formula pixel. After 3 - that,4 in the[19] ROI. are some mistakes in the model classification. Table 3 is a list researchers test the accuracy. Accuracy is defined in equation Histogramimage valueis segmented in a cellinto four is groupedcells (32 x with 32 pixels) others to tocalculate be of mistakes in the recognitionNon-A system. FP TN the histogram cell. Fig 6c and 6f are examples of gradient (1).In this study, eachclass class of letters has a different amount of normalized for reducing the difference of object brightness. Nya Ba Fig.illustration 5. The number in the of HOG datasets method. for each letter. training data. There are classes that have more than five The number of the feature vector that the researchers get in 푇푃+푇푁 Fig. 8.퐴푐푐 Illustration= of the confusion × 100 matrix. (1) this stepEvery is four pixel cells inx 9 the bins cell = 36 gives feature the vecto vote rs. for Fig a ure histogram 7 is training Fig 8. Illustration data such푇푃 of+푇푁 the as+ confusion퐹푃 Ha,+퐹푁 Na, matrix Ca, Ra, Ka, and Sandhangan an examplechannel of basedthe HOG on orientation.results of Fig The 6a. researchers use nine binTaling, Tarung, and Cecek. However, there are classes less Taling Ga orientations in voting to set the histogram value contribution. The result shows good performance in the evaluation. There than four training data such as Sandhangan Adheg-adheg, The number of voting is based on formula 3 - 4 in [19].Titik are, andsome Koma. mistakes This in does the modelnot affect classification. the classification Table 3 isresults a list Histogram value in a cell is grouped with others to bebecause of mistakes the ROI in the classifie recognitions the system. class consisting  of only one In thisc study,j=1 − eachθ class of letters has θa different1 amount of normalized for reducing the difference of object brightness.training νj = dataµ and has thefor correct bin to results.j = − mod B, training data.w There are classes that havew more2 than five The number of the feature vector that the researchers get in The factor that impacts in misclassification is a similarity in training data such as Ha, Na, Ca, Ra, Ka, and Sandhangan(1) this step is four cells x 9 bins = 36 feature vectors. Figure 7 isthe shape of the letter that gives the effect in similar value in Taling, Tarung, and Cecek. However, there are classes less an example of the HOG results of Fig 6a. the HOG. Figure 9 showsθ − c thej detail results for each letter. The a b c than fourνj+1 training= µ data suchfor as bin Sandhangan to j = j + Adheg 1 mod-adheg B. , recognition system successfullyw resolves the problem of color Titik, and Koma. This does not affect the classification results(2) variationbecause from the the ROI dataset classifie. Mosts the ofclass the consistingmistakes are of from only onethe letterstrainingIt that shows datahave thatand italic hasν shape.as the the correct It contribution is shown results. in Table of the 3. histogram value,The µfactoras the that gradient impacts in on mis pixels,classificationc as the is middlea similarity angle in the shape of the letter thatTABLE gives 3 the effect in similar value in valueEXAMPLE in bin, OFθ asTHE the MISTAKE gradient IN orientationRECOGNITION angle SYSTEM at pixel, the HOG. Figure 9 shows the detail results for each letter.180 The d a e b f c w as the width of the middle angle value w = , recognition systemActual successfully resolvesClassification the problem Result of colorB Fig 6. (a) Original ROI Ha, (b) Normalized ROI Ha, (c) Illustration of andLetter B as bin width of the histogram used. variation from the Classdataset . Most of the mistakes are from the gradientFig. 6.in HOG (a) OriginalHa, (d) Original Region ROI of Taling Interest, (e) (ROI)NormalizedHa, (b)ROI NormalizedTaling, (f) Illustration of gradient in HOG Taling. lettersThe that next have step italic in thisshape. research It is shown is in classification Table 3. using Region of Interest (ROI) Ha, (c) Illustration of gradient in Histogram multiclass SVM with OAO strategy. Inputs for this of Oriented Gradient (HOG) Ha, (d) Original Region of Interest Da Ya 0.03 0.05 0.17 0.28 0.25 0.21 0.07 0.07 0.04(ROI) Taling, (e) Normalized Region of Interest (ROI) Taling, (f) stage are 36 feature vectorsTABLE and 3 a label for each letter. 0.04 0.03 0.05 0.18 0.28 0.26 0.21 0.07 0.07 Illustration of gradient in Histogram of Oriented Gradient (HOG) The researchersEXAMPLE OF THE use M allISTAKE the IN dataset RECOGNITION for training SYSTEM and 0.03 0.03 0.05 0.16 0.28 0.28 0.25 0.07 0.04 Taling. d e f Actual Classification Result 0.03 0.06 0.15 0.28 0.28 0.27 0.08 0.04 testingLetter data. The total class used is 31, andCa the total 0.03 Fig 6. (a) Original ROI Ha, (b) Normalized ROI Ha, (c) Illustration of DhaClass Fig 7. Thegradient example in HOG of HOG Ha, (d) feature Original vector ROI. Taling, (e) Normalized ROI Taling, (f) number of datasets is 182. Illustration of gradient in HOG Taling. To evaluate the performance of ourKa proposed The next step in this study is classification using multiclass GaDa Ya 0.04 0.03 0.05 0.17 0.28 0.25 0.21 0.07 0.07 method, the researchers test the accuracy. Accuracy is SVM with OAO strategy. Inputs for this stage are 36 feature There0.04 0.03 are some0.05 steps0.18 in0.28 the 0.26 HOG 0.21 method. 0.07 It0.07 is vectors and a label for each letter. The researchers use all the defined in Eq. (3). Ya started0.03 by0.03 calculating 0.05 0.16 the gradient0.28 0.28 of each0.25 pixel.0.07 After0.04 La dataset for training0.03 and0.06 testing0.15 data.0.28 The0.28 total class0.27 used0.08 is 31,0.04 Ca that,0.03 the ROI image is segmented into four cells (32 × Dha and theFig total 7. The number example of HOG datasets feature is vector 182.. TP + TN Ta Acc = Nga × 100. (3) 32To evaluatepixels) to the calculate performance the of histogram our proposed cell. method, Figures the6c The next step in this study is classification using multiclass TP Ga+ TN + FP + FN Ka researchersand6f are test examples the accuracy. of gradient Accuracy illustration is defined in in the equation HOG Ba SVM with OAO strategy. Inputs for this stage are 36 feature Nya (1).method. vectors and a label for each letter. The researchers use all the La Ya dataset for training and testing data. The total class used is 31, Every pixel푇푃 in+푇푁 the cell gives the vote for a histogram In Confusion Matrix, there is True PositiveGa (TP) and퐴푐푐 the= total number of × datasets100 is 182 . (1) Taling Ta channel based푇푃+푇푁+퐹푃 on+퐹푁 orientation. The researchers use statistics, which areNga the results of the correct system

nineTo bin evaluate orientations the perform in votingance of to our set proposed the histogram method, the classification for class A. True Negative (TN) is the In Confusionresearchers Matrix,test the thereaccuracy. is True Accuracy Positive is defined (TP) statistics, in equation Ba value contribution. The number of voting is based Non-A class. FalseWaNya Positive (FP) class is thePa Non-A which(1). are the results of the correct system classification for class classified as an A class. Then, False Negative classon A Eqs.. True (Negative1)–(2)[ 19(TN)]. is Histogram the Non-A valueclass. F inalse a Positive cell is 푇푃+푇푁 Ga grouped퐴푐푐 with= others to be× 100 normalized forreducing (1) (FN) is A class whichTaling is classified as a Non-A class. 푇푃+푇푁+퐹푃+퐹푁 the difference of object brightness. The number of the Figure8 is an illustration of the confusion matrix [20]. feature vector that the researchers get in this step is In this research, each class of letters has a different In Confusion Matrix, there is True Positive (TP) statistics, Pa fourwhich cells are× 9 the bins results= 36 of feature the correct vectors. system Figure classification7 is an for amount of training data. There are classes that have exampleclass A of. True the Negative HOG results (TN) is ofthe Fig.Non6-Aa. class. False Positive more than five training data such as Ha, Na, Ca,

28 Cite this article as: Y. Sugianela and N. Suciati, “Javanese Document Image Recognition Using Multiclass Support Vector Machine”, CommIT (Communication & Information Technology) Journal 13(1), 25–30, 2019.

TABLE III TABLE IV THE EXAMPLESOFTHE MISTAKES IN RECOGNITION SYSTEM. THE COMPARISON WITH OTHER CLASSIFICATION METHOD.

Letter Actual Class Classification Result Classification Method Accuracy (%)

Da Ya RF 37.0 KNN 62.1 Dha Ca ANN 45.0 Ga Ka Multiclass SVM 81.3 La Ya Nga Ta Nya Ba for training and testing data. The result shows good performance in the evaluation. The accuracy of the Taling Ga evaluation is 81.3%. This is the best result compared Wa Pa to the other popular classification method (RF, KNN, and ANN). For further research, the segmentation method is needed to translate the document of the Javanese script automatically. The evaluation for another kind of - vanese script is also required such as Pasangan, Swara, Angka, and Murdha. Moreover, the recognition system successfully resolves the problem of color variation from the datasets, but there are still many mistakes from the letters that have italic shape. It can be solved by the method of feature extraction. Moreover, this kind of study can be done in printed Sundanese and because they have similar characteris- Fig. 9. The number of mistakes in each class. tics. The improvements are needed to recognize the ancient handwritten script. Ra, Ka, and Sandhangan Taling, Tarung, and Cecek. However, there are classes less than four training data REFERENCES such as Sandhangan Adeg-adeg, Titik, and Koma. This does not affect the classification results because the [1] A. R. Widiarti, A. Harjoko, and S. Hartati, “Pre- ROI classifies the class consisting of only one training processing model of manuscripts in Javanese data and has the correct results. characters,” Journal of Signal and Information The result shows good performance in the evalua- Processing, vol. 5, no. 04, pp. 112–122, 2014. tion. However, there are some mistakes in the model [2] M. A. Wibowo, M. Soleh, W. Pradani, A. N. classification. The factor that impacts in misclassifica- Hidayanto, and A. M. Arymurthy, “Handwritten tion is a similarity in the shape of the letter that gives Javanese character recognition using descrimina- the effect in similar value in the HOG. Figure9 shows tive deep learning technique,” in 2017 2nd Inter- the detail results for each letter. The recognition system national conferences on Information Technology, successfully resolves the problem of color variation Information Systems and Electrical Engineering from the dataset. Most of the mistakes are from the (ICITISEE). , Indonesia: IEEE, Nov. letters that have italic shape. It is shown in Table III. 1–2 2017, pp. 325–330. The researchers also compare the performance of [3] A. R. Widiarti and P. N. Wastu, “Javanese char- Multiclass SVM with other popular classification meth- acter recognition using hidden Markov model,” ods. It is compared with Random Forest (RF), K- International Journal of Computer, Electrical, Nearest Neighbor (KNN), and Artificial Neural Net- Automation, Control and Information Engineer- work (ANN). TableIV shows the comparison of Mul- ing, vol. 3, no. 9, pp. 2201–2204, 2009. ticlass SVM with other classification methods. It can [4] A. R. Widiarti, A. Harjoko, Marsono, and S. Har- be seen that Multiclass SVM has the best result. It tati, “The model and implementation of Javanese reaches 81.3% of accuracy. script image transliteration,” in 2017 Interna- tional Conference on Soft Computing, Intelligent V. CONCLUSION System and Information Technology (ICSIIT). For this study, the researchers use seven different Denpasar, Indonesia: IEEE, Sept. 26–29 2017, pp. documents. There are 31 classes and 182 datasets 51–57.

29 Cite this article as: Y. Sugianela and N. Suciati, “Javanese Document Image Recognition Using Multiclass Support Vector Machine”, CommIT (Communication & Information Technology) Journal 13(1), 25–30, 2019.

[5] Tim Ahli Bahasa Jawa, Pedoman penulisan Ak- Gradients for human detection,” in International sara Jawa. Yogyakarta: Yayasan Pustaka Nusa- Conference on Computer Vision & Pattern Recog- tama, 2002. nition (CVPR’05), vol. 1. San Diego, CA, USA: [6] A. M. Sulaiman, “Hanacaraka: Jawa yang IEEE Computer Society, June 20–25 2005, pp. mulai ditinggalkan,” Institut Seni Indonesia, 886–893. Tech. Rep., 2011. [Online]. Available: https: [18] M. N. Fuad and N. Suciati, “Klasifikasi multilabel //bit.ly/2IpgEa0 motif citra batik menggunakan boosted random [7] A. R. Widiarti, A. Harjoko, and S. Hartati, “Line ferns,” JUTI: Jurnal Ilmiah Teknologi Informasi, segmentation of Javanese image of manuscripts in vol. 16, no. 1, pp. 79–89, 2018. Javanese scripts,” International Journal of Engi- [19] Y. Sugianela and N. Suciati, “Ekstraksi fitur neering Innovations and Research (IJEIR), vol. 2, pada pengenalan karakter Aksara Jawa berbasis pp. 239–244, 2013. Histogram of Oriented Gradient,” JUTI: Jurnal [8] A. Tikader and N. Puhan, “Histogram of Oriented Ilmiah Teknologi Informasi, vol. 17, no. 1, pp. Gradients for English-Bengali script recognition,” 64–72, 2019. in International Conference for Convergence for [20] Y. Sugianela, Q. L. Sutino, and D. Herumurti, Technology-2014. Pune, India: IEEE, April 6–8 “EEG classification for epilepsy based on wavelet 2014, pp. 1–5. packet decomposition and random forest,” Jurnal [9] A. S. Nugroho, A. B. Witarto, and Ilmu Komputer dan Informasi, vol. 11, no. 1, pp. D. Handoko. (2003) Support Vector Machine 27–33, 2018. – Teori dan aplikasinya dalam bioinformatika. [Online]. Available: http://www.asnugroho.net/ /ikcsvm.pdf [10] C. Cortes and V. Vapnik, “Support-vector net- works,” Machine Learning, vol. 20, no. 3, pp. 273–297, 1995. [11] T. Zhang, “An introduction to Support Vector Ma- chines and other kernel-based learning methods,” Magazine, vol. 22, no. 2, pp. 103–104, 2001. [12] H. C. S. Ningrum, “Perbandingan metode Support Vector Machine (SVM) Linear, Radial Basis Function (RBF), dan Polinomial Kernel dalam klasifikasi bidang studi lanjut pilihan alumni UII,” 2018. [Online]. Available: https: //dspace.uii.ac.id/handle/123456789/7791 [13] C. J. Burges, “A tutorial on Support Vector Ma- chines for pattern recognition,” Data Mining and Knowledge Discovery, vol. 2, no. 2, pp. 121–167, 1998. [14] T. Joachims, Advances in kernel methods - Sup- port vector learning. Cambridge, Massachusetts: The MIT Press, 1998, ch. Making large-scale SVM learning practical. [15] B. Aisen. (2006) A comparison of multiclass SVM methods. [Online]. Available: https://courses.media.mit.edu/2006fall/ mas622j/Projects/aisen-project/ [16] J. Milgram, M. Cheriet, and R. Sabourin, ““One Against One” or “One Against All”: Which one is better for handwriting recognition with SVMs?” in Tenth International Workshop on Frontiers in Handwriting Recognition. La Baule, France: Suvisoft, Oct. 23–26 2006. [17] N. Dalal and B. Triggs, “Histograms of Oriented

30