Add 29 new regulations (7 DE + 7 AT + 4 CH + 11 P2/P3) with country
metadata, legal corpus text excerpts, and updated RAG admin UI with
AT/CH type colors and labels. Fix module path in deploy script.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move 23 sources (18 national data protection laws + 5 EDPB guidelines/SCC)
from bp_dsfa_corpus to bp_legal_corpus with vector preservation. Extend
REGULATIONS array with national_law and eu_guideline types. Mark migrated
sources in dsfa_corpus_ingestion.py to prevent re-ingestion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Begradigt schiefe Scans vor der OCR-Extraktion anhand der linksbuendigen
Wortanfaenge der Vokabelspalte. Tesseract liefert achsenparallele Boxen,
die bei ~2-3 Grad Schraege in Nachbarzeilen bluten — der Deskew behebt das.
- Neue Funktion deskew_image_by_word_alignment() in cv_vocab_pipeline.py
- Deskew-Integration im extract-with-boxes Endpoint (vor OCR)
- Neuer GET Endpoint /deskewed-image/{page} fuer begradigtes Seitenbild
- Frontend: GroundTruthPanel wechselt nach Extraktion auf deskewed Image
- ~1s Overhead durch schnellen Tesseract-Pass auf halbiertem Bild
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a step-through tool for creating 100% correct reference data (ground truth)
with position information. Users scan a page, review each vocabulary entry with
image crops, confirm or correct the OCR text, and save the result as JSON.
Backend: extract_entries_with_boxes() helper + 3 endpoints (extract-with-boxes,
ground-truth save/load). Frontend: GroundTruthPanel component with SVG overlay,
ImageCrop, keyboard shortcuts (Enter/Tab/arrows), and tab navigation in page.tsx.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New OCR method using classical Computer Vision: high-res rendering (432 DPI),
deskew, dewarp, binarization, projection-profile layout analysis, multi-pass
Tesseract OCR with region-specific PSM, and Y-coordinate line alignment.
Includes bugfix for convert_pdf_to_image call (line 869) and 39 unit tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ollama crashes when two concurrent vision requests hit the 32B model
(compare-ocr + analyze-grid). The grid analysis was redundantly calling
Ollama again even though compare-ocr already extracted all vocabulary.
- compare-ocr now saves vocabulary in session for reuse
- analyze-grid builds grid from session data (no Ollama, instant response)
- Grid button disabled until comparison results are available
- Added export-to-editor functionality
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>