# From eScriptorium to TEI Publisher

Hugo Scheithauer, Alix Chagué, Laurent Romary

► To cite this version:

Hugo Scheithauer, Alix Chagué, Laurent Romary. From eScriptorium to TEI Publisher. Brace your digital scholarly edition!, Nov 2021, Berlin, France. hal-03538115

HAL Id: hal-03538115

https://inria.hal.science/hal-03538115

Submitted on 21 Jan 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
From eScriptorium to TEI Publisher

Brace your digital scholarly edition!

11/19/21

Hugo Scheithauer, Alix Chagué, Laurent Romary

<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>
# Overview - from source documents to scholarly editions

Context: heterogeneous formats at the various stages of a digitisation workflow

* ALTO/PAGE XML vs. TEI

Objectives:

* Improve reusability of content at various stages

* Hence, easier combination of different software solutions

Results:

* Propagation of metadata elements

* Mapping of layout, transcription information

* Architecture for integrating the content in further editions

<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /></figure>
What is eScriptorium?

<figure><img src="image_7.png" /></figure>

* An open-source software, developed by the research team Scripta (PSL)

* Provides an interface for:

* document segmentation,

* layout annotation,

* transcribing (manually or automatically),

* and training OCR/HTR models.
<figure><img src="image_8.png" /></figure>

<figure><img src="image_9.png" /></figure>

<figure><img src="image_10.png" /></figure>

Description

Images

Edit

Models

NAF 28058

Element 1 - 32_c42c1_default.jpg - (2312x3469) - 810.3 KB

Zip Import

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /></figure>

<figure><img src="image_15.png" /></figure>

<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /></figure>

<figure><img src="image_18.png" /></figure>

<figure><img src="image_19.png" /></figure>

<figure><img src="image_20.png" /></figure>

<figure><img src="image_21.png" /></figure>

<figure><img src="image_22.png" /></figure>

<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /></figure>

<figure><img src="image_25.png" /></figure>

<figure><img src="image_26.png" /></figure>

<figure><img src="image_27.png" /></figure>

<figure><img src="image_28.png" /></figure>

1

Le Pont Mirabeau.

Sous le pont Mirabeau coule la Seine.

Et nos amours, faut-il qu'il m'en souvienne ?

La joie venait toujours après la peine.

Vienne la nuit, sonne l'heure,

Les jours s'en vont, je demeure.

Les mains dans les mains, restons face à face

Tandis que sous le pont de nos bras passe

Des éternels regards l'ombre si lasse.

Vienne la nuit, sonne l'heure

Les jours s'en vont, je demeure.
A page layout can be segmented into one or several **text regions**, each with their own coordinates:

## le Part Mirabeau

Sauf le part Mirabeau comme la Seine.

Et nos amours, ferai-je qu'il m'en souvienne ?

Tic tic j'ai venant t'ayant après la peine.

Vienne le matin, some l'heure,
tes jans s'en vart, je demeure.

Tres mains dans les mains, restons face à face

Text lines can be nested in a text region.
<figure><img src="image_29.png" /></figure>

A line of text combines:

* A baseline (red) or a topline: a line defined by at least 2 points

* A mask (purple): a polygon defined by at least 3 points

* A text node
eScriptorium currently uses three formats for transcription export:

* PAGE XML

* ALTO

* Raw text
A PAGE XML example

<figure><img src="image_30.png" /></figure>
From page to content

Which TEI representation for HTR output?
Documenting a transcription: metadata representation with TEI

TEI

<figure><img src="image_31.png" /></figure>
Any metadata missing for documenting an automatic transcription?

-> The transcription model

-> Documenting automatic and manual post-processing, such as correction

-> Information regarding how the transcription was produced
Which TEI representation for the transcription
itself?
What does the TEI have to offer for the representation of data resulting from
HTR/OCR?

Beyond facsimiles, the <sourceDoc> element:

<sourceDoc>

<sourceDoc> contains a transcription or other representation of a single source document potentially forming part of a *dossier génétique* or collection of sources.

Screenshot from the TEI guidelines for the <sourceDoc> element (https://www.tei-c.org/release/doc/tei-p5-doc/fr/html/ref-sourceDoc.html)
How are we using the <sourceDoc>?

Two key principles:

→ The <sourceDoc> must be the strict transposition of all automatic transcription output elements.

→ All elements in <body> are the user's responsibility and contain their interpretation/edition of the transcription.
Representation of a page with TEI using the `<sourceDoc>` element
The PAGE XML <Page> element, with basic metadata, for instance:

<Page imageFilename="32_c42c1_default.jpg" imageWidth="2312" imageHeight="3469">

becomes a <sourceDoc> element in TEI:

<sourceDoc>
<graphic url="32_c42c1_default.jpg" width="2312px" height="3469px"/>
</sourceDoc>
PAGE XML and TEI structure of an image content:
**text regions and baselines**

<figure><img src="image_32.png" /><figcaption>PAGE XML</figcaption></figure>
All TEI elements together:

...
Keeping the link with IIIF image servers?

<graphic url="https://gallica.bnf.fr/iiif/ark:/12148/btv1b525056707/f33/full/full/0.com" source="https://gallica.bnf.fr/iiif/ark:/12148/btv1b525056707/manifest.json" width="2312px" height="3469px"/>
Processing the <sourceDoc>
Linking interpreted content in the <text> elements with the various
components available in <sourceDoc>

<figure><img src="image_33.png" /><figcaption>Simplification of the LEPIDEMO workflow</figcaption></figure>
Linking interpreted content in the <text> elements with the various components available in <sourceDoc>

<figure><img src="image_34.png" /><figcaption>Simplification of the LEPIDEMO workflow</figcaption></figure>
A complex layout finely annotated in eScriptorium

<figure><img src="image_35.png" /></figure>
<figure><img src="image_36.png" /><figcaption>Visualizing the <sourceDoc> and the processed <body> with TEI Publisher</figcaption></figure>
<figure><img src="image_37.png" /></figure>

<figure><img src="image_38.png" /></figure>

<figure><img src="image_39.png" /></figure>

<figure><img src="image_40.png" /></figure>

<figure><img src="image_41.png" /></figure>

<figure><img src="image_42.png" /></figure>

<figure><img src="image_43.png" /></figure>

<figure><img src="image_44.png" /></figure>

FRAN_0025_3056_L-0.tei

View

sourceDoc

<figure><img src="image_45.png" /></figure>

structure_{type:col_1;}

198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

structure_{type:col_3;}

Procuration
Autorisation
Certificat de ppté

<figure><img src="image_46.png" /></figure>

Unable to open [object Object]: HTTP 404 attempting to load TileSource
<figure><img src="image_47.png" /></figure>

<figure><img src="image_48.png" /></figure>

<figure><img src="image_49.png" /></figure>

<figure><img src="image_50.png" /></figure>

<figure><img src="image_51.png" /></figure>

<figure><img src="image_52.png" /></figure>

<figure><img src="image_53.png" /></figure>

FRAN_0025_3056_L-0.tei

View

sourceDoc

<figure><img src="image_54.png" /></figure>

structure_{type:col_3;}

Procuration

Autorisation

Certificat de ppté

Procuration

Mainlevée

de signification

structure_{type:col_5;}

An 1914, mois d Fevrier

à Paris 34 rue Sedaine

Lamour (par Jn Bte) employé à la Caserne de la Gde Républicaine

à Paris rue St- Etienne du Mont en blanc pour recueillir SSon

Boettcher (par Henry Emile) Ingr Conseil à Paris 39 Bd St. Martin

à Léontine Jeanne Blanchot safe dt avec lui pour gérer Comce-

Boileau-Descombres (parlaSté) à Paris 73 rue Lafayette d'inscn. cf

Sophie Marie Louise Dessoliers épse de Edouard Lavelaine de Maubeuge

Gront (par Jean Eugène André) Directr d'usine à Bobigny route des

Petits Ponts à André Valern Fortin indel à Paris 34 rue Sedaine

Valter (par Léon) imprimr à Paris rue Grange aux Belles d'ins.

c/ Jean Louis Perréal à Montigny le Bretonneux (S. & O.)

Billema (par Lucien) négt dt à Paris rue d'Aumale 13bis// d'insc.

c/ Edouard Eugène Lebourcq & Eugène Pauline Potel 104 r. St Maur

Kopenhagen (par Andrée Esther Eugénie) à Neuilly s/ S. 14 rue

St- Pierre à Augustine Marie Bonchot rentière à Paris 41 rue

de Maubeuge de 26000 f - remboursable le 9 février 1920. hvn s/

<figure><img src="image_55.png" /></figure>

Unable to open [object Object]: HTTP 404 attempting to load TileSource
Processing `<sourceDoc>` to create an interpreted content in `<body>`

* processing coordinates and sourceDoc

* create table, row and cell in body

* processing facs and ids:

* create relations between
    sourceDoc and body//cell

* processing text nodes:

* add annotation layer (when-iso to
    dates, persName, etc)

* correct the text

```xml
<row>
  <cell n="1" role="col1">
    <lb facs="#eSc_line_e24d89c4"/> 440 </cell>
  </row>
</body>
```
<figure><img src="image_56.png" /></figure>

<figure><img src="image_57.png" /></figure>

<figure><img src="image_58.png" /></figure>

<figure><img src="image_59.png" /></figure>

<figure><img src="image_60.png" /></figure>

<figure><img src="image_61.png" /></figure>

<figure><img src="image_62.png" /></figure>

<figure><img src="image_63.png" /><figcaption>FRAN_0025_3056_L-0-tei</figcaption></figure>

<table><thead><tr><th>Numéros du répertoire actes</th><th>Dates des brevets</th><th>Actes en brevets</th><th>Actes en minutes</th><th>Noms, prénims et domiciles des parties ; indication, situations et prix des biens</th><th>Date de l'enregistrement</th><th>Droits de l'enregistrement</th><th>Autres</th></tr></thead><tbody><tr><td>198</td><td>9</td><td>Procuration</td><td></td><td>Lamour (par Jn Bte) employé à la Caserne de la Gde Républicaine à Paris rue St- Etienne du Mont en blanc pour recueillir SSon</td><td>10</td><td>3.75</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>Boettcher (par Henry Emile) Ingr Conseil à Paris 30 rue de l'Arsenal</td><td></td><td></td><td></td></tr></tbody></table>

<figure><img src="image_64.png" /></figure>
Conclusion

* All elements from PAGE XML and ALTO files can be mapped to a <sourceDoc> element

* Switching to TEI earlier in the pipeline simplifies the workflow. It ensures that data resulting from OCR/HTR are documented and easily accessible with an edition software such as TEI Publisher.

* We present a proof of concept and a series of rather stable specifications and call for feedback from the community
Thank you for your attention, feedback is welcome and appreciated!

**Contacts:**

- hugo.scheithauer[at]inria.fr

- alix.chague[at]inria.fr

- laurent.romary[at]inria.fr

**Resources:**

- https://github.com/lectaurep/page2tei (XSLT PAGEXML to TEI and transformation exemples)

- https://github.com/lectaurep/lepidemo (LECTAUREP project pipeline for transforming PAGE XML files to TEI, and publishing them with TEI Publisher)