{'fraction_non_alphanumeric': 0.020239880059970013, 'fraction_numerical': 0.0074962518740629685, 'mean_word_length': 5.180555555555555, '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}}
Segmentation algorithm for Arabic handwritten text based on contour analysis

Segmentation is the process of dividing the binary image into useful regions according to certain conditions. It is the most important phase in any optical character recognition (OCR) system and its accuracy affects significantly the recognition rate of that system. In cursive nature languages such as Arabic, the segmentation procedure is complicated especially in handwritten documents because writers' styles differs as well as the special cases of characters overlapping and ligatures. Hence, the design of the segmentation algorithms must be based on general descriptors that most writers follow. In this paper, a segmentation algorithm for Arabic handwriting has been developed. The main idea of the algorithm is to divide the selected image into lines and sub-words. Then, for each subword, the contour of each sub-word is traced. After that, the algorithm detects the exact points where the contour changes its state from a horizontal line to another state of vertical or curved line. Finally, the coordinates of these points are considered as the segmentation points. The algorithm was tested over the IFN/ENIT database words. Over 537 tested words containing 3222 character; the algorithm achieved 89.4% of correct character segmentation points.