<?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>hOCR vs. ALTO on File Format Blog</title>
    <link>https://blog.fileformat.com/de/tag/hocr-vs.-alto/</link>
    <description>Recent content in hOCR vs. ALTO on File Format Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>de</language>
    <lastBuildDate>Mon, 30 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.fileformat.com/de/tag/hocr-vs.-alto/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>hOCR vs. ALTO XML: Welches OCR-Format ist besser für digitale Bibliotheken?</title>
      <link>https://blog.fileformat.com/de/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/de/ocr/hocr-vs-alto-xml-which-ocr-format-is-better-for-digital-libraries/</guid>
      <description>Vergleichen Sie hOCR vs. ALTO XML für digitale Bibliotheken. Erfahren Sie, wie Schema-Validierung, METS-Integration, Dateigröße und IIIF-Suchunterstützung Ihren OCR-Workflow beeinflussen.</description>
      <content:encoded><![CDATA[<p><strong>Zuletzt aktualisiert</strong>: 20 Aug, 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-wesentliche-unterschiede-für-digitale-erhaltung--suche">hOCR vs. ALTO XML: Wesentliche Unterschiede für digitale Erhaltung &amp; Suche</h2>
<p>Die Digitalisierung physischer Sammlungen—ob 19‑Jahrhundert‑Zeitungen, seltene Monographien oder kommunale Archive—erfordert weit mehr, als einen Optical Character Recognition (OCR)-Motor zu betreiben und die Ausgabe in eine reine Textdatei zu schreiben. Wenn reiner Text Begrenzungsrahmen, Spaltenhierarchie, Schriftstile und Konfidenzwerte entfernt, können nachgelagerte Suchoberflächen Trefferbegriffe nicht auf Seitenbildern hervorheben, und Langzeit‑Aufbewahrungsrepositorien verlieren kritischen strukturellen Kontext.</p>
<p>Um sowohl Text als auch räumliches Layout zu erhalten, wählen digitale Bibliotheksarchitekten typischerweise zwischen zwei dominanten offenen Standards: <strong>hOCR</strong> und <strong>ALTO XML</strong>. Während beide Formate den erkannten Text zusammen mit geometrischen Koordinaten kodieren, wurden sie mit grundlegend unterschiedlichen Philosophien, Governance‑Modellen und Repository‑Ökosystemen im Hinterkopf entwickelt.</p>
<h2 id="verstehen-von-hocr-das-web-native-mikroformat">Verstehen von hOCR: Das web-native Mikroformat</h2>
<p>Erstellt von Thomas Breuel im Jahr 2007, <strong>hOCR</strong> verfolgt einen pragmatischen, web‑first Ansatz zur OCR‑Serialisierung. Anstatt ein eigenes XML‑Vokabular von Grund auf zu erfinden, bettet hOCR Layout-, Begrenzungs‑Box‑ und Erkennungs‑Vertrauens‑Metadaten direkt in gültige <strong>HTML oder XHTML</strong>‑Dokumente ein, wobei standardisierte <code>class</code>‑ und <code>title</code>‑Attribute verwendet werden.</p>
<h3 id="wie-hocr-daten-strukturiert">Wie hOCR Daten strukturiert</h3>
<p>Eine hOCR‑Datei ist sofort in jedem Webbrowser renderbar. Die strukturelle Hierarchie wird durch standardmäßige HTML‑Elemente ausgedrückt, die mit semantischen Klassennamen kombiniert werden:</p>
<ul>
<li><code>ocr_page</code>: Stellt das gescannte Seitenbild und seine Pixelabmessungen dar.</li>
<li><code>ocr_carea</code>: Definiert einen Inhaltsbereich oder Spaltenblock.</li>
<li><code>ocr_par</code>: Stellt einen logischen Absatz dar.</li>
<li><code>ocr_line</code>: Erfasst eine einzelne Textzeile zusammen mit der Grundliniengeometrie.</li>
<li><code>ocrx_word</code>: Umschließt ein einzelnes Token und speichert Begrenzungs‑Boxen (<code>bbox</code>) sowie die Engine‑Vertrauenswürdigkeit (<code>x_wconf</code>) im <code>title</code>‑Attribut.</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</span> <span style="color:#a6e22e">215</span> <span style="color:#a6e22e">345</span> <span style="color:#a6e22e">1420</span> <span style="color:#a6e22e">410</span><span style="color:#960050;background-color:#1e0010">;</span> <span style="color:#a6e22e">baseline</span> <span style="color:#a6e22e">-0</span><span style="color:#960050;background-color:#1e0010">.</span><span style="color:#a6e22e">002</span> <span style="color:#a6e22e">-12</span><span style="color:#960050;background-color:#1e0010">\&#34;</span>&gt;\n          &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</span> <span style="color:#a6e22e">215</span> <span style="color:#a6e22e">345</span> <span style="color:#a6e22e">480</span> <span style="color:#a6e22e">410</span><span style="color:#960050;background-color:#1e0010">;</span> <span style="color:#a6e22e">x_wconf</span> <span style="color:#a6e22e">96</span><span style="color:#960050;background-color:#1e0010">\&#34;</span>&gt;Archiv&lt;/<span style="color:#f92672">span</span>&gt;\n          &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</span> <span style="color:#a6e22e">505</span> <span style="color:#a6e22e">348</span> <span style="color:#a6e22e">890</span> <span style="color:#a6e22e">408</span><span style="color:#960050;background-color:#1e0010">;</span> <span style="color:#a6e22e">x_wconf</span> <span style="color:#a6e22e">94</span><span style="color:#960050;background-color:#1e0010">\&#34;</span>&gt;Sammlung&lt;/<span style="color:#f92672">span</span>&gt;\n        &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="stärken-von-hocr">Stärken von hOCR</h3>
<ul>
<li><strong>Zero‑Friction Web‑Tooling:</strong> Entwickler können hOCR mit Standard‑HTML‑Parsern (<code>BeautifulSoup</code>, <code>lxml</code>, Browser‑DOM‑APIs) analysieren und Layouts direkt mit CSS stylen oder inspizieren.</li>
<li><strong>Schnelle PDF‑Schichtgenerierung:</strong> Open‑Source‑Werkzeuge wie <strong>OCRmyPDF</strong> verwenden hOCR nativ, um unsichtbare, durchsuchbare Textebenen auf gescannte TIFF‑ oder PDF‑Bilder zu legen, mit minimalem Transformationsaufwand.</li>
<li><strong>Geringer Speicherbedarf:</strong> Ohne ausführliche verschachtelte XML‑Tags für jedes Leerzeichen oder jede Schriftattribut, sind hOCR‑Dateien kompakt und schnell zu erzeugen in Hochdurchsatz‑Batch‑Pipelines.</li>
</ul>
<h2 id="verstehen-von-alto-xml-der-archivierungsstandard">Verstehen von ALTO XML: Der Archivierungsstandard</h2>
<p><strong>ALTO (Analyzed Layout and Text Object)</strong> ist ein offenes XML‑Schema, das von der <strong>Library of Congress</strong> gepflegt wird. Ursprünglich im Rahmen des METAe‑Projekts der Europäischen Union entwickelt, wurde ALTO speziell für Institutionen des kulturellen Erbes, Nationalbibliotheken und groß angelegte Bewahrungsrepositorien konzipiert.</p>
<h3 id="wie-alto-xml-daten-strukturiert">Wie ALTO XML Daten strukturiert</h3>
<p>Im Gegensatz zu hOCR, das HTML‑Attribute überlädt, erzwingt ALTO strenge, stark typisierte XML‑Schema‑Definitionen (XSD). Eine ALTO‑Datei teilt jedes Dokument in drei Kernabschnitte:</p>
<ol>
<li><code>&lt;Description&gt;</code>: Erfasst Maßeinheiten (<code>pixel</code>, <code>mm10</code> oder <code>inch1200</code>), Quellbild‑Kennungen und den OCR‑Verlauf.</li>
<li><code>&lt;Styles&gt;</code>: Zentralisiert Schriftdefinitionen (<code>FONTFAMILY</code>, <code>FONTSIZE</code>, <code>FONTSTYLE</code>) und Absatzausrichtungen, sodass einzelne Wörter die Stil‑Metadaten nicht wiederholen.</li>
<li><code>&lt;Layout&gt;</code>: Bildet physische Seitenbereiche (<code>TopMargin</code>, <code>LeftMargin</code>, <code>RightMargin</code>, <code>BottomMargin</code> und <code>PrintSpace</code>) auf <code>TextBlock</code>, <code>TextLine</code>, <code>String</code> und explizite <code>SP</code> (Leerzeichen)-Elemente ab.</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="stärken-von-alto-xml">Stärken von ALTO XML</h3>
<ul>
<li><strong>METS &amp; Repository Interoperabilität:</strong> ALTO ist dafür konzipiert, innerhalb eines <strong>METS (Metadata Encoding and Transmission Standard)</strong>-Wrappers zu liegen, wobei strukturelle Seitenkarten, beschreibende MARC/Dublin‑Core‑Datensätze und Erhaltungs‑Metadaten (PREMIS) zu einem einzigen archivierten Submission Information Package (SIP) verknüpft werden.</li>
<li><strong>Reiche typografische und Randmodellierung:</strong> ALTO trennt explizit laufende Kopfzeilen, Fußzeilen, Marginalien, Illustrationen (<code>Illustration</code>) und grafische Trennlinien (<code>GraphicalElement</code>) vom Haupttext.</li>
<li><strong>Moderne polygonale &amp; HTR-Unterstützung:</strong> Ab ALTO v4 hat das Schema native Unterstützung für polygonale Begrenzungsformen und Basislinien‑Polylinien hinzugefügt, wodurch es mit Handwritten Text Recognition (HTR)-Werkzeugen wie <strong>Transkribus</strong> und <strong>eScriptorium</strong> kompatibel ist.</li>
</ul>
<h2 id="nebeneinander-vergleich-hocr-vs-alto-xml">Nebeneinander-Vergleich: hOCR vs. ALTO XML</h2>
<table>
<thead>
<tr>
<th style="text-align:left">Merkmal / Kriterium</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>Zugrunde liegende Syntax</strong></td>
<td style="text-align:left">HTML / XHTML mit Microformats (<code>class</code>, <code>title</code>)</td>
<td style="text-align:left">Stark typisiertes XML, gesteuert durch XSD‑Schemas</td>
</tr>
<tr>
<td style="text-align:left"><strong>Körperpflege</strong></td>
<td style="text-align:left">Von der Community gepflegte offene Spezifikation (<code>kba/hocr-spec</code>)</td>
<td style="text-align:left">Library of Congress (ALTO-Redaktionsausschuss)</td>
</tr>
<tr>
<td style="text-align:left"><strong>Schema-Validierung</strong></td>
<td style="text-align:left">Locker; basiert auf HTML-Validatoren und benutzerdefinierten Attribut-Lintern</td>
<td style="text-align:left">Strenge XSD-Validierung garantiert strukturelle Konsistenz</td>
</tr>
<tr>
<td style="text-align:left"><strong>Metadaten &amp; Koordinatenspeicherung</strong></td>
<td style="text-align:left">Durch Semikolons getrennte Schlüssel-Wert‑Zeichenketten in <code>title</code>-Attributen</td>
<td style="text-align:left">Explizite typisierte XML-Attribute (<code>HPOS</code>, <code>VPOS</code>, <code>WIDTH</code>, <code>HEIGHT</code>, <code>WC</code>)</td>
</tr>
<tr>
<td style="text-align:left"><strong>Typografie &amp; Schriftmodellierung</strong></td>
<td style="text-align:left">Minimal; selten standardisiert über OCR‑Engines hinweg</td>
<td style="text-align:left">Dedizierter <code>&lt;Styles&gt;</code>‑Block mit <code>TextStyle</code>‑ und <code>ParagraphStyle</code>‑Referenzen</td>
</tr>
<tr>
<td style="text-align:left"><strong>Seitenzonen‑Granularität</strong></td>
<td style="text-align:left">Grundlegende Blöcke, Absätze, Zeilen und Wörter</td>
<td style="text-align:left">Explizite Ränder (<code>TopMargin</code>, <code>BottomMargin</code>), <code>PrintSpace</code>, Tabellen und Illustrationen</td>
</tr>
<tr>
<td style="text-align:left"><strong>METS / PREMIS-Integration</strong></td>
<td style="text-align:left">Erfordert benutzerdefiniertes Wrapping oder Konvertierung</td>
<td style="text-align:left">Native Begleitstandard für METS/PREMIS-Archivpakete</td>
</tr>
<tr>
<td style="text-align:left"><strong>OCR-Engine-Unterstützung</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>Dateiausführlichkeit</strong></td>
<td style="text-align:left">Kompakt und leichtgewichtig</td>
<td style="text-align:left">Ausführlich aufgrund expliziter <code>&lt;SP&gt;</code>-Tags und Attributschemas</td>
</tr>
</tbody>
</table>
<h2 id="wesentliche-architektonische-unterschiede-die-digitale-bibliotheken-beeinflussen">Wesentliche architektonische Unterschiede, die digitale Bibliotheken beeinflussen</h2>
<h3 id="1-schema-validierung-vs-zeichenketten-parsing">1. Schema-Validierung vs. Zeichenketten-Parsing</h3>
<p>In <strong>ALTO XML</strong>, jede Koordinate, jeder Vertrauensscore und jede Stilreferenz ist ein explizites XML-Attribut, das gegen ein offizielles XSD-Schema validiert wird. Wenn eine OCR-Pipeline eine fehlerhafte Koordinate oder eine ungültige Referenz-ID erzeugt, erkennt die automatisierte Aufnahmevalidierung dies sofort, bevor das Repository beschädigt wird.</p>
<p>In <strong>hOCR</strong> werden kritische geometrische Daten in unstrukturierte Textzeichenketten im HTML <code>title</code>-Attribut gepackt (zum Beispiel <code>title=\&quot;bbox 215 345 480 410; x_wconf 96\&quot;</code>). Verbraucher müssen sekundäre String‑Splitting‑Parser schreiben, um Koordinaten und Vertrauenswerte zu extrahieren, und Standard‑HTML5‑Validatoren kennzeichnen Tippfehler in <code>title</code>‑Zeichenketten nicht.</p>
<h3 id="2-zeitungs--und-komplexe-layoutsegmentierung">2. Zeitungs- und komplexe Layoutsegmentierung</h3>
<p>Historische Zeitungen und mehrspaltige Periodika stellen erhebliche Herausforderungen für Such‑ und Entdeckungsplattformen dar. Wenn eine OCR‑Engine laufende Kopfzeilen, Seitenzahlen, Werbeanzeigen und Artikelspalten zu einem einzigen Lesestrom zusammenführt, verschlechtert sich die Relevanz der Volltextsuche schnell.</p>
<p>ALTO XML löst dies strukturell, indem die Seitengeometrie in unterschiedliche Zonen (<code>TopMargin</code>, <code>PrintSpace</code>, <code>ComposedBlock</code>, <code>Illustration</code>) aufgeteilt und explizite Lesereihenfolge‑Attribute (<code>IDNEXT</code>) kodiert werden. Während hOCR die Klassen <code>ocr_carea</code> und <code>ocr_header</code> unterstützt, variieren die Implementierungen zwischen OCR‑Engines erheblich.</p>
<h3 id="3-discovery-ebenen-und-iiif-integration">3. Discovery-Ebenen und IIIF-Integration</h3>
<p>Moderne digitale Bibliotheken stützen sich stark auf das <strong>International Image Interoperability Framework (IIIF)</strong> und Viewer wie <strong>Mirador</strong> oder <strong>Universal Viewer</strong>, um hochauflösende Scans mit Treffer‑Highlight‑Overlays anzuzeigen.</p>
<ul>
<li><strong>ALTO XML</strong> lässt sich sofort in die wichtigsten Repository-Plattformen integrieren – einschließlich <strong>Islandora</strong>, <strong>Samvera/Hyrax</strong>, <strong>DSpace</strong>, <strong>Kitodo</strong> und <strong>Goobi</strong> – sowie in IIIF Content Search-Server (wie <code>iiif-content-search</code> und Solr-basierte OCR-Plugins wie <code>solr-ocrhighlighting</code>).</li>
<li><strong>hOCR</strong> funktioniert nahtlos mit leichten Web-Viewern und <code>solr-ocrhighlighting</code> und ist besonders nützlich, wenn Teams benutzerdefinierte Python- oder Node.js-Frontends ohne einen vollständigen METS/ALTO-Repository-Stack erstellen.</li>
</ul>
<h3 id="4-speicheraufwand-und-verarbeitungsgeschwindigkeit">4. Speicheraufwand und Verarbeitungsgeschwindigkeit</h3>
<p>Da ALTO XML explizite <code>&lt;SP&gt;</code>-Elemente für jedes Leerzeichen zwischen Wörtern zusammen mit detaillierten Koordinatenattributen speichert, ist eine ALTO-Datei typischerweise <strong>30 % bis 60 % größer</strong> als eine äquivalente hOCR-Datei für dieselbe Seite. Für Sammlungen, die sich über zig Millionen Seiten erstrecken, wirkt sich dieser Unterschied auf Speicherbudgets und die XML‑Indexierungsdurchsatzrate aus – obwohl die gzip‑Kompression den Festplattenverbrauch erheblich reduziert.</p>
<h2 id="praktischer-workflow-konvertierung-zwischen-hocr-und-alto-xml">Praktischer Workflow: Konvertierung zwischen hOCR und ALTO XML</h2>
<p>Digitale Bibliotheken sind selten dauerhaft an ein einziges Format gebunden. Da beide Formate hierarchische Begrenzungsrahmen und Text‑Token darstellen, können Sie sie mithilfe etablierter Open‑Source‑Werkzeuge ineinander konvertieren:</p>
<ol>
<li><strong>Direkter Export von Tesseract:</strong> Moderne Tesseract-Versionen geben nativ beide Formate in einem einzigen Erkennungslauf aus, ohne zusätzliche Konvertierungsschritte:</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>XSLT-Transformationen (<code>hOCR-to-ALTO</code>):</strong> Standardisierte XSLT‑2.0‑Stylesheets (gepflegt im Open‑Source‑Repository <code>filak/hOCR-to-ALTO</code>) konvertieren alte Tesseract‑hOCR‑Archive in gültiges ALTO‑v2.0, v2.1, v3 oder v4 XML mittels Saxon‑HE.</li>
<li><strong>Python‑Bibliotheken (<code>ocr-fileformat</code>):</strong> Für automatisierte Aufnahme‑Pipelines normalisieren Befehlszeilen‑Wrapper wie <code>ocr-fileformat</code> die Konvertierungen zwischen hOCR, ALTO‑XML und PAGE‑XML.</li>
</ol>
<h2 id="welches-ocr-format-sollte-ihre-digitale-bibliothek-wählen">Welches OCR-Format sollte Ihre digitale Bibliothek wählen?</h2>
<p>Die Wahl zwischen hOCR und ALTO XML hängt davon ab, ob Ihre Priorität <strong>langfristige Archivverwaltung</strong> oder <strong>agile, web‑zentrierte Verarbeitung</strong> ist:</p>
<ul>
<li>
<p><strong>Wählen Sie ALTO XML, wenn:</strong></p>
<ul>
<li>Sie verwalten ein Universitäts-, Museums- oder Nationalbibliotheks-Repository, das auf <strong>METS, PREMIS, Islandora, Samvera, Kitodo oder Goobi</strong> basiert.</li>
<li>Ihre Sammlungen umfassen komplexe mehrspaltige Zeitungen, Zeitschriften oder historische Bücher, die eine strenge Trennung von Kopfzeilen, Fußzeilen, Illustrationen und Fließtext erfordern.</li>
<li>Ihre Fördermittel oder institutionellen Erhaltungsrichtlinien verlangen die Einhaltung der <strong>Library of Congress</strong>‑Archivstandards mit strenger XSD‑Schema‑Validierung.</li>
</ul>
</li>
<li>
<p><strong>Wählen Sie hOCR, wenn:</strong></p>
<ul>
<li>Ihr Hauptziel ist die Erstellung <strong>durchsuchbarer PDF/A-Derivate</strong> mittels OCRmyPDF oder das Betreiben leichter Web‑Such‑Overlays.</li>
<li>Sie bauen eine maßgeschneiderte, von Entwicklern geführte Digitalisierungs-Pipeline in Python oder JavaScript, bei der Standard‑HTML‑DOM‑Werkzeuge die Entwicklung beschleunigen.</li>
<li>Sie benötigen kompakte Zwischendateien für OCR während schneller Prototypenentwicklung, bevor die endgültigen Derivate archiviert werden.</li>
</ul>
</li>
</ul>
<p>Für die meisten institutionellen Digitalbibliotheken, die über Jahrzehnte kulturelles Erbe bewahren sollen, bleibt <strong>ALTO XML (v4.x)</strong> der robustere Langzeitstandard – während <strong>hOCR</strong> ein idealer leichter Begleiter für schnelle Webauslieferung und PDF‑Erstellung ist.</p>
<h2 id="häufig-gestellte-fragen-faq">Häufig gestellte Fragen (FAQ)</h2>
<p><strong>Q1. Kann Tesseract OCR sowohl hOCR- als auch ALTO XML-Dateien gleichzeitig erzeugen?</strong> Ja, Tesseract ermöglicht es, sowohl <code>hocr</code> als auch <code>alto</code> Konfigurationsargumente in einem einzigen Befehl zu übergeben, um beide Dateien gleichzeitig aus einem OCR‑Durchlauf zu erzeugen.</p>
<p><strong>Q2. Welches OCR-Format funktioniert besser mit METS- und PREMIS-Archivierungspaketen?</strong> ALTO XML ist speziell als Begleitstandard zu METS und PREMIS für strukturierte digitale Erhaltungs‑Workflows konzipiert.</p>
<p><strong>Q3. Ist hOCR oder ALTO XML besser für die Erstellung durchsuchbarer PDFs?</strong> hOCR ist im Allgemeinen schneller und wird breiter unterstützt als ein natives Zwischenformat in Open-Source-Tools wie OCRmyPDF zum Einbetten versteckter Textebenen.</p>
<p><strong>Q4. Können Sie vorhandene hOCR-Dateien in gültiges ALTO XML konvertieren, ohne die OCR erneut auszuführen?</strong> Ja, Sie können Open-Source-XSLT-Stylesheets (wie <code>hOCR-to-ALTO</code>) oder Python-Tools wie <code>ocr-fileformat</code> verwenden, um hOCR in schema‑gültiges ALTO XML zu transformieren.</p>
<p><strong>Q5. Unterstützt ALTO XML Baselines für die Handschriftenerkennung (HTR)?</strong> Ja, ab ALTO Version 4 unterstützt das Schema polygonale Koordinaten und Baseline‑Polylinien, die für HTR‑Engines wie Transkribus und eScriptorium geeignet sind.</p>
<h2 id="siehe-auch">Siehe auch</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 - Das Hybrid-Monster? Originaldaten in Ihr OCR einbetten</a></li>
<li><a href="https://blog.fileformat.com/ocr/understanding-ocr-file-formats-hocr-vs-alto-vs-pdfa-explained/">Verstehen von OCR-Dateiformaten - HOCR vs ALTO vs PDF/A erklärt</a></li>
<li><a href="https://blog.fileformat.com/pdf/what-is-the-difference-between-pdf-and-fdf/">Was ist der Unterschied zwischen PDF und FDF?</a></li>
<li><a href="https://blog.fileformat.com/pdf/what-is-fdf-used-for/">Wofür wird FDF verwendet? Zweck des Forms Data Format verstehen</a></li>
<li><a href="https://blog.fileformat.com/file-formats/pdf-vs-word-which-one-should-you-use-and-when/">PDF vs Word: Welches sollten Sie wann verwenden?</a></li>
</ul>
<!-- raw HTML omitted -->
]]></content:encoded>
    </item>
    
  </channel>
</rss>
