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-28 23:52:03,275 ocrqa_create_bloom_filter.py:121 INFO: Git version: 50f305d | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:434 INFO: Namespace(input_files=['lex/lb/lbwiki.unigram.freq.tsv.bz2', 'lex/lb/wortschatz.freq.tsv.bz2', 'lex/lb/modern_spelling.rw.txt', 'lex/lb/old_spelling.rw.txt', 'lex/lb/ocr_errors.nw.txt', 'lex/lb/realword_ocr_errors.nw.txt'], bloom_path='build.d/fp_prob_0.00001/ocrqa-wp_v1.0.5-lb.bloom', fp_probability=1e-05, log_level='INFO', log_file='build.d/fp_prob_0.00001/ocrqa-wp_v1.0.5-lb.bloom.log', config=None, min_frequency=2, single_char_min_frequency=20, diagnose_bloom=True, git_version='50f305d') | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:229 INFO: Starting Bloom Filter creation... | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:181 INFO: Processing nonword file: lex/lb/ocr_errors.nw.txt | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,275 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:190 INFO: Nonword tokens: | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:193 INFO: Excluded 7 words that should never be added | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:181 INFO: Processing nonword file: lex/lb/realword_ocr_errors.nw.txt | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:193 INFO: Excluded 7 words that should never be added | |
| 2025-02-28 23:52:03,276 ocrqa_create_bloom_filter.py:138 INFO: Processing frequency file: lex/lb/lbwiki.unigram.freq.tsv.bz2 | |
| 2025-02-28 23:52:03,289 ocrqa_create_bloom_filter.py:163 WARNING: Skipping invalid line in frequency file lex/lb/lbwiki.unigram.freq.tsv.bz2: 446 | |
| 2025-02-28 23:52:03,591 ocrqa_create_bloom_filter.py:138 INFO: Processing frequency file: lex/lb/wortschatz.freq.tsv.bz2 | |
| 2025-02-28 23:52:03,814 ocrqa_create_bloom_filter.py:163 WARNING: Skipping invalid line in frequency file lex/lb/wortschatz.freq.tsv.bz2: | |
| 2025-02-28 23:52:03,814 ocrqa_create_bloom_filter.py:199 INFO: Processing real-word file: lex/lb/modern_spelling.rw.txt | |
| 2025-02-28 23:52:03,925 ocrqa_create_bloom_filter.py:199 INFO: Processing real-word file: lex/lb/old_spelling.rw.txt | |
| 2025-02-28 23:52:03,925 ocrqa_create_bloom_filter.py:243 INFO: low_freq_excluded before removing parts from high-frequency words: 156199 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:251 INFO: low_freq_excluded after removing parts from high-frequency words: 113360 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:255 INFO: Lexical processing complete. | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - nonwords_read: 7 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - nonwords_count: 7 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - freq_words_read: 487375 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - words_accepted: 314693 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - subwords_accepted: 366393 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - subwords_filtered: 0 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - low_freq_excluded: 113360 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - invalid_lines_filtered: 2 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - single_char_words_filtered: 334 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - freq_words_filtered: 172346 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - realwords_read: 152110 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - realwords_accepted: 154531 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:259 INFO: - realwords_nonwords_filtered: 0 | |
| 2025-02-28 23:52:03,942 ocrqa_create_bloom_filter.py:262 INFO: Estimated word count: 285555 | |
| 2025-02-28 23:52:04,014 ocrqa_create_bloom_filter.py:266 INFO: Bloom Filter created and saved to build.d/fp_prob_0.00001/ocrqa-wp_v1.0.5-lb.bloom | |
| 2025-02-28 23:52:04,066 ocrqa_create_bloom_filter.py:288 INFO: Diagnosis Results: | |
| 2025-02-28 23:52:04,066 ocrqa_create_bloom_filter.py:289 INFO: - Excluded words in bloom filter: 0 | |
| 2025-02-28 23:52:04,066 ocrqa_create_bloom_filter.py:290 INFO: - Known words not in bloom filter: 0 | |
| 2025-02-28 23:52:04,079 ocrqa_create_bloom_filter.py:297 INFO: - Low-frequency words in bloom filter: 1 | |
| 2025-02-28 23:52:04,079 ocrqa_create_bloom_filter.py:303 INFO: - Proportion of excluded words in bloom filter: 0.00000000 | |
| 2025-02-28 23:52:04,079 ocrqa_create_bloom_filter.py:309 INFO: - Proportion of known words not in bloom filter: 0.00000000 | |
| 2025-02-28 23:52:04,079 ocrqa_create_bloom_filter.py:317 INFO: - Proportion of low-frequency words in bloom filter: 0.00000882 | |