pyonb: an open-source API and optical character recognition SDK for automated document-to-text conversion of clinical records

Optical character recognition (OCR) software is becoming increasingly prevalent with the expanding computational power and advancements in natural language processing, which enables reuse of previously untapped data due to the lack of tools for converting images into computer-readable text. Broadly, OCR is the analysis, recognition and extraction of text from documents. There are numerous open-source OCR software toolkits (Tesseract, Docling, olmOCR, PaddleOCR, Marker, Sparrow, MinerU, etc.) providing automatic conversion of images or filetypes such as PDF and DOCX into structured outputs. Data storage is significantly heterogenous across and within UK hospitals. Medical data is often stored within data warehouses containing hundreds of millions of documents. This volume of data combined with the difficulty of information extraction from scanned documents represents a significant data processing challenge. From a research and innovation perspective, automatic text extraction of hospital documents enables innumerable possibilities such as improving diagnostics, clinical workflows and administrative processes. For example, AI methods can be applied to decades of untapped historical records to create prognostic models that cannot be developed in any other way. Here, we present pyonb (https://github.com/SAFEHR-data/pyonb), an open-source Python SDK for automated document-to-text conversion, designed for clinical processing (although it is content-agnostic so useable for any text extraction task). pyonb bundles multiple open-source OCR tools (including Marker, Sparrow, PaddleOCR, and more) with a central forwarding API for requesting which OCR tool to execute. pyonb is designed as a suite of containerised services which can be deployed on a server to retrieve documents from a data warehouse for automated OCR and text extraction. In this work we describe: the user requirements which motivated our design decisions the software architecture how developers can deploy the software and extend it to integrate their preferred OCR tool the performance and processing speeds of a subset of OCR toolsAcknowledgements This study was funded by the National Institute for Health and Care Research (NIHR, award code NIHR302495) and University College London Hospitals Biomedical Research Centre. The views expressed are those of the author(s) and not necessarily those of the NIHR or the Department of Health and Social Care.

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-12-17
DOI
https://doi.org/10.5281/zenodo.17967464
Primary Topic
Handwritten Text Recognition Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

pyonb: an open-source API and optical character recognition SDK for automated document-to-text conversion of clinical records

Zenodo (CERN European Organization for Nuclear Research)
Handwritten Text Recognition Techniques
article

pyonb: an open-source API and optical character recognition SDK for automated document-to-text conversion of clinical records

article en

Abstract

Optical character recognition (OCR) software is becoming increasingly prevalent with the expanding computational power and advancements in natural language processing, which enables reuse of previously untapped data due to the lack of tools for converting images into computer-readable text. Broadly, OCR is the analysis, recognition and extraction of text from documents. There are numerous open-source OCR software toolkits (Tesseract, Docling, olmOCR, PaddleOCR, Marker, Sparrow, MinerU, etc.) providing automatic conversion of images or filetypes such as PDF and DOCX into structured outputs. Data storage is significantly heterogenous across and within UK hospitals. Medical data is often stored within data warehouses containing hundreds of millions of documents. This volume of data combined with the difficulty of information extraction from scanned documents represents a significant data processing challenge. From a research and innovation perspective, automatic text extraction of hospital documents enables innumerable possibilities such as improving diagnostics, clinical workflows and administrative processes. For example, AI methods can be applied to decades of untapped historical records to create prognostic models that cannot be developed in any other way. Here, we present pyonb (https://github.com/SAFEHR-data/pyonb), an open-source Python SDK for automated document-to-text conversion, designed for clinical processing (although it is content-agnostic so useable for any text extraction task). pyonb bundles multiple open-source OCR tools (including Marker, Sparrow, PaddleOCR, and more) with a central forwarding API for requesting which OCR tool to execute. pyonb is designed as a suite of containerised services which can be deployed on a server to retrieve documents from a data warehouse for automated OCR and text extraction. In this work we describe: the user requirements which motivated our design decisions the software architecture how developers can deploy the software and extend it to integrate their preferred OCR tool the performance and processing speeds of a subset of OCR toolsAcknowledgements This study was funded by the National Institute for Health and Care Research (NIHR, award code NIHR302495) and University College London Hospitals Biomedical Research Centre. The views expressed are those of the author(s) and not necessarily those of the NIHR or the Department of Health and Social Care.

Zenodo (CERN European Organization for Nuclear Research)
Weatherford College (US)
Industry, innovation and infrastructure
Openalex Percentile: Top 37%
Handwritten Text Recognition Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.