{'fraction_non_alphanumeric': 0.013175230566534914, 'fraction_numerical': 0.0, 'mean_word_length': 5.229508196721311, '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}}
Structure-preserving document image compression

Maintaining a document in image form is often preferable in order to avoid the high cost of manual conversion or the introduction of large numbers of errors by automatic OCR and/or graphics interpretation. The large volume of data in the image can be greatly reduced by using compression techniques. Text-intensive document images typically have a great deal of redundancy in the bitmap representations of symbols, and we make use of that redundancy for compression by clustering components, representing each cluster by a template and encoding the error. Our method is novel in modeling the error associated with each cluster and in preserving structure, an important component for readability and processing.