Dataset Viewer
Auto-converted to Parquet Duplicate
document_id
stringlengths
9
9
page_number
stringlengths
9
9
image
imagewidth (px)
600
600
text
stringlengths
0
4.54k
alto_xml
stringlengths
595
126k
has_image
bool
1 class
has_alto
bool
1 class
markdown
stringlengths
0
15k
inference_info
stringclasses
1 value
204486115
204788144
ENVIRONMENTAL PROTECTION Air Pollutants: UK Emissions of Selected Gases from All Sources Million tonnes Source: National Environmental Technology Centre regulations for emissions such as carbon dioxide, hydrocarbons, oxides of nitrogen and particulate matter. Three EC Directives agreed during the UK Presidency, and whi...
<?xml version="1.0" encoding="UTF-8"?> <alto xmlns="http://www.loc.gov/standards/alto/v3/alto.xsd"><Description><MeasurementUnit>pixel</MeasurementUnit><sourceImageInformation><fileName>./data/pdfs/204486115.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ...
true
true
Air Pollutants: UK Emissions of Selected Gases from All Sources regulations for emissions such as carbon dioxide, hydrocarbons, oxides of nitrogen and particulate matter. Three EC Directives agreed during the UK Presidency, and which will come into force from January 2000, will further improve emissions from pas...
[{"model_id": "rednote-hilab/dots.ocr", "column_name": "markdown", "timestamp": "2025-10-22T14:39:36.562428", "prompt_mode": "ocr"}]
204486117
204805723
26: SCIENCE, ENGINEERING AND TECHNOLOGY Activities such as these are important in assuring continued interest in SET among young people making educational and career choices. They also help to enhance the public’s ability to relate to scientific issues in general and to make informed judgments about scientific developm...
<?xml version="1.0" encoding="UTF-8"?> <alto xmlns="http://www.loc.gov/standards/alto/v3/alto.xsd"><Description><MeasurementUnit>pixel</MeasurementUnit><sourceImageInformation><fileName>./data/pdfs/204486117.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ...
true
true
Activities such as these are important in assuring continued interest in SET among young people making educational and career choices. They also help to enhance the public's ability to relate to scientific issues in general and to make informed judgments about scientific developments. The Government is increasing its u...
[{"model_id": "rednote-hilab/dots.ocr", "column_name": "markdown", "timestamp": "2025-10-22T14:39:36.562428", "prompt_mode": "ocr"}]
189742219
189881032
"Peterhead ■\nChapelcross\n▲ Dinorwig \\\nA Ffestiniog\n• Trawsfynydd\nRatcliffe-on-Soar\nRhei(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
Electricity
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
204486089
204586555
"8\nBRITAIN: AN OFFICIAL HANDBOOK\nBritain, as in all countries before the development of medical sc(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"Britain, as in all countries before the development of medical science, by high death rates and, in(...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
204486116
204791459
"Abbeys and Priories: p. 1, English Heritage Photo Library; p. 2, Crown Copyright, Historic\nScotlan(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"**Abbeys and Priories:** p. 1, English Heritage Photo Library; p. 2, Crown Copyright, Historic Scot(...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
189742213
189840602
"6\nSocial Welfare\nThe British social welfare system comprises the National Health Service, the\npe(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"# 6 Social Welfare\n\nThe British social welfare system comprises the National Health Service, the (...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
204486104
204702331
"Acknowledgment is made for photographs to: General Council\nof British Shipping for National Sea Tr(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"Acknowledgment is made for photographs to: General Council\nof British Shipbuilding for National Se(...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
204486092
204614323
"242\nBRITAIN: AN OFFICIAL HANDBOOK\nSociety of Film and\nTelevision Arts\nAssistance to\nBritish Fi(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"Society of Film and\nTelevision Arts\n\nThe National Film Theatre, on the south bank of the Thames,(...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
204486095
205332263
"INDUSTRY\n261\nThe British Standards Institution (BSI) is a voluntary non-profit-making\nbody incor(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"The British Standards Institution (BSI) is a voluntary non-profit-making body incorporated by Royal(...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
204486111
204752329
"BRITAIN 1995: AN OFFICIAL HANDBOOK\nsignificant contribution to the economy,\ndirectly providing ov(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<alto xmlns=\"http://www.loc.gov/standards/alto/v3/alto(...TRUNCATED)
true
true
"significant contribution to the economy,\ndirectly providing over 180,000 jobs. In 1993,\n10.9 mill(...TRUNCATED)
"[{\"model_id\": \"rednote-hilab/dots.ocr\", \"column_name\": \"markdown\", \"timestamp\": \"2025-10(...TRUNCATED)
End of preview. Expand in Data Studio

Document OCR using dots.ocr

This dataset contains OCR results from images in NationalLibraryOfScotland/Britain-and-UK-Handbooks-Dataset using DoTS.ocr, a compact 1.7B multilingual model.

Processing Details

Configuration

  • Image Column: image
  • Output Column: markdown
  • Dataset Split: train
  • Batch Size: 256
  • Prompt Mode: ocr
  • Max Model Length: 8,192 tokens
  • Max Output Tokens: 8,192
  • GPU Memory Utilization: 80.0%

Model Information

DoTS.ocr is a compact multilingual document parsing model that excels at:

  • 🌍 100+ Languages - Multilingual document support
  • 📊 Table extraction - Structured data recognition
  • 📐 Formulas - Mathematical notation preservation
  • 📝 Layout-aware - Reading order and structure preservation
  • 🎯 Compact - Only 1.7B parameters

Dataset Structure

The dataset contains all original columns plus:

  • markdown: The extracted text in markdown format
  • inference_info: JSON list tracking all OCR models applied to this dataset

Usage

from datasets import load_dataset
import json

# Load the dataset
dataset = load_dataset("{output_dataset_id}", split="train")

# Access the markdown text
for example in dataset:
    print(example["markdown"])
    break

# View all OCR models applied to this dataset
inference_info = json.loads(dataset[0]["inference_info"])
for info in inference_info:
    print(f"Column: {info['column_name']} - Model: {info['model_id']}")

Reproduction

This dataset was generated using the uv-scripts/ocr DoTS OCR script:

uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/dots-ocr.py \
    NationalLibraryOfScotland/Britain-and-UK-Handbooks-Dataset \
    <output-dataset> \
    --image-column image \
    --batch-size 256 \
    --prompt-mode ocr \
    --max-model-len 8192 \
    --max-tokens 8192 \
    --gpu-memory-utilization 0.8

Generated with 🤖 UV Scripts

Downloads last month
10