{'fraction_non_alphanumeric': 0.017878426698450536, 'fraction_numerical': 0.0023837902264600714, 'mean_word_length': 5.268656716417911, '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}}
Image and text correction using language models

We report on experiments with the use of learned classifiers for improving OCR accuracy and generating word-level correction candidates. The method involves the simultaneous application of several image- and text-correction models, followed by a performance evaluation that enables the selection of the best image-processing model for each document and the most likely corrections for each word. It relies on a training set comprising document images and their transcriptions, plus a domain corpus used to build the language model. It is applicable to any language with simple segmentation rules and performs well on morphologically-rich languages. Experiments with an Arabic newspaper corpus show a 50% reduction in word error rate, with per-document image enhancement a major contributor.