Claude commited on
Commit
2cde8e8
·
unverified ·
1 Parent(s): b277c46

readme: repositionnement institutionnel post-correction OCR sur corpus ALTO

Browse files

Le README ciblait initialement les "documents patrimoniaux" en général
avec mentions explicites BnF/Gallica. Il est repositionné autour du cas
d'usage réel : un service institutionnel qui dispose déjà d'un corpus
ALTO XML et veut évaluer des pipelines de post-correction.

- Tagline FR + EN : "Plateforme d'évaluation de pipelines de
post-correction OCR sur corpus ALTO XML".
- Introduction reformulée : contexte institutionnel, banc d'essai pas
atelier de production, le chercheur arbitre.
- Nouvelle section "Cas d'usage type" : institution avec corpus ALTO
existant qui veut comparer ré-OCR, correction LLM, mappeurs ALTO,
pipelines composées.
- Mentions BnF retirées (gallica.py reste comme connecteur tiers
parmi d'autres).
- Mise en avant des fonctionnalités axe B (absorption d'erreur,
stabilité multi-runs, comparaison contrôlée).

https://claude.ai/code/session_01RusTQYcSfXqTsbFNvwmCV7

Files changed (1) hide show
  1. README.md +56 -16
README.md CHANGED
@@ -9,9 +9,9 @@ pinned: false
9
 
10
  # Picarones
11
 
12
- > **OCR/HTR Benchmarking Platform for Heritage Documents**
13
 
14
- > **Plateforme d'Inspection Comparative et d'Audit Rigoureux d'OCR pour Numérisations et Etudes Scientifiques**
15
 
16
  [![CI](https://github.com/maribakulj/Picarones/actions/workflows/ci.yml/badge.svg)](https://github.com/maribakulj/Picarones/actions/workflows/ci.yml)
17
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
@@ -20,16 +20,56 @@ pinned: false
20
 
21
  ---
22
 
23
- **Picarones** is an open-source platform for rigorously comparing OCR and HTR engines
24
- (Tesseract, Pero OCR, Kraken, cloud APIs...) and OCR+LLM pipelines on historical document
25
- corpora -- manuscripts, early printed books, and archives.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- It provides heritage-specific metrics (diplomatic CER, ligature scores, medieval abbreviation
28
- handling), composable OCR+LLM pipelines, a fully templated interactive HTML report with a
29
- **factual narrative synthesis**, **Friedman/Nemenyi multi-engine significance tests** with a
30
- **critical difference diagram**, **cost/speed Pareto analysis**, a **contextual glossary**,
31
- an **advanced customization panel**, and multiple corpus import sources including IIIF,
32
- Gallica, HuggingFace, HTR-United, and eScriptorium.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  ---
35
 
@@ -97,7 +137,7 @@ Gallica, HuggingFace, HTR-United, and eScriptorium.
97
  | Source | Method |
98
  |--------|--------|
99
  | Local folder | `picarones run --corpus ./corpus/` |
100
- | IIIF manifests (Gallica, Bodleian, BL...) | `picarones import iiif <manifest-url>` |
101
  | Gallica API (SRU + OCR) | `GallicaClient` / `picarones import iiif` |
102
  | HuggingFace Datasets | `picarones import hf <dataset-id>` |
103
  | HTR-United catalogue | `picarones import htr-united` |
@@ -246,7 +286,7 @@ See [INSTALL.md](INSTALL.md) for detailed instructions on Linux, macOS, Windows,
246
  | `picarones serve` | Launch the FastAPI web interface |
247
  | `picarones history` | Query longitudinal benchmark history (SQLite) |
248
  | `picarones robustness` | Run robustness analysis with degraded images |
249
- | `picarones import iiif` | Import corpus from an IIIF manifest (Gallica, Bodleian, BL, BSB...). HTR-United and HuggingFace imports are exposed through the web interface (`/api/htr-united/import`, `/api/huggingface/import`). |
250
 
251
  **Examples:**
252
 
@@ -258,8 +298,8 @@ picarones run --corpus ./manuscripts/ --engines tesseract --lang fra --psm 6 \
258
  # Compare two text files
259
  picarones metrics --reference ground_truth.txt --hypothesis ocr_output.txt
260
 
261
- # Import 10 pages from a Gallica IIIF manifest
262
- picarones import iiif https://gallica.bnf.fr/ark:/12148/xxx/manifest.json --pages 1-10
263
 
264
  # HuggingFace and HTR-United imports are available via the web UI at
265
  # http://localhost:8000/ (endpoints POST /api/huggingface/import and /api/htr-united/import)
@@ -474,7 +514,7 @@ picarones/
474
 
475
  └── importers/
476
  ├── iiif.py # IIIF manifest importer
477
- ├── gallica.py # Gallica API client (BnF)
478
  ├── htr_united.py # HTR-United catalogue importer
479
  ├── huggingface.py # HuggingFace Datasets importer
480
  └── escriptorium.py # eScriptorium client
 
9
 
10
  # Picarones
11
 
12
+ > **Plateforme d'évaluation de pipelines de post-correction OCR sur corpus ALTO XML**
13
 
14
+ > **OCR Post-Correction Benchmarking Platform for Existing ALTO XML Corpora**
15
 
16
  [![CI](https://github.com/maribakulj/Picarones/actions/workflows/ci.yml/badge.svg)](https://github.com/maribakulj/Picarones/actions/workflows/ci.yml)
17
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
 
20
 
21
  ---
22
 
23
+ **Picarones** est une plateforme open source conçue pour un **contexte
24
+ institutionnel** services patrimoniaux, archives, bibliothèques numériques
25
+ qui disposent déjà d'un **corpus en XML ALTO** (issu d'une chaîne d'OCR
26
+ historique) et qui veulent **évaluer rigoureusement** des pipelines de
27
+ **post-correction** : re-OCR alternatif, correction LLM, mappeurs ALTO
28
+ spécialisés, voting d'ensembles, etc.
29
+
30
+ C'est un **banc d'essai, pas un atelier de production**. Picarones charge un
31
+ corpus ALTO existant, exécute les pipelines que le chercheur amène, mesure
32
+ toutes les métriques pertinentes et produit un rapport HTML autonome
33
+ **factuel et reproductible**. Pas de prescription, pas de classement
34
+ automatique imposé : le rapport expose les chiffres, le chercheur arbitre.
35
+
36
+ Métriques spécifiques aux corpus patrimoniaux (CER diplomatique, scores de
37
+ ligatures, abréviations médiévales, numéraux romains, foliotation,
38
+ recherchabilité fuzzy plein-texte, fidélité aux marqueurs philologiques),
39
+ pipelines composables, **synthèse narrative factuelle** au sommet du rapport,
40
+ **tests Friedman/Nemenyi multi-moteurs** avec **diagramme de différence
41
+ critique**, analyse **Pareto coût/vitesse/CO₂**, **absorption d'erreur par
42
+ jonction**, **stabilité multi-runs**, **comparaison contrôlée par slot**, et
43
+ plusieurs sources d'import (IIIF, HuggingFace, HTR-United, eScriptorium,
44
+ upload ZIP).
45
 
46
+ ---
47
+
48
+ ## Cas d'usage type
49
+
50
+ Une institution (archive, bibliothèque numérique, service patrimonial) a
51
+ **déjà OCRisé** un corpus de plusieurs milliers de pages — sortie au format
52
+ **ALTO XML** avec coordonnées de zones, lignes et mots. Cette sortie a un
53
+ CER honorable mais imparfait, des erreurs typiques sur les ligatures
54
+ historiques, des abréviations non développées, des noms propres mal
55
+ reconnus.
56
+
57
+ L'institution veut **comparer rigoureusement** plusieurs stratégies de
58
+ post-correction sur ce corpus existant :
59
+
60
+ - ré-OCR avec un moteur alternatif (Pero OCR, Kraken, Mistral OCR…) ;
61
+ - correction LLM (GPT-4o, Claude, Mistral) en mode texte seul ou image+texte ;
62
+ - mappeurs ALTO spécialisés (re-segmentation des lignes, fusion des
63
+ abréviations, normalisation diplomatique) ;
64
+ - pipelines composées : OCR alternatif → correction LLM → mappeur ALTO.
65
+
66
+ Picarones charge le corpus ALTO, exécute chaque pipeline, mesure les
67
+ métriques pertinentes (gain CER, recherchabilité fuzzy gagnée, séquences
68
+ numériques préservées, **erreurs introduites par le post-correcteur** —
69
+ critique pour les LLM qui modernisent silencieusement) et produit un
70
+ rapport HTML factuel **directement citable dans une publication
71
+ scientifique** : chaque chiffre est traçable au payload source, aucune
72
+ prescription n'est imposée.
73
 
74
  ---
75
 
 
137
  | Source | Method |
138
  |--------|--------|
139
  | Local folder | `picarones run --corpus ./corpus/` |
140
+ | IIIF manifests (institutional repositories) | `picarones import iiif <manifest-url>` |
141
  | Gallica API (SRU + OCR) | `GallicaClient` / `picarones import iiif` |
142
  | HuggingFace Datasets | `picarones import hf <dataset-id>` |
143
  | HTR-United catalogue | `picarones import htr-united` |
 
286
  | `picarones serve` | Launch the FastAPI web interface |
287
  | `picarones history` | Query longitudinal benchmark history (SQLite) |
288
  | `picarones robustness` | Run robustness analysis with degraded images |
289
+ | `picarones import iiif` | Import corpus from an IIIF manifest (any institutional repository). HTR-United and HuggingFace imports are exposed through the web interface (`/api/htr-united/import`, `/api/huggingface/import`). |
290
 
291
  **Examples:**
292
 
 
298
  # Compare two text files
299
  picarones metrics --reference ground_truth.txt --hypothesis ocr_output.txt
300
 
301
+ # Import 10 pages from any IIIF manifest URL
302
+ picarones import iiif https://institution.example/iiif/xxx/manifest.json --pages 1-10
303
 
304
  # HuggingFace and HTR-United imports are available via the web UI at
305
  # http://localhost:8000/ (endpoints POST /api/huggingface/import and /api/htr-united/import)
 
514
 
515
  └── importers/
516
  ├── iiif.py # IIIF manifest importer
517
+ ├── gallica.py # Gallica API client (institutional digital library)
518
  ├── htr_united.py # HTR-United catalogue importer
519
  ├── huggingface.py # HuggingFace Datasets importer
520
  └── escriptorium.py # eScriptorium client