{'fraction_non_alphanumeric': 0.015267175572519083, 'fraction_numerical': 0.0, 'mean_word_length': 5.654822335025381, '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}}
Wavelet preprocessing in optical character recognition

Using wavelet decompositions to obtain compressed input data for optical character classifiers is a natural idea. However, extensive character preprocessing, maybe by other, different, techniques is usually necessary to achieve adequate recognition rates. We show how, prior to that compression, wavelet techniques can also be used in tasks such as character localization, filtering and scaling that are essential to obtain good recognition performances. We propose a fast two pass bottom-up procedure to perform these tasks over the Haar multiresolution decomposition of single black and white characters. Starting at the lowest resolution, filtering is performed first, yielding as a by-product a first set of character localization and scaling parameters. Carrying those steps upwards in the resolution decomposition allows finer grain filtering and more precise localization and scaling values. Once the desired decomposition level has been reached, actual scaling is performed transforming the resulting wavelet coefficients in terms of a mapping of the new scale basis functions upon those of the original one. Our algorithms have essentially the same order complexity as multiresolution decompositions and can be carried out in integer arithmetic.