<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Format OCR pour les bibliothèques numériques on File Format Blog</title>
    <link>https://blog.fileformat.com/fr/tag/format-ocr-pour-les-biblioth%C3%A8ques-num%C3%A9riques/</link>
    <description>Recent content in Format OCR pour les bibliothèques numériques on File Format Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>fr</language>
    <lastBuildDate>Mon, 30 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.fileformat.com/fr/tag/format-ocr-pour-les-biblioth%C3%A8ques-num%C3%A9riques/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>hOCR vs. ALTO XML : quel format OCR est le meilleur pour les bibliothèques numériques ?</title>
      <link>https://blog.fileformat.com/fr/ocr/hocr-vs-alto-xml-which-ocr-format-is-better-for-digital-libraries/</link>
      <pubDate>Mon, 30 Nov 2026 00:00:00 +0000</pubDate>
      
      <guid>https://blog.fileformat.com/fr/ocr/hocr-vs-alto-xml-which-ocr-format-is-better-for-digital-libraries/</guid>
      <description>Comparez hOCR vs. ALTO XML pour les bibliothèques numériques. Découvrez comment la validation de schéma, l&amp;#39;intégration METS, la taille des fichiers et la prise en charge de la recherche IIIF influent sur votre flux de travail OCR.</description>
      <content:encoded><![CDATA[<p><strong>Dernière mise à jour</strong> : 20 août 2026</p>
<figure class="align-center ">
    <img loading="lazy" src="images/hocr-vs-alto-xml-which-ocr-format-is-better-for-digital-libraries.png#center"
         alt="hOCR vs. ALTO XML: Which OCR Format Is Better for Digital Libraries?"/> 
</figure>

<h2 id="hocr-vs-alto-xml-différences-clés-pour-la-préservation-numérique-et-la-recherche">hOCR vs. ALTO XML : différences clés pour la préservation numérique et la recherche</h2>
<p>La numérisation des collections physiques—qu’il s’agisse de journaux du XIXe siècle, de monographies rares ou d’archives municipales—nécessite bien plus que de lancer un moteur de reconnaissance optique de caractères (OCR) et de déposer la sortie dans un fichier texte brut. Lorsque le texte brut supprime les boîtes englobantes, la hiérarchie des colonnes, les styles de police et les scores de confiance, les interfaces de recherche en aval ne peuvent pas mettre en évidence les termes trouvés sur les images de pages, et les dépôts de préservation à long terme perdent le contexte structurel essentiel.</p>
<p>Pour préserver à la fois le texte et la mise en page spatiale, les architectes de bibliothèques numériques choisissent généralement entre deux normes ouvertes dominantes : <strong>hOCR</strong> et <strong>ALTO XML</strong>. Bien que les deux formats codent le texte reconnu avec des coordonnées géométriques, ils ont été conçus avec des philosophies, des modèles de gouvernance et des écosystèmes de dépôts fondamentalement différents.</p>
<h2 id="comprendre-hocr-le-microformat-natif-du-web">Comprendre hOCR : le microformat natif du Web</h2>
<p>Créé par Thomas Breuel en 2007, <strong>hOCR</strong> adopte une approche pragmatique, axée sur le web, de la sérialisation OCR. Plutôt que d&rsquo;inventer un vocabulaire XML personnalisé à partir de zéro, hOCR intègre les métadonnées de mise en page, de boîte englobante et de confiance de reconnaissance directement dans des documents <strong>HTML ou XHTML</strong> valides en utilisant les attributs standardisés <code>class</code> et <code>title</code>.</p>
<h3 id="comment-hocr-structure-les-données">Comment hOCR structure les données</h3>
<p>Un fichier hOCR est immédiatement affichable dans n&rsquo;importe quel navigateur web. La hiérarchie structurelle est exprimée à l&rsquo;aide d&rsquo;éléments HTML standard associés à des noms de classe sémantiques :</p>
<ul>
<li><code>ocr_page</code>: représente l&rsquo;image de la page numérisée et ses dimensions en pixels.</li>
<li><code>ocr_carea</code>: définit une zone de contenu ou un bloc de colonne.</li>
<li><code>ocr_par</code>: représente un paragraphe logique.</li>
<li><code>ocr_line</code>: capture une ligne de texte unique ainsi que la géométrie de la ligne de base.</li>
<li><code>ocrx_word</code>: encapsule un jeton individuel, stockant les boîtes englobantes (<code>bbox</code>) et la confiance du moteur (<code>x_wconf</code>) dans l&rsquo;attribut <code>title</code>.</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><span style="color:#75715e">&lt;!DOCTYPE html&gt;</span>
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">html</span> <span style="color:#a6e22e">xmlns</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)&#34;</span> <span style="color:#a6e22e">xml:lang</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;en&#34;</span> <span style="color:#a6e22e">lang</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;en&#34;</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">head</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">title</span>&gt;Digitized Page 001&lt;/<span style="color:#f92672">title</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">meta</span> <span style="color:#a6e22e">name</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr-system&#34;</span> <span style="color:#a6e22e">content</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;tesseract 5.4.1&#34;</span> /&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">meta</span> <span style="color:#a6e22e">name</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr-capabilities&#34;</span> <span style="color:#a6e22e">content</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr_page ocr_carea ocr_par ocr_line ocrx_word&#34;</span> /&gt;
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">head</span>&gt;
</span></span><span style="display:flex;"><span>&lt;<span style="color:#f92672">body</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;<span style="color:#f92672">div</span> <span style="color:#a6e22e">class</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr_page&#34;</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;page_1&#34;</span> <span style="color:#a6e22e">title</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;image &#39;scan_001.tif&#39;; bbox 0 0 2480 3508; ppageno 0&#34;</span>&gt;
</span></span><span style="display:flex;"><span>    &lt;<span style="color:#f92672">div</span> <span style="color:#a6e22e">class</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr_carea&#34;</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;block_1_1&#34;</span> <span style="color:#a6e22e">title</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bbox 210 340 2250 520&#34;</span>&gt;
</span></span><span style="display:flex;"><span>      &lt;<span style="color:#f92672">p</span> <span style="color:#a6e22e">class</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr_par&#34;</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;par_1_1&#34;</span> <span style="color:#a6e22e">title</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bbox 210 340 2250 520&#34;</span>&gt;
</span></span><span style="display:flex;"><span>        &lt;<span style="color:#f92672">span</span> <span style="color:#a6e22e">class</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocr_line&#34;</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;line_1_1&#34;</span> <span style="color:#a6e22e">title</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bbox 215 345 1420 410; baseline -0.002 -12&#34;</span>&gt;
</span></span><span style="display:flex;"><span>          &lt;<span style="color:#f92672">span</span> <span style="color:#a6e22e">class</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocrx_word&#34;</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;word_1_1&#34;</span> <span style="color:#a6e22e">title</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bbox 215 345 480 410; x_wconf 96&#34;</span>&gt;Archive&lt;/<span style="color:#f92672">span</span>&gt;
</span></span><span style="display:flex;"><span>          &lt;<span style="color:#f92672">span</span> <span style="color:#a6e22e">class</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;ocrx_word&#34;</span> <span style="color:#a6e22e">id</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;word_1_2&#34;</span> <span style="color:#a6e22e">title</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bbox 505 348 890 408; x_wconf 94&#34;</span>&gt;Collection&lt;/<span style="color:#f92672">span</span>&gt;
</span></span><span style="display:flex;"><span>        &lt;/<span style="color:#f92672">span</span>&gt;
</span></span><span style="display:flex;"><span>      &lt;/<span style="color:#f92672">p</span>&gt;
</span></span><span style="display:flex;"><span>    &lt;/<span style="color:#f92672">div</span>&gt;
</span></span><span style="display:flex;"><span>  &lt;/<span style="color:#f92672">div</span>&gt;
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">body</span>&gt;
</span></span><span style="display:flex;"><span>&lt;/<span style="color:#f92672">html</span>&gt;
</span></span></code></pre></div><h3 id="points-forts-de-hocr">Points forts de hOCR</h3>
<ul>
<li><strong>Outils Web sans friction :</strong> Les développeurs peuvent analyser hOCR à l&rsquo;aide de parseurs HTML standard (<code>BeautifulSoup</code>, <code>lxml</code>, API DOM du navigateur) et styliser ou inspecter les mises en page directement avec CSS.</li>
<li><strong>Génération rapide de couches PDF :</strong> Les utilitaires open source comme <strong>OCRmyPDF</strong> utilisent hOCR nativement pour superposer des couches de texte invisibles et recherchables sur des images TIFF ou PDF numérisées avec un minimum de surcharge de transformation.</li>
<li><strong>Empreinte légère :</strong> Sans balises XML imbriquées et verbeuses pour chaque espace ou attribut de police, les fichiers hOCR sont compacts et rapides à générer dans des pipelines batch à haut débit.</li>
</ul>
<h2 id="comprendre-alto-xml-la-norme-de-préservation-archivistique">Comprendre ALTO XML : la norme de préservation archivistique</h2>
<p><strong>ALTO (Analyzed Layout and Text Object)</strong> est un schéma XML ouvert maintenu par la <strong>Library of Congress</strong>. Initialement développé pendant le projet METAe de l&rsquo;Union européenne, ALTO a été conçu spécifiquement pour les institutions du patrimoine culturel, les bibliothèques nationales et les dépôts de préservation à grande échelle.</p>
<h3 id="comment-alto-xml-structure-les-données">Comment ALTO XML structure les données</h3>
<p>Contrairement à hOCR, qui surcharge les attributs HTML, ALTO impose des définitions de schéma XML (XSD) strictes et fortement typées. Un fichier ALTO divise chaque document en trois sections principales :</p>
<ol>
<li><code>&lt;Description&gt;</code>: Capture les unités de mesure (<code>pixel</code>, <code>mm10</code> ou <code>inch1200</code>), les identifiants d&rsquo;image source et l&rsquo;historique du traitement OCR.</li>
<li><code>&lt;Styles&gt;</code>: Centralise les définitions de police (<code>FONTFAMILY</code>, <code>FONTSIZE</code>, <code>FONTSTYLE</code>) et les alignements de paragraphe afin que les mots individuels ne répètent pas les métadonnées de style.</li>
<li><code>&lt;Layout&gt;</code> : Mappe les régions physiques de la page (<code>TopMargin</code>, <code>LeftMargin</code>, <code>RightMargin</code>, <code>BottomMargin</code> et <code>PrintSpace</code>) aux éléments <code>TextBlock</code>, <code>TextLine</code>, <code>String</code> et <code>SP</code> explicite (espace blanc).</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-xml" data-lang="xml"><span style="display:flex;"><span><span style="color:#75715e">&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&lt;alto</span> <span style="color:#a6e22e">xmlns=</span><span style="color:#e6db74">&#34;[http://www.loc.gov/standards/alto/ns-v4#](http://www.loc.gov/standards/alto/ns-v4#)&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#a6e22e">xmlns:xsi=</span><span style="color:#e6db74">&#34;[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)&#34;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#a6e22e">xsi:schemaLocation=</span><span style="color:#e6db74">&#34;[http://www.loc.gov/standards/alto/ns-v4#](http://www.loc.gov/standards/alto/ns-v4#) [http://www.loc.gov/standards/alto/v4/alto-4-4.xsd](http://www.loc.gov/standards/alto/v4/alto-4-4.xsd)&#34;</span><span style="color:#f92672">&gt;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&lt;Description&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;MeasurementUnit&gt;</span>pixel<span style="color:#f92672">&lt;/MeasurementUnit&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;sourceImageInformation&gt;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&lt;fileName&gt;</span>scan_001.tif<span style="color:#f92672">&lt;/fileName&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;/sourceImageInformation&gt;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&lt;/Description&gt;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&lt;Styles&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;TextStyle</span> <span style="color:#a6e22e">FONTFAMILY=</span><span style="color:#e6db74">&#34;Times New Roman&#34;</span> <span style="color:#a6e22e">FONTSIZE=</span><span style="color:#e6db74">&#34;14&#34;</span> <span style="color:#a6e22e">FONTSTYLE=</span><span style="color:#e6db74">&#34;bold&#34;</span> <span style="color:#a6e22e">ID=</span><span style="color:#e6db74">&#34;STYLE_1&#34;</span><span style="color:#f92672">/&gt;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&lt;/Styles&gt;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&lt;Layout&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;Page</span> <span style="color:#a6e22e">HEIGHT=</span><span style="color:#e6db74">&#34;3508&#34;</span> <span style="color:#a6e22e">ID=</span><span style="color:#e6db74">&#34;PAGE_1&#34;</span> <span style="color:#a6e22e">PHYSICAL_IMG_NR=</span><span style="color:#e6db74">&#34;1&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;2480&#34;</span><span style="color:#f92672">&gt;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&lt;PrintSpace</span> <span style="color:#a6e22e">HEIGHT=</span><span style="color:#e6db74">&#34;2900&#34;</span> <span style="color:#a6e22e">HPOS=</span><span style="color:#e6db74">&#34;200&#34;</span> <span style="color:#a6e22e">VPOS=</span><span style="color:#e6db74">&#34;300&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;2080&#34;</span><span style="color:#f92672">&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;TextBlock</span> <span style="color:#a6e22e">HEIGHT=</span><span style="color:#e6db74">&#34;180&#34;</span> <span style="color:#a6e22e">HPOS=</span><span style="color:#e6db74">&#34;210&#34;</span> <span style="color:#a6e22e">ID=</span><span style="color:#e6db74">&#34;TB_1&#34;</span> <span style="color:#a6e22e">VPOS=</span><span style="color:#e6db74">&#34;340&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;2040&#34;</span><span style="color:#f92672">&gt;</span>
</span></span><span style="display:flex;"><span>          <span style="color:#f92672">&lt;TextLine</span> <span style="color:#a6e22e">HEIGHT=</span><span style="color:#e6db74">&#34;65&#34;</span> <span style="color:#a6e22e">HPOS=</span><span style="color:#e6db74">&#34;215&#34;</span> <span style="color:#a6e22e">ID=</span><span style="color:#e6db74">&#34;TL_1&#34;</span> <span style="color:#a6e22e">VPOS=</span><span style="color:#e6db74">&#34;345&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;1205&#34;</span><span style="color:#f92672">&gt;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">&lt;String</span> <span style="color:#a6e22e">CONTENT=</span><span style="color:#e6db74">&#34;Archive&#34;</span> <span style="color:#a6e22e">HEIGHT=</span><span style="color:#e6db74">&#34;65&#34;</span> <span style="color:#a6e22e">HPOS=</span><span style="color:#e6db74">&#34;215&#34;</span> <span style="color:#a6e22e">ID=</span><span style="color:#e6db74">&#34;ST_1&#34;</span> <span style="color:#a6e22e">STYLEREFS=</span><span style="color:#e6db74">&#34;STYLE_1&#34;</span> <span style="color:#a6e22e">VPOS=</span><span style="color:#e6db74">&#34;345&#34;</span> <span style="color:#a6e22e">WC=</span><span style="color:#e6db74">&#34;0.96&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;265&#34;</span><span style="color:#f92672">/&gt;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">&lt;SP</span> <span style="color:#a6e22e">HPOS=</span><span style="color:#e6db74">&#34;480&#34;</span> <span style="color:#a6e22e">VPOS=</span><span style="color:#e6db74">&#34;345&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;25&#34;</span><span style="color:#f92672">/&gt;</span>
</span></span><span style="display:flex;"><span>            <span style="color:#f92672">&lt;String</span> <span style="color:#a6e22e">CONTENT=</span><span style="color:#e6db74">&#34;Collection&#34;</span> <span style="color:#a6e22e">HEIGHT=</span><span style="color:#e6db74">&#34;60&#34;</span> <span style="color:#a6e22e">HPOS=</span><span style="color:#e6db74">&#34;505&#34;</span> <span style="color:#a6e22e">ID=</span><span style="color:#e6db74">&#34;ST_2&#34;</span> <span style="color:#a6e22e">STYLEREFS=</span><span style="color:#e6db74">&#34;STYLE_1&#34;</span> <span style="color:#a6e22e">VPOS=</span><span style="color:#e6db74">&#34;348&#34;</span> <span style="color:#a6e22e">WC=</span><span style="color:#e6db74">&#34;0.94&#34;</span> <span style="color:#a6e22e">WIDTH=</span><span style="color:#e6db74">&#34;385&#34;</span><span style="color:#f92672">/&gt;</span>
</span></span><span style="display:flex;"><span>          <span style="color:#f92672">&lt;/TextLine&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;/TextBlock&gt;</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&lt;/PrintSpace&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;/Page&gt;</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&lt;/Layout&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&lt;/alto&gt;</span>
</span></span></code></pre></div><h3 id="points-forts-dalto-xml">Points forts d&rsquo;ALTO XML</h3>
<ul>
<li><strong>Interopérabilité METS &amp; Référentiel :</strong> ALTO est conçu pour s&rsquo;insérer dans un enveloppe <strong>METS (Metadata Encoding and Transmission Standard)</strong>, reliant les cartes structurelles de pages, les enregistrements descriptifs MARC/Dublin Core et les métadonnées de préservation (PREMIS) dans un seul paquet d&rsquo;information de soumission archivistique (SIP).</li>
<li><strong>Modélisation typographique riche et des marges :</strong> ALTO sépare explicitement les en-têtes courants, pieds de page, marginalia, illustrations (<code>Illustration</code>) et séparateurs graphiques (<code>GraphicalElement</code>) du texte principal.</li>
<li><strong>Support moderne des polygones &amp; HTR :</strong> À partir d&rsquo;ALTO v4, le schéma a ajouté une prise en charge native des formes polygonales de délimitation et des polylignes de ligne de base, le rendant compatible avec les outils de reconnaissance de texte manuscrit (HTR) tels que <strong>Transkribus</strong> et <strong>eScriptorium</strong>.</li>
</ul>
<h2 id="comparaison-côte-à-côte-hocr-vs-alto-xml">Comparaison côte à côte : hOCR vs. ALTO XML</h2>
<table>
<thead>
<tr>
<th style="text-align:left">Fonctionnalité / Critère</th>
<th style="text-align:left">hOCR</th>
<th style="text-align:left">ALTO XML</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>Syntaxe sous-jacente</strong></td>
<td style="text-align:left">HTML / XHTML avec microformats (<code>class</code>, <code>title</code>)</td>
<td style="text-align:left">XML fortement typé régi par des schémas XSD</td>
</tr>
<tr>
<td style="text-align:left"><strong>Corps de maintenance</strong></td>
<td style="text-align:left">Spécification ouverte maintenue par la communauté (<code>kba/hocr-spec</code>)</td>
<td style="text-align:left">Bibliothèque du Congrès (Comité éditorial ALTO)</td>
</tr>
<tr>
<td style="text-align:left"><strong>Validation du schéma</strong></td>
<td style="text-align:left">Souple ; repose sur les validateurs HTML et les linters d’attributs personnalisés</td>
<td style="text-align:left">La validation XSD stricte garantit la cohérence structurelle</td>
</tr>
<tr>
<td style="text-align:left"><strong>Métadonnées et stockage des coordonnées</strong></td>
<td style="text-align:left">Chaînes clé-valeur délimitées par des points-virgules dans les attributs <code>title</code></td>
<td style="text-align:left">Attributs XML typés explicitement (<code>HPOS</code>, <code>VPOS</code>, <code>WIDTH</code>, <code>HEIGHT</code>, <code>WC</code>)</td>
</tr>
<tr>
<td style="text-align:left"><strong>Typographie et modélisation des polices</strong></td>
<td style="text-align:left">Minimal ; rarement standardisé entre les moteurs OCR</td>
<td style="text-align:left">Bloc dédié <code>&lt;Styles&gt;</code> avec des références <code>TextStyle</code> et <code>ParagraphStyle</code></td>
</tr>
<tr>
<td style="text-align:left"><strong>Granularité des zones de page</strong></td>
<td style="text-align:left">Blocs de base, paragraphes, lignes et mots</td>
<td style="text-align:left">Marges explicites (<code>TopMargin</code>, <code>BottomMargin</code>), <code>PrintSpace</code>, tableaux et illustrations</td>
</tr>
<tr>
<td style="text-align:left"><strong>Intégration METS / PREMIS</strong></td>
<td style="text-align:left">Nécessite un emballage personnalisé ou une conversion</td>
<td style="text-align:left">Norme compagnon native pour les paquets d&rsquo;archives METS/PREMIS</td>
</tr>
<tr>
<td style="text-align:left"><strong>Prise en charge du moteur OCR</strong></td>
<td style="text-align:left">Tesseract, OCRopus, Calamari, Kraken</td>
<td style="text-align:left">Tesseract (v4.1+), ABBYY FineReader, Transkribus, eScriptorium</td>
</tr>
<tr>
<td style="text-align:left"><strong>Verbosit�� du fichier</strong></td>
<td style="text-align:left">Compact et léger</td>
<td style="text-align:left">Verbeux en raison des balises <code>&lt;SP&gt;</code> explicites et des schémas d&rsquo;attributs</td>
</tr>
</tbody>
</table>
<h2 id="principales-différences-architecturales-qui-impactent-les-bibliothèques-numériques">Principales différences architecturales qui impactent les bibliothèques numériques</h2>
<h3 id="1-validation-de-schéma-vs-analyse-de-chaîne">1. Validation de schéma vs. Analyse de chaîne</h3>
<p>Dans <strong>ALTO XML</strong>, chaque coordonnée, score de confiance et référence de style est un attribut XML explicite validé contre un schéma XSD officiel. Si une chaîne OCR génère une coordonnée malformée ou un ID de référence invalide, la validation d&rsquo;ingestion automatisée la détecte immédiatement avant de corrompre le référentiel.</p>
<p>In <strong>hOCR</strong>, les données géométriques critiques sont empaquetées dans des chaînes de texte non structurées à l&rsquo;intérieur de l&rsquo;attribut HTML <code>title</code> (par exemple, <code>title=&quot;bbox 215 345 480 410; x_wconf 96&quot;</code>). Les consommateurs doivent écrire des analyseurs secondaires de découpage de chaînes pour extraire les coordonnées et les valeurs de confiance, et les validateurs HTML5 standard ne signaleront pas les fautes de frappe à l&rsquo;intérieur des chaînes <code>title</code>.</p>
<h3 id="2-segmentation-des-journaux-et-des-mises-en-page-complexes">2. Segmentation des journaux et des mises en page complexes</h3>
<p>Les journaux historiques et les périodiques à colonnes multiples posent de graves défis aux plateformes de recherche et de découverte. Si un moteur OCR fusionne les en-têtes courants, les numéros de page, les publicités et les colonnes d&rsquo;articles en un seul flux de lecture, la pertinence de la recherche en texte intégral se dégrade rapidement.</p>
<p>ALTO XML résout ce problème de manière structurée en séparant la géométrie de la page en zones distinctes (<code>TopMargin</code>, <code>PrintSpace</code>, <code>ComposedBlock</code>, <code>Illustration</code>) et en codant des attributs explicites d&rsquo;ordre de lecture (<code>IDNEXT</code>). Bien que hOCR prenne en charge les classes <code>ocr_carea</code> et <code>ocr_header</code>, les implémentations varient considérablement d&rsquo;un moteur OCR à l&rsquo;autre.</p>
<h3 id="3-couches-de-découverte-et-intégration-iiif">3. Couches de découverte et intégration IIIF</h3>
<p>Les bibliothèques numériques modernes s&rsquo;appuient fortement sur le <strong>International Image Interoperability Framework (IIIF)</strong> et des visionneuses comme <strong>Mirador</strong> ou <strong>Universal Viewer</strong> pour afficher des numérisations haute résolution avec des superpositions de mise en évidence des résultats.</p>
<ul>
<li><strong>ALTO XML</strong> s&rsquo;intègre immédiatement avec les principales plateformes de dépôt—y compris <strong>Islandora</strong>, <strong>Samvera/Hyrax</strong>, <strong>DSpace</strong>, <strong>Kitodo</strong> et <strong>Goobi</strong>—ainsi que les serveurs de recherche de contenu IIIF (tels que <code>iiif-content-search</code> et les plugins OCR basés sur Solr comme <code>solr-ocrhighlighting</code>).</li>
<li><strong>hOCR</strong> fonctionne de manière transparente avec les visualiseurs web légers et <code>solr-ocrhighlighting</code> également, surtout lorsque les équipes créent des interfaces personnalisées en Python ou Node.js sans une pile complète de dépôt METS/ALTO.</li>
</ul>
<h3 id="4-surcharge-de-stockage-et-vitesse-de-traitement">4. Surcharge de stockage et vitesse de traitement</h3>
<p>Parce que ALTO XML enregistre explicitement les éléments <code>&lt;SP&gt;</code> pour chaque espace entre les mots ainsi que des attributs de coordonnées détaillés, un fichier ALTO est généralement <strong>30% à 60% plus volumineux</strong> qu&rsquo;un fichier hOCR équivalent pour la même page. Pour les collections s&rsquo;étendant sur des dizaines de millions de pages, cette différence impacte les budgets de stockage et le débit d&rsquo;indexation XML—bien que la compression gzip réduise considérablement l&rsquo;empreinte disque.</p>
<h2 id="flux-de-travail-pratique--conversion-entre-hocr-et-alto-xml">Flux de travail pratique : conversion entre hOCR et ALTO XML</h2>
<p>Les bibliothèques numériques sont rarement enfermées de façon permanente dans un seul format. Puisque les deux formats représentent des boîtes englobantes hiérarchiques et des jetons de texte, vous pouvez les convertir l&rsquo;un en l&rsquo;autre à l&rsquo;aide d&rsquo;outils open source établis :</p>
<ol>
<li><strong>Exportation directe depuis Tesseract :</strong> Les versions modernes de Tesseract produisent nativement les deux formats en un seul passage de reconnaissance, sans étapes de conversion supplémentaires :</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>tesseract page_001.tif output_base -l eng hocr alto
</span></span></code></pre></div><ol start="2">
<li><strong>Transformations XSLT (<code>hOCR-to-ALTO</code>) :</strong> Des feuilles de style XSLT 2.0 standardisées (maintenues dans le dépôt open‑source <code>filak/hOCR-to-ALTO</code>) convertissent les archives hOCR legacy de Tesseract en XML ALTO v2.0, v2.1, v3 ou v4 valides à l’aide de Saxon-HE.</li>
<li><strong>Bibliothèques Python (<code>ocr-fileformat</code>) :</strong> Pour les pipelines d’ingestion automatisés, des wrappers en ligne de commande comme <code>ocr-fileformat</code> normalisent les conversions entre hOCR, ALTO XML et PAGE XML.</li>
</ol>
<h2 id="quel-format-ocr-votre-bibliothèque-numérique-devrait-elle-choisir">Quel format OCR votre bibliothèque numérique devrait-elle choisir ?</h2>
<p>Choisir entre hOCR et ALTO XML dépend de votre priorité : <strong>gestion archivistique à long terme</strong> ou <strong>traitement web agile et centré sur le web</strong> :</p>
<ul>
<li>
<p><strong>Choisissez ALTO XML si :</strong></p>
<ul>
<li>Vous gérez un dépôt universitaire, muséal ou de bibliothèque nationale construit sur <strong>METS, PREMIS, Islandora, Samvera, Kitodo ou Goobi</strong>.</li>
<li>Vos collections comprennent des journaux multi‑colonnes complexes, des périodiques ou des livres historiques nécessitant une séparation stricte des en‑têtes, pieds de page, illustrations et texte principal.</li>
<li>Vos subventions ou politiques institutionnelles de préservation imposent le respect des normes archivistiques du <strong>Library of Congress</strong> avec une validation stricte du schéma XSD.</li>
</ul>
</li>
<li>
<p><strong>Choisissez hOCR si :</strong></p>
<ul>
<li>Votre objectif principal est de générer des <strong>dérivés PDF/A recherchables</strong> via OCRmyPDF ou d’alimenter des surcouches de recherche web légères.</li>
<li>Vous construisez un pipeline de numérisation personnalisé, dirigé par des développeurs, en Python ou JavaScript, où les outils DOM HTML standard accélèrent le développement.</li>
<li>Vous souhaitez des fichiers OCR intermédiaires compacts pendant le prototypage rapide avant d’archiver les dérivés finaux.</li>
</ul>
</li>
</ul>
<p>Pour la plupart des bibliothèques numériques institutionnelles chargées de préserver le patrimoine culturel sur plusieurs décennies, <strong>ALTO XML (v4.x)</strong> reste la norme à long terme la plus solide—tandis que <strong>hOCR</strong> constitue un compagnon léger idéal pour la diffusion web rapide et la génération de PDF.</p>
<h2 id="foire-aux-questions-faq">Foire aux questions (FAQ)</h2>
<p><strong>Q1. Tesseract OCR peut-il générer à la fois des fichiers hOCR et ALTO XML simultanément ?</strong> Oui, Tesseract vous permet de passer les arguments de configuration <code>hocr</code> et <code>alto</code> dans une seule commande afin de produire les deux fichiers simultanément lors d’une passe OCR.</p>
<p><strong>Q2. Quel format OCR fonctionne mieux avec les paquets d’archivage METS et PREMIS ?</strong> ALTO XML est spécifiquement conçu comme norme compagnon de METS et PREMIS pour les flux de travail de préservation numérique structurée.</p>
<p><strong>Q3. Le hOCR ou l&rsquo;ALTO XML est-il meilleur pour créer des PDF recherchables ?</strong> hOCR est généralement plus rapide et plus largement supporté en tant que format intermédiaire natif dans les outils open-source comme OCRmyPDF pour intégrer des calques de texte cachés.</p>
<p><strong>Q4. Pouvez-vous convertir des fichiers hOCR existants en ALTO XML valide sans relancer l&rsquo;OCR ?</strong> Oui, vous pouvez utiliser des feuilles de style XSLT open-source (comme <code>hOCR-to-ALTO</code>) ou des outils Python tels que <code>ocr-fileformat</code> pour transformer le hOCR en ALTO XML conforme au schéma.</p>
<p><strong>Q5. L&rsquo;ALTO XML prend-il en charge les repères de reconnaissance de texte manuscrit (HTR) ?</strong> Oui, à partir de la version 4 d&rsquo;ALTO, le schéma prend en charge les coordonnées polygonales et les polylignes de repères adaptées aux moteurs HTR tels que Transkribus et eScriptorium.</p>
<h2 id="voir-aussi">Voir aussi</h2>
<ul>
<li><a href="https://blog.fileformat.com/en/pdf/pdfa-3-the-hybrid-monster-embedding-original-data-inside-your-ocr/">PDF/A-3 - Le monstre hybride ? Intégrer les données originales dans votre OCR</a></li>
<li><a href="https://blog.fileformat.com/ocr/understanding-ocr-file-formats-hocr-vs-alto-vs-pdfa-explained/">Comprendre les formats de fichiers OCR - HOCR vs ALTO vs PDF/A expliqué</a></li>
<li><a href="https://blog.fileformat.com/pdf/what-is-the-difference-between-pdf-and-fdf/">Quelle est la différence entre PDF et FDF ?</a></li>
<li><a href="https://blog.fileformat.com/pdf/what-is-fdf-used-for/">À quoi sert le FDF ? Comprendre le but du format de données de formulaires</a></li>
<li><a href="https://blog.fileformat.com/file-formats/pdf-vs-word-which-one-should-you-use-and-when/">PDF vs Word : lequel devez‑vous utiliser et quand ?</a></li>
</ul>
<!-- raw HTML omitted -->
]]></content:encoded>
    </item>
    
  </channel>
</rss>
