feat(ocr): add image preprocessing pipeline to improve transcription quality on aged documents #255

Merged
marcel merged 7 commits from feat/issue-252-ocr-preprocessing into main 2026-04-17 15:50:37 +02:00
Showing only changes of commit 97c94c91f8 - Show all commits

View File

@@ -77,6 +77,12 @@ describe('translateOcrProgress', () => {
expect(result.totalPages).toBe(10);
});
it('PREPROCESSING_PAGE with no colon parts gracefully falls back to zero', () => {
const result = translateOcrProgress('PREPROCESSING_PAGE');
expect(result.currentPage).toBe(0);
expect(result.totalPages).toBe(0);
});
it('translates ERROR', () => {
expect(translateOcrProgress('ERROR').message).toBe('OCR fehlgeschlagen');
});