scieee AI-readable full text Open interactive document viewer

D7.1.1 Whitepaper on Corpus Pre-Processing

Righi, Laura; Sabbatini, Ilaria

Abstract

The objective of Deliverable is to present the work conducted for the definition and preparation of a specific medieval corpus for the design of a tool for automatic text summarisation.This whitepaper contains thus a report of the sources that have been selected, analysed, and pre-processed by the WP to be used for the development of REVER.The process and the results are presented according to the experience developed with the case-study corpus, however, they are also intended to be applicable to other corpora: they are therefore not corpus-specific, but rather software-specific, and can be updated throughout the work of the WP.

Full text

Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 1 ITSERR – WP7 DELIVERABLE 7.1.1 WHITEPAPER ON CORPUS PRE-PROCESSING Document reference: ITSERRWP7DELIVERABLE 7.1.1 – Whitepaper on Corpus pre-processing Version number: 02.00 Status: FINAL Last revision date: 03/12/2025 by: Laura Righi Ilaria Sabbatini Verification date: 02/12/2025 by: Board Approval date: DD/MM/YYYY by: MUR Subject: IR0000014 – ITSERR TITLE FROM FILE SUMMARY PROPERTIES Filename: ITSERR_WP7_deliverable7.1.1_FINAL.docx Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 2 Change history Version Number Date Status Summary of main or important changes 00.01 WORKING Working version 01.00 DRAFT Complete revision of the document after ITSERR Board review 02.00 FINAL Finalisation Distribution List Name Company Role All ITSERR team members ITSERR Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 3 List of tables Table 1 .............................................................................................................................. 10 Table 2: The most popular OCR software ............................................................................ 29 Table 3: HTR handwritten text recognition for historical texts .............................................. 30 Table 4: Overview of the analysed Optical Recognition Systems .......................................... 31 List of figures Figure 1: From printed editions to Plain Text ....................................................................... 11 Figure 2: Layout Analysis.................................................................................................... 13 Figure 3: Two types of regesta editions ............................................................................... 15 Figure 4:The first model of data collection on papal regesta ................................................ 16 Figure 5: The second model of data collection on papal regesta ........................................... 17 Figure 6: The transformation through an OCR System ........................................................ 19 Figure 7: Typographical critical elements ............................................................................ 20 Figure 8: Examples of noise ................................................................................................ 22 Figure 9: The three phases of OCR-HTR system .................................................................. 24 Figure 10: Transkribus interface .......................................................................................... 27 Figure 11: OCR4all Interface ............................................................................................... 28 Figure 12: Rescribe Interface .............................................................................................. 28 Figure 13: Escriptorium Interface ........................................................................................ 29 Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 4 Table of Contents 1. Introduction ........................................................................................................ 5 1.1. Objectives ....................................................................................................... 5 1.2. Document Scope ............................................................................................. 6 1.3. State of the Art ................................................................................................ 7 2. Corpus Analysis and Methodological Approach for REVER ................................ 11 2.1. Reverse Regesta and the Need for Text Recognition ...................................... 11 2.2. Field of Study: paleography and diplomatics ................................................. 12 2.3. Corpus definition and pre-processing methodology ....................................... 14 3. Analysis of OCR and HTR existing tools ............................................................. 19 3.1. What is an Optical Character Recognition system .......................................... 19 3.2. What is an Handwritten Text Recognition Systems ........................................ 20 3.3. Basic OCR-HTR glossary ................................................................................. 21 4. Common Elements of OCR and HTR Systems ..................................................... 23 4.1. Core Phases of OCR/HTR Systems .................................................................. 23 4.2. Operational Phases of OCR/HTR Software ..................................................... 23 4.3. Manual and Automatic Workflow.................................................................. 25 5. Analysis of OCR-HTR systems: features, capabilities, and key criteria ................ 27 5.1. Tested Softwares ........................................................................................... 27 5.2. The choice the Right OCR-HTR ....................................................................... 30 5.3. Considered criteria for evaluation ................................................................. 30 6. Results .............................................................................................................. 32 7. Acronyms .......................................................................................................... 33 Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 5 1. Introduction 1.1. Objectives The main goal of the Work Package 7 - REVER, Reverse Regesta is the creation of a tool based on Artificial Intelligence for the summarization of medieval documents, and especially of pontifical documents. The decision to use this system to organize, index, and summarise medieval documents through the use of generative AI is based on the integration of various scientific needs, which will be the subject of in-depth discussion and testing. To develop a new automatized organizational process specifically created for historical documents, we chose to focus on the activity of automatic summarization grounding on an established and scientifically consolidated methodology - namely the creation of regesta, improved by scholars starting from the 19th century. The work of this WP starts from the observation of a scientific need coming from the scholars studying medieval charters: the need to explore specific topics, historical figures, or places, even with a comparative or a longue durée perspective, within a large corpus of sources. For the study of the Middle Ages, this is the case with the large amount of documentation produced by royal or papal chanceries. Corpora which are still today dispersed, preserved in different libraries and archives, which are geographically distant and differently organized, and thus not easily accessible for scholars. Due to the difficulties in access and consultation, for the scholars it is even more important in this case to correctly extract, record, and organize the data contained in these sources and make them navigable for each specific research project. The methodologies and tools to index and organize Medieval archival sources have not, however, seen in the last decades a great development, neither methodologically, nor technologically. Until now, most research on medieval papal documents still relies on ancient indexes and collections of summaries, edited by scholars in the 19th century. Among the various tools and methodologies adopted by scholars working on the history of the medieval Latin Church, the edition of regesta collections has been one of the most durable. Indeed, until now, Regesta have been produced mostly in printed collections and focusing almost exclusively on the documents produced by sovereigns, emperors, and popes. The compilation of a regestum requires an important effort in terms of time and resources and, moreover, these collections have only been updated, corrected, and supplemented on rare occasions. For the same reason, there is a scarcity of collections of regesta that have been compiled for documents that are less well-known and of Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 6 lesser importance regarding, for example, those historical figures or local institutions that are less prominent in the historical record. Thus, leaving behind – and sometimes forgotten in the archives – a large number of mediaeval sources. Only in recent years, the regesta collections started to appear online. The most important digital initiative related to regesta is undoubtedly the database Regesta Imperii, which focuses on the documents issued by German mediaeval rulers. While related to our corpus, we can notice three ongoing projects, which are publishing online regesta of papal documents: Regesta Pontificum Romanorum Online [https://www.papsturkunden.de/EditMOM/home.do]; Aposcripta [https://aposcripta.hypotheses.org]; and BREPOLiS’ Ut per litteras apostolicas Database [https://about.brepolis.net/ut-per-litteras-apostolicas-papal-letters-litpa/]. These projects aim at publishing online ancient collections, but none of those is publishing for now new regesta. On one hand, this shows us the reliability of ancient regesta collections, the remaking of which is not seen as a priority for the advancement of the discipline. But, at the same time, we must not forget that the creation of a new regestum requires relevant amounts of time, incompatible with the timelines of modern research. On the contrary, REVER wants to collect a broad corpus of historical data – namely the already existing regesta and their linked extended text – to train ITSERR’s Latin Language Model (LM) specifically on the summarization of mediaeval pontifical documents and, thus, produce new regesta. Therefore, REVER aims is not creating another database of sources and regesta but rather providing a tool for scholars to build their own database, from time to time, according to their scientific needs. 1.2. Document Scope The objective of Deliverable 1 is to present the work conducted for the definition and preparation of a specific medieval corpus for the design of a tool for automatic text summarisation. This whitepaper contains thus a report of the sources that have been selected, analysed, and pre-processed by the WP to be used for the development of REVER. The process and the results are presented according to the experience developed with the case-study corpus, however, they are also intended to be applicable to other corpora: they are therefore not corpus-specific, but rather software-specific, and can be updated throughout the work of the WP. Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 7 1.3. State of the Art A vast majority of cultural heritage and historical data comes in the form of digitised Document Images. Among those, regesta collections are a valuable source of information for scholars of many different fields of humanities and social sciences (e.g. history, religious studies, linguistic and literary studies, etc.). Indeed, a regesta collection is a catalogue of summaries arranged in chronological order. Each regestum is the summary of a historical document; and in some cases, it is the sole source of information about the full-length document it summarises (henceforth the extended text). The regestum is a summary of the main content of a document, which in the case of Reverse Regesta concerns the acts issued by the Pope of the Catholic Church. The regesta provides an overview of the document, serving both a summarising and cataloguing function, which makes the information contained in the original document more accessible and easier to consult, allowing for the quick retrieval of specific data. While palaeography an indispensable tool for the accurate transcription and evaluation of pontifical regesta, diplomatics is an invaluable resource for the interpretation of official acts exchanged between political entities, sovereigns, and governments. For the Reverse Regesta project, the research field of papal diplomatic which concerns the documents produced by the papal chancery, is of particular importance. Thanks to the work of paleographers, archivists, and librarians, documents of great historical and cultural value can be preserved and made available to the public. The utility of these tools for historical research is evident, particularly in studies concerning the papacy, the Catholic Church, and more generally on religious studies. A regestum is – both visually and textually – a strongly structured summary of a document, created following a consolidated methodology, involving: a) the extraction of information from specific sections of the extended text; and b) the translation and codification of the selected information into a language shared by the community of scholars. Regesta are documents whose layout is as important as the content since the structure helps to correctly correlate the contents. In this sense, regesta are visually rich documents. They are at the same time new collections of sources and organized data related to a vast range of topics, places, and individuals; and indexing tools for scholars to find the historical documents preserved by archives all around the world. This methodology to summarise historical documents has been specifically created and used to collect, index, and summarise vast corpora of mediaeval documents. Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 8 The test case chosen for the development of REVER is the corpus of the pontifical documents and letters issued by the pontiffs and the papal chancery during the late Middle Ages. This corpus guarantees the presence of large collections of regesta and extended texts that were already edited and published in printed versions during the 19th and 20th centuries, such as Jaffé and Potthast’s Regesta Pontificum Romanorum; the collection published by the Bibliothèque des Écoles françaises d'Athènes et de Rome (BEF); the editorial series of the Monumenta Germaniae Historica (MGH). Those collections gathered all the documentation produced and issued by popes and pontifical chanceries – papal letters, bulls, decretals, etc. – from the origins of the Latin Church to the beginning of the 16th Century. Providing detailed records of papal decisions, letters, and administrative actions, they serve as a scholarly resource for the study of the Latin Church and, more broadly, for the history of ancient and mediaeval Europe. These collections of summaries of ancient documents have been compiled by intellectuals and scholars starting from the 19th century until the present, creating a remarkable corpus of historical data. However, only scanned versions of the regesta collections are available, not in machine-readable format. This occurs because this wealth of historical data is preserved in printed texts dating from the 19th and 20th centuries. The with fonts and layouts employed present a significant challenge for processing using traditional Optical Character Recognition (OCR) systems. In particular, regesta are characterised by a multi-column layout (which varies according to the edition in question), difficult-to-read ancient fonts, and an extensive use of abbreviations and acronyms. The printed collections that were analysed and used for the creation of a training corpus for a generative AI specifically designed for summarisation are listed in the following table following the chronological order of the sources they edited (Tab. 1). 1. Ph. Jaffé, Regesta Pontificum Romanorum usque ad annum 1198. Primia ed Lipsiae 1851, secunda correcta et aucta auspiciis G. WATTENBACH, curaverunt S. LOEWENFELD, F. KALTENBRUNNER et P. EWALD, 2 vol. Lipsiae 1885/88 2. A. Potthast, Regesta Pontificum Romanorum, 1198-1304, 2 vol. Berlin, 1873/75 3. P.F. Kehr, Regesta Pontificum Romanorum, Germania Pontificia ed. A. BRACKMANN, 2 vol., Berlin 1911/35 (Italia Pont. 8 Vol. ibidem 1906/35) Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 9 4. K. Rodenberg, Epistolae saeculi XIII e regestis pontificum Romanorum, Monumenta Germaniae Historica, 3 vols., 1883-1894 5. P. Pressutti, Regesta Honorii III, 2 vol., Roma, 1888/95 6. Les Registres de Gregoire IX (1227/41) ed. L. AUVRAY, (BEF), 3 tomi, Paris 1890/1918 7. Les Registres d'Innocent IV (1243/54), ed. E. BERGER (BEF), 4 tomi, Paris 1894 8. Les Registres d'Alexandre IV (1254/61), ed. C. BOUREL, DE LA RONCIERE, J. DE LOYE, et A. COULON (BEF), 6 fasc., n. t., Paris 9. Les Registres d'Urbain IV (1261/64), ed. M. J. GUIRAUD (BEF), 12 fasc. sed absque indice, Paris 10. Les Registres de Clement IV (1265/68), ed. M. E. JORDAN (BEF), 6 fasc., n. t. Paris 11. Les Registres de Gregoire X et de Jean XXI (1271/77), ed. M. GUIRAUD et L. CADIER (BEF), 4 fasc. n. t. Paris 12. Les Registres de Nicolas III (1277/80), ed. M. J. GAY (BEF), 5 fasc. Paris, 1938 13. Les Registres de Martin IV (1281/85), ed. M. OLLIVIER-MARTIN (BEF), 3. fasc., Paris 1901/13 14. Les Registres de Honorius IV (1285/87), ed. M. PROU (BEF), 1 tome, Paris, 18 15. Les Registres de Nicolas IV (1288/92), ed. M.E. LANGLOIS (BEF), 9 fasc., Paris 16. Les Registres de Boniface VIII (1294-1303), ed. G. DIGARD, et alii (BEF), 17 fasc., Paris, 1939 17. Les Registres de Benoit XI (1303/04), ed. M. GRANDJEAN, 5 fasc. (BEF) Paris 1905 18. Regestum Clementis PP. V. (1305/14), ed. cura et studio monachorum O.S.B., 9 vol. 1 suppl., sed absque indice, Romae 1885 sq. (Table chronologique et Table des Incipit, ed. FAWTIER/LANHERS (BEF), Paris 1950 19. Lettres secretes et curiales du Pape Jean XXII (1316/34) relatives a la France, ed. M.A. COULON (BEF), n. t. 5 fasc., Pari 20. Lettres communes du Pape Jean XXII, ed. M.G. MOLLAT, 30 fasc. Paris 1905/47 (BEF) 21. Register des Gegenpapstes Nikolaus V (1328/30), ed. EUBEL in Arch. Zschr. 1893, pp. 123/212 Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 16 Figure 4:The first model of data collection on papal regesta Therefore, in a second phase the following editions has been then identified: a) the Berger’s edition of 1897, consisting in 4 volumes; b) the Haluscynskyj edition of 1962, 1 volume; c) the regesta contained in the Monumenta Germaniae Historica, of 1883-1894, from which we select the 3 volumes of the Epistolae saeculi XIII e regestis pontificum romanorum; d) the Auvray edition of 1890-1955, consisting in 4 volumes; and, finally, e) the 2 volumes of regesta edited by Potthast (1874-1895), (fig.6). Rather than adhering strictly to a chronological criterion, as initially planned, we chose thus to focus on the regesta related to the pontificates of Innocent IV and Gregory IX. Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 17 Figure 5: The second model of data collection on papal regesta The second model of data collection on papal regesta. The refined model aims to facilitate the creation of a dataset that can be easily usable in the computer processing phases of the project. We have selected collections that include both the regesta and their corresponding extended texts. In this new workflow, the first phase will involve the elaboration of machine-readable text extracted from the Monumenta Germaniae Historica (MGH). In a third phase we will focus on the Auvray edition, paying particular attention to the quality of the printed edition and on the training of a Handwritten Text Recognition (HTR) system calibrated for their specific type of layout. It will then follow the texts preparation of the editions of Berger and Haluscynskyj as a basis to ensure that the regesta are accurately and consistently represented, thereby facilitating the subsequent integration of data into the project workflows. Finally, the fourth phase will involve the Potthast regesta, which will be employed as the testing tool for the workflows developed in the previous two phases and – being the most comprehensive collection – it will serve as verification tool. Potthast will be thus used as an encyclopaedia of all existing medieval sources which need to be taken into account. Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 18 Adherence to this workflow will thus be possible to obtain approximately pairs of 1,500 regesta with the corresponding extended texts from the three volumes of the MGH; 112 regesta with the corresponding extended texts from the Haluscynskyj edition; 8,350 regesta and the same number of extended texts from the Berger edition; 6,180 regesta with their corresponding extended texts from the Auvray edition; while from the Potthast edition, it will be possible to obtain 7,500 regesta without the extended texts of the Papal documents (Fig. 5). In this way, it will be possible to provide the computer scientists engaged in the machine learning process with an approximate total of 23,000 regesta, accompanied by the corresponding to 23,000 extended texts. If needed, the tested procedure will be then applied to all the others existing collections of pontifical documents listed in Table 1. Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 19 3. Analysis of OCR and HTR existing tools 3.1. What is an Optical Character Recognition system An Optical Character Recognition (OCR) system is a technology designed to recognize printed characters and convert them into a digital format. This system enables the transformation of text from physical or digital documents into machine-readable text, which can then be processed, searched, and modified. In essence, the term "OCR" encompasses all tools that facilitate the conversion of digitized objects into electronic text (see fig. 6) or, more broadly, into a format that can be processed by a computer (i.e. .txt, .doc, .pdf, .xml formats). Paper book Digitised image Open text Scanner OCR Figure 6: The transformation through an OCR System Nevertheless, OCR encounters some challenges with handwritten texts, imperfect paper prints, certain types of layouts, ancient languages, and less common characters. Ink stains left by typographic printing are often mistaken for symbols and interpreted as punctuation marks or numbers. Blurry digits are sometimes confused with others, such as “2” and “9”, or “1” and “7”. The letter “e” is often mistaken for “c”. The ancient long form of the letter “s” is frequently interpreted as “f” (fig. 8). Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 20 Faded letters may not be recognized or are transcribed with incorrect or out-of-context symbols. Specialized software is required to address these challenges and streamline the workflow for processing large volumes of documents and their corresponding regesta. The presence of special characters—such as diphthongs, word abbreviations, ink degradation over time, and blurred backgrounds—further complicates the recognition process. Additionally, the use of Latin in regesta and papal documents increases the difficulty of optical recognition. For alphabetic systems such as Greek, Arabic, Hebrew, Coptic, or Church Slavonic, OCR models are still under development. Further challenges arise from the orientation of writing, whether left to right, right to left, or vertical. 3.2. What is an Handwritten Text Recognition Systems There are two primary types of automatic text recognition: OCR, which focuses on printed characters, and HTR (Handwritten Text Recognition), which deals with handwritten text. OCR is a standardised technology that is capable of recognizing text without the necessity of prior training, as it already contains predefined models of the letters it is intended to identify. This technology is best suited for printed texts but less effective when used with manuscripts or ancient prints, for which HTR is a more appropriate choice. Unlike OCR, HTR does not rely on predefined letter shapes; instead, it accommodates the variability inherent in different handwriting styles. Consequently, HTR uses neural networks that are trained with sample data, learning to recognize letters and words specific to a particular handwriting style. In most cases, HTR requires training, given the complexity of the task it addresses. st œ & æ Figure 7: Typographical critical elements Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 21 3.3. Basic OCR-HTR glossary ● Area: in the context of an OCR system, an area is a defined portion of a document that contains text or other visual elements to be recognized. It can be a bordered area that contains a column of text, a paragraph, a block of images, a table, or any other distinctive component of the document layout. The area is important for facilitating the recognition of text or the classification of elements of interest, thereby improving the accuracy of the OCR process. ● Region: a region is a specific area of a digital image containing text that needs to be recognized and processed. Regions can be defined based on the structure of the document and often include blocks of text, headings, paragraphs, tables, or other visual elements. Dividing the content into regions helps the OCR system correctly identify where the different parts of the textual content are located and handle them separately for more accurate recognition. ● Segmentation: segmentation is the process of dividing a digital image containing text into smaller, recognizable units, such as blocks of text, lines, and individual characters. This step enables the correct identification of the various components in the document and allows the OCR system to process and recognize the text accurately. Segmentation can involve lines or regions: region-level segmentation separates blocks of text, images, tables, or other layout elements; line-level segmentation divides the text into lines ● Binarization: binarization is the process of converting a grayscale (or colour) image into a binary image, where each pixel is represented by one of two values: typically 0 or 1, black or white. This process simplifies the image by emphasising the contrast between the text and the background, making it easier for algorithms to identify and extract the text. By reducing the image to two colours, binarization helps improve the accuracy of text recognition and other image processing tasks. ● Recognition: recognition refers to the process of identifying and interpreting characters, words, and symbols from images. This process transforms these images into machine-readable text, enabling applications such as document digitization, data entry automation, and text search capabilities. ● Noise: noise is a set of unwanted signs and consists of random imperfections in color or brightness of the digitized images (fig. 9). Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 22 Figure 8: Examples of noise Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 23 4. Common Elements of OCR and HTR Systems Different kinds of OCR-HTR systems for the recognition of pre-modern handwritten texts present some common steps. This offers a considerable advantage because the training of new domain experts can rely on common concepts that remain identical regardless of the system in use: areas, regions, lines, segmentation, recognition, binarization. 4.1. Core Phases of OCR/HTR Systems A. Pre-processing ● Input preparation: the page must be converted into a format compatible with the OCR-HTR system ● Page noise removal: image cleaning also includes optimization and binarization, the process that translates the various colour tones of the image into a distinct black and white one. B. Segmentation ● Region segmentation, i.e., parts of the page to be transcribed ● Line segmentation, i.e., recognizing the lines in which the text is organised C. Recognition ● Text recognition: i.e., transcription of symbols into digital text ● Output in various formats The outputs must subsequently be examined by a domain expert, who evaluates the accuracy and reliability of the transcription. This verification step is essential for identifying potential errors or systematic weaknesses in the processing pipeline. Depending on the findings, the scholar may decide to adjust system parameters or refine the training corpus employed during the pre-processing, segmentation, and textrecognition stages. Such iterative revision enables the continuous optimisation of the workflow and the progressive improvement of transcription quality. 4.2. Operational Phases of OCR/HTR Software As mentioned earlier, text recognition in OCR/HTR operates on two main levels: segmentation and character recognition. OCR/HTR segmentation divides an image containing text into separate structural units. There are two main types of Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 24 segmentation: by regions and by lines. Region segmentation refers to distinct parts of the text, such as paragraphs, columns, notes, and glosses. Line segmentation identifies text lines, which, in manuscripts and ancient prints, often appear fragmented, exhibit discontinuous colour, or are altered by handwriting irregularities or printing defects. For pre-modern texts with significant noise, such as background defects, text recognition is preceded by an image optimization phase to improve character readability and make text regions and lines more evident. In some OCR/HTR systems, binarization - the process that converts a colour or grayscale image into a black-andwhite one - is applied. This step, combined with noise removal, is essential for accurate recognition (fig 10). Initially, the software identifies regions, meaning the layout structure and text orientation, before moving on to recognizing text lines. Figure 9: The three phases of OCR-HTR system Handwritten Text Recognition (HTR) Preprocessing Segmentation Recognition Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 25 Text layout can create interpretation challenges, especially when it deviates from the common arrangement of one or two columns. Even if the algorithm can recognize individual characters, it may have difficulty with the overall structure. Text recognition involves multiple processes, addressing both the structure of the text and the characters themselves. In some cases, words and letters may be correctly recognized but placed in the wrong position. Alternatively, meaningless or grammatically incorrect words might be generated, but placed in the correct position. It's important to emphasize that both, layout and character recognition systems, are fundamental for the effective functioning of an OCR/HTR system. Regions and lines segmentation is a key operation that helps overcome many challenges in interpreting the text. Specific OCR/HTR software includes a segmentation adjustment system that allows domain experts to reorder line sequences, correct broken lines, and interpret complex layouts that would otherwise hinder text recognition. After noise removal and region and line segmentation, the digital image is ready to be processed by text recognition models. 4.3. Manual and Automatic Workflow It is first necessary to ensure that the text image to be recognised has been prepared correctly. OCR/HTR systems are not compatible with all formats, making it essential to understand the required characteristics for accurate document digitization. Generally, most software can process images in common formats such as .jpg, however input format compatibility represent a critical consideration. OCR systems convert image files—such as those in .jpeg, .png, .bmp, or .tiff formats—into text-based formats like .txt, .doc, .pdf, or .xml (see figs. 6 and 7). Equally important is knowledge of output formats, as they influence the possibilities for subsequent text processing and AI training. In general, the steps involved in text recognition processes are consistent across systems. The process begins with page preparation, which includes converting the document into a compatible format and, often, removing digital noise. Noise consists of unwanted artifacts, such as random imperfections in color or brightness. It may result from image acquisition errors, mechanical imperfections in printing processes, ink smudges, or electronic noise introduced during scanning. Once the image is optimised, the next step is segmentation, which divides the text image into regions and lines to facilitate recognition. Advanced recognition software often allows users to interact with both text region and line segmentation. Here, human Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 32 6. Results The existing OCR and HTR systems have therefore features that make them suitable for processing different text types, depending also on the specific needs of each research group. A preliminary analysis is therefore necessary for the start of any collection of historical data from printed texts. Ultimately, REVER has chosen to use a local instance of EScriptorium, thanks to the collaboration with the CNR and the creators of the Software. The pre-processing of the text corpus outlined so far has enabled the creation of a large text corpus, which is fundamental for the design and training of the REVER tool. The workflow and standards that have been established will also permit the enlargement of the corpus of texts and thus strengthen the training and testing activities. The case of the regesta collections, as seen, presented several challenges, especially with regard to the transformation of digitised documents from images to plain text. Indeed, these printed editions are characterised by a complex layout (often multicolumn), the presence of ancient characters (with complex bindings) and the use of numerous acronyms. At the same time, these characteristics are peculiar to this type of text, which thanks to its layout and the use of abbreviations and technical language is quick and easy to consult. Characteristics and challenges that closely resemble those encountered in the digitisation of manuscripts and early printed works. For this reason, dedicated HTR (Handwritten Text Recognition) software solutions were employed to address these complexities effectively. Moreover, the work realised for the corpus preparation can also be adopted by those who would like to prepare different texts to use our REVER tool. In light of the considerations outlined above, it was decided to proceed by testing various existing and freely accessible tools, examining the advantages and limitations of each tool, in order to provide valid guidelines for processing corpora with different characteristics, both in terms of layout and content. Ir0000014 – Itserr Status: FINAL ITSERR – WP7 – DELIVERABLE 1 Version: 01.00 33 7. Acronyms Term Definition AI Artificial Intelligence HTR Handwritten Text Recognition IB ITSERR Board ITSERR Italian Strengthening of the ESFRI RI RESILIENCE LM Language Model ML Machine Learning MUR Ministero dell’Università e della Ricerca OU Organisational Unit OCR Optical Character Recognition KPI Key Performance Indicator PI Principal Investigator PLA Performance Level Agreement