{'fraction_non_alphanumeric': 0.02086906803887936, 'fraction_numerical': 0.005202973127501429, 'mean_word_length': 4.98392062949025, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Improved Handwritten Tamil Character Recognition System Using Octal Graph

Problem Statement: Handwriting recognition has attracted voluminous research in recent times. The segmentation and recognition of the characters from handwritten scripts incorporates considerable overhead. Almost all the existing handwritten character recognition techniques use neural network approach, which requires lot of preprocessing and hence accomplishing these problems using neural network is a tedious task. Approach: In this study we propose a novel solution for performing character recognition in Tamil, the official language of the south Indian province of Tamil Nadu. Pursued by the preprocessing techniques, Segmentation, Normalization and Feature Extraction the approach utilizes octal graph conversion for recognizing off-line handwritten Tamil characters which improves the slant correction. The graph tries to represent the basic form of a letter independent of the style of writing. Using the weights of the graphs and by the appropriate feature matching with the predefined characters, the written characters are recognized. Results: The performance evaluation of off line handwritten Tamil character using octal graph conversion and the metrics based on ranks of the letters proves good Recognition Efficiency Conclusion: We show that, in practise, the proposed approach produces near optimal results besides outperforming the other methodologies in existence. Results indicate that the approach can be used for character recognition in other Indic scripts as well.


INTRODUCTION
Machine simulation of human functions has been a very challenging research field since the advent of digital computers. In some areas, which entail certain amount of intelligence, such as number crunching or chess playing, tremendous improvements are achieved. On the other hand, humans still outperform even the most powerful computers in the relatively routine functions such as vision [1] .
In this Overview, Character Recognition (CR) is an umbrella term, which has been extensively studied in the last half century and progressed to a level, sufficient to produce technology driven applications. Now, the rapidly growing computational power enables the implementation of the present CR methodologies and also creates an increasing demand on many emerging application domains, which require more advanced methodologies. Optical Character Recognition (OCR) deals with the recognition of optically processed characters rather than magnetically processed ones. OCR is a process of automatic recognition of characters by computers in optically scanned and digitized pages of text [2] . OCR is one of the most fascinating and challenging areas of pattern recognition with various practical applications. It can contribute immensely to the advancement of an automation process and can improve the interface between man and machine in many applications [3,4] .
Character and handwriting recognition has a great potential in data and word processing for instance, automated postal address and ZIP code reading, data acquisition in bank checks, processing of archived institutional records and more. Combined with a speech synthesizer, it can be used as an aid for people who are visually handicapped. As a result of intensive research and development efforts, systems are available for English language [5,6] Chinese/Japanese languages [7][8][9] and handwritten numerals [10,11] . However, less attention had been given to Indian language recognition. Some efforts have been reported in the literature for Devanagari [12] , Tamil [13] and Bangla [16] scripts. The need for OCR arises in the context of digitizing Tamil documents from the ancient and old era to the latest, which helps in sharing the data through the Internet.
Tamil Scripts: Tamil, the native language of a southern state in India, is one of the old languages in the world has several million speakers and is an official language in countries such as Sri Lanka, Malaysia and Singapore. It has been influenced by Sanskrit to a certain degree. But Tamil is unrelated to the descendents of Sanskrit such as Hindi, Bengali and Gujarati. Most Tamil letters have circular shapes partially due to the fact that they were originally carved with needles on palm leaves, a technology that favored round shapes [14] .
However, the case of Tamil is relatively simpler compared to other Indian scripts: the rules for character composition are far fewer than in other Indian scripts.
Tamil has a large alphabet size, which has 12 vowels, 23 consonants and one special character (AK). Vowels and consonants are combined to form composite letters; making a total of 247 different characters [15] . The only category of composition allowed is of Consonant-Vowel type, where a structure corresponding to a consonant and another corresponding to vowel are combined to form a C-V type character with a unique shape. Even this composition does not occur for all C-V combinations. In many cases the vowel modifier appears as a horizontally isolatable structure and hence text entry through QWERTY keyboard is cumbersome. The penetration of Information Technology (IT) becomes harder in a country such as India where the majority read and writes in their native language. Therefore, enabling interaction with computers in the native language and in a natural way such as handwriting is absolutely necessary.

Handwritten Character Recognition:
Handwriting recognition inherited a number of technologies from Optical Character Recognition (OCR). The main difference between handwritten and typewritten characters is in the variations that come with handwriting. It is also worth noticing that OCR deals with offline recognition while handwriting recognition may be required for both on-line and off-line signals.
(On-line means that data is captured as it is written. For offline, all the data is collected before processing starts).
On-line handwriting recognition involves the automatic conversion of text as it is written on a special digitizer or PDA, where a sensor picks up the pen-tip movements X(t),Y(t) as well as pen-up/pen-down switching. That kind of data is known as digital ink and can be regarded as a dynamic representation of handwriting. While the input of OCR is usually entire documents, the input of handwriting recognizers can be entire handwritten documents or small snippets of digital ink [17][18][19] .
Off-line processing is able to use only snapshots of the handwriting without time information. From off-line data, we do not have information on the order of strokes the user has used to write the character. It involves the automatic conversion of text in an image into letter codes, which are usable within computer and textprocessing applications. The data obtained by this form is regarded as a static representation of handwriting. The method we chosen are comparatively difficult for Offline handwriting Recognition. Because Recognition of any handwritten characters with respect to any language is difficult, since, the handwritten characters differ not only from person to person but also according to the state of mood of the same person. Among different branches of character recognition it is easier to recognize English alphabets [20] and Numerals [21,22] than Tamil characters [23,24] .
The process of handwriting recognition involves extraction of some defined characteristics called features to classify an unknown handwritten character into one of the known classes. A typical handwriting recognition system consists of several steps, namely: preprocessing, segmentation, feature extraction and classification. Several types of decision methods, including statistical methods, neural networks [25] , structural matching (on trees, chains and more) and stochastic processing (Markov chains and more) have been used along with different types of features. Many recent approaches mix several of these techniques together in order to obtain improved reliability, despite wide variation in handwriting. So we proposed a new approach, which solves the problems faced by existing approaches. The main advantage of the proposed system is which overcomes the problem of slant correction [26] . Slant is one of the characteristics that make handwriting harder to process automatically than printed text. The slant correction is so perfect that it recognizes characters written upside down too. Also the recognition is highly scalable.

MATERIALS AND METHODS
The proposed approach ventures a solution for offline handwritten recognition, which converts the letter written into an octal graph, by representing each pixel of the given character as a node of a graph. Each node has eight fields so termed as octal graph. The graph tries to represent the basic form of a letter independent of the style of writing. Using the weights of the graphs and by the appropriate feature matching with the predefined characters, the written characters are recognized. Figure  1 shows the octal graph representation of a Tamil character. An octal graph unlike a normal graph has a node with eight pointers and a data field. Based on the neighbouring pixels the pointer values are assigned to the various fields of the octal node. These octal nodes are connected to the other nodes based on the threshold value. Figure 2 shows the Octal Node Representation of a Tamil Character. Recognition Algorithm: The main objective of the architectural design of the recognition algorithm is to segment the characters accurately and efficiently and then converted the handwritten Tamil character in to octal graph. Figure 3 show the architectural design. Figure 4 shows the Recognition sequence diagram. It is an important step because inaccurately segmented text lines will cause errors in the recognition stage. Text line segmentation of the handwritten documents is still one of the most complicated problems in developing a reliable OCR [27] .

Fig. 5: Segmentation
The segmentation process separates the individual characters from the given input and the consecutive steps are as follows: • Assign a number for each pixel with the top left and assign a number 1 for that pixel and move row by row • If the pixel is unvisited and it has a visited pixel as its neighbour, assign its number to the current pixel. In case of more than one visited neighbouring pixel break the tie by choosing the least number. Also for an unvisited pixel with no visited neighbour, assign the next number to the pixel and continue till all pixels are assigned numbers • In the end, assign the same number for all the continuous patterns by traversing each pattern by DFS or BFS. Now each letter is assigned a unique numbers and can be separated with those numbers

Conversion of Input into Octal Graph:
The input character is converted into an octal graph by following steps: Normalization, Conversion, Identification of weighing factors and Feature matching.
Normalization: Before feature extraction, a number of normalization operations are applied to a text line. The normalization operations are slant correction, width normalization and vertical scaling. It was pointed out in [36] that these operations are important to achieve high text recognition rates. Because a high text recognition rate implies a high writer identification rate [37,38] , normalization is expected to be beneficial not only for text recognition, but also for writer identification. On the other hand, it can be argued that normalization is potentially harmful to writer identification, because the slant, the character width and the proportions between ascender, middle and descended zones of a text line contain writer specific information.
• Slant correction: First the normalization operation applied to a text line and the goal is to bring the handwriting into an upright position [39] . To correct the slant, the angle between the actual, quasi-vertical strokes and the y-axis has to be known. To calculate this angle, the angle distribution of the writing's contour points is accumulated in an angle histogram. The maximum value of the histogram is the slant angle. This angle is then used to normalize the slant of a text line. • Width normalization: The goal of this operation is to scale the width of a text line so that the average character length is normalized. • Vertical scaling: In that a text line can be divided into three zones: a zone containing the ascenders, the middle zone and a zone containing the descended. Our goal is to normalize the height of each of these three zones to a fixed size. This normalization is important in order to reduce the variability of the features While normalizing images of various sizes into a single standard size, there may be unwanted pixels that are set in a single stroke. This, if passed to the next stage as such, would result in complications in octal graph construction. Normalization is the conversion of images of various dimensions into fixed dimensions. Thus the normalized image map is subject to cleaning to remove any pixels such that no pixels that form a single line have more than two neighbouring set pixels. This is done by looking for pre defined pattern of pixels and removing them for cleaning. Normalisation of a character is shown in Fig: 6.

Fig. 6: Normalization
Octal Graph Conversion: The algorithm used for converting the image into an octal graph is critical because the octal graph should represent the features of the letter to a good extent. There are two factors that represent the extent to which the graph represents a letter. They are: • The distance between two nodes should be high enough to represent the features of the letter correctly and also low enough not to take up much memory • The number of directions in which linkages are possible is chosen as eight. This is because the number of directions in which the linkages are possible must be high enough to express the curvature of the letters correctly. Also it must be low enough to avoid a highly sparse direction pointer array The normalized image is then converted into an octal graph by considering the following steps: • Count the number of set neighbouring cell of each set cell and Push all the cell locations that have more than two neighbours or only one neighbour into a queue • If no elements are inserted into the queue, insert the top left cell into the queue and make all these cells in the queue as nodes of a graph • Repeat the process continuously for all set cells. If a cell has no unvisited set cell and none of its neighbouring cells are nodes, make the cell as a new node • Repeat the process till no new node is created in iteration and connect all the nodes created so far with proper direction linkages. Below Fig: 7 represent the octal graph formation.  Feature Extraction: A feature that varies from one individual writer to another is the slant of the handwriting. Training a classifier on writing that hasn't been slant corrected may require significantly more effort and training data. Consequently, slant removal is an operation that is found in almost any handwriting recognition system. A large number of features for isolated character recognition and corresponding extraction methods have been proposed. They include moments and quantities derived from series expansion, features based on projection profiles and on the contour [40] , as well as structural features such as endpoints, fork points, holes, length, shape, or curvature of individual strokes that occur as part of the character under consideration [41,42] . • The features that are to be considered for matching • The weight that is to be given to each feature The activity diagram of the proposed approach is shown in Fig. 9.

RESULTS AND DISCUSSION
An extensive performance evaluation for handwritten Tamil character using octal graph conversion and the metrics we evaluated are listed shows good Recognition Efficiency. The recognition ranks the letters and displays the top 3 ranked letters. If the letter is in the first spot, then it is 100% success, if it is in the second, it is 75% success, if it is in the third, then it is 50% success or else its failure. Based on this ranking an evaluation was done for each letter in the learning set and efficiency of recognition was evaluated for each letter. In Fig. 10, the graph displays the result of the evaluation.
The overall efficiency of the system was found to be 82%. The evaluation cases consisted of ten samples, which consist of 4 good samples, 4 misaligned samples and 2 extremely disfigured samples. This performance of our system is high considering the fact that the existing systems do not recognize disfigured inputs and misaligned inputs at all.

CONCLUSION
In this study we have proposed a new method of Handwritten Tamil Character Recognition where we have used octal graph conversion method to get the maximum possible efficiency of the algorithm. Classification and Normalization of off-line handwritten characters has been proven to be efficient on application of octal graph conversion models, which improves slant correction. Significant increase in accuracy levels has been found on comparison of our method with the others for character recognition. With the addition of sufficient pre processing the approach offers a simple and fast structure for fostering a full OCR system. The experimental results show that the accuracy is really improved than the previous study.