diff --git a/client/src/lib/ocr.ts b/client/src/lib/ocr.ts index 5f13f9f..acaccb1 100644 --- a/client/src/lib/ocr.ts +++ b/client/src/lib/ocr.ts @@ -2,13 +2,15 @@ let workerPromise: Promise | null = null; function getWorker() { if (!workerPromise) { - workerPromise = import("tesseract.js").then(({ createWorker }) => createWorker("eng")); + // "deu" is needed for umlauts and ß; the English model can't produce them. + workerPromise = import("tesseract.js").then(({ createWorker }) => createWorker("deu+eng")); } return workerPromise; } function cleanUpText(raw: string): string { return raw + .normalize("NFC") .replace(/[ \t]+\n/g, "\n") .replace(/\n{3,}/g, "\n\n") .trim();