Token Classification
Transformers
French
German
ocr_qa_assessment
ocr
bloomfilter
unigram
impresso
quality-assessment
v1.0.6
custom_code
Instructions to use impresso-project/ocr-quality-assessor-unigram-light with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use impresso-project/ocr-quality-assessor-unigram-light with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="impresso-project/ocr-quality-assessor-unigram-light", trust_remote_code=True)# Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("impresso-project/ocr-quality-assessor-unigram-light", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:425 INFO: Namespace(input_files=['lex/de/realwords.rw.txt.bz2', 'lex/de/dewiki.unigram.freq.tsv.bz2', 'lex/de/nonwords.nw.txt.bz2'], bloom_path='build.d/fp_prob_0.00001/ocrqa-wp_v1.0.5-de.bloom', fp_probability=1e-05, log_level='INFO', log_file='build.d/fp_prob_0.00001/ocrqa-wp_v1.0.5-de.bloom.log', config=None, min_frequency=2, single_char_min_frequency=20, diagnose_bloom=True) | |
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:226 INFO: Starting Bloom Filter creation... | |
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:178 INFO: Processing nonword file: lex/de/nonwords.nw.txt.bz2 | |
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:187 INFO: Nonword tokens: | |
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:190 INFO: Excluded 1 words that should never be added | |
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:196 INFO: Processing real-word file: lex/de/realwords.rw.txt.bz2 | |
| 2025-02-10 09:54:25,418 ocrqa_create_bloom_filter.py:135 INFO: Processing frequency file: lex/de/dewiki.unigram.freq.tsv.bz2 | |
| 2025-02-10 09:54:37,205 ocrqa_create_bloom_filter.py:240 INFO: low_freq_excluded before removing parts from high-frequency words: 3780824 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:248 INFO: low_freq_excluded after removing parts from high-frequency words: 3288865 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:252 INFO: Lexical processing complete. | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - nonwords_read: 1 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - nonwords_count: 1 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - realwords_read: 8 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - realwords_accepted: 8 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - realwords_nonwords_filtered: 0 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - freq_words_read: 9199714 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - words_accepted: 4143119 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - subwords_accepted: 5029202 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - subwords_filtered: 1 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - low_freq_excluded: 3288865 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - single_char_words_filtered: 6719 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:256 INFO: - freq_words_filtered: 5049876 | |
| 2025-02-10 09:54:37,366 ocrqa_create_bloom_filter.py:259 INFO: Estimated word count: 3357976 | |
| 2025-02-10 09:54:38,245 ocrqa_create_bloom_filter.py:263 INFO: Bloom Filter created and saved to build.d/fp_prob_0.00001/ocrqa-wp_v1.0.5-de.bloom | |
| 2025-02-10 09:54:38,860 ocrqa_create_bloom_filter.py:285 INFO: Diagnosis Results: | |
| 2025-02-10 09:54:38,860 ocrqa_create_bloom_filter.py:286 INFO: - Excluded words in bloom filter: 0 | |
| 2025-02-10 09:54:38,860 ocrqa_create_bloom_filter.py:287 INFO: - Known words not in bloom filter: 0 | |
| 2025-02-10 09:54:39,386 ocrqa_create_bloom_filter.py:294 INFO: - Low-frequency words in bloom filter: 33 | |
| 2025-02-10 09:54:39,386 ocrqa_create_bloom_filter.py:300 INFO: - Proportion of excluded words in bloom filter: 0.00000000 | |
| 2025-02-10 09:54:39,386 ocrqa_create_bloom_filter.py:306 INFO: - Proportion of known words not in bloom filter: 0.00000000 | |
| 2025-02-10 09:54:39,386 ocrqa_create_bloom_filter.py:314 INFO: - Proportion of low-frequency words in bloom filter: 0.00001003 | |