Datasets:
document_id stringclasses 42
values | page_number stringlengths 9 9 | image imagewidth (px) 600 600 | text stringlengths 0 13.4k | alto_xml stringlengths 595 311k | has_image bool 1
class | has_alto bool 1
class |
|---|---|---|---|---|---|---|
204486095 | 205328545 | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | ||
204486095 | 205328558 | SOME BRITISH FASHIONS
Gir.H. | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328571 | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | ||
204486095 | 205328584 | c
1
* | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328597 | BRITAIN
AN OFFICIAL HANDBOOK | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328610 | I | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328623 | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | ||
204486095 | 205328636 | ‘Piping aboard’ ceremony on H.M.S. Lion | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328649 | BRITAIN
AN OFFICIAL HANDBOOK
PREPARED BY
THE CENTRAL OFFICE OF INFORMATION, LONDON
1 967 EDITION
London: Her Majesty’s Stationery Office: 1967 | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328662 | © Crown copyright 19^7
Printed and published by
HER MAJESTY’S STATIONERY OFFICE
To be purchased from
49 High Holborn, London w.c.i
423 Oxford Street, London w.i
13A Castle Street, Edinburgh 2
109 St. Mary Street, Cardiff
Brazennose Street, Manchester 2
50 Fairfax Street, Bristol 1
35 Smallbrook, Ringway, Birmingham 5
8... | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328675 | Contents
Page
INTRODUCTION
ix
1. THE LAND AND THE PEOPLE
i
The Physical Background
!
The Demographic Background
6
2. GOVERNMENT
25
General Survey
2 s
The Monarchy
26
Parliament
o Q
The Privy Council
Her Majesty’s Government
^2
Government Departments
46
The Civil Service
62
Local Government
68
The Fire Service
3. LAW AN... | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328688 | ii. INDUSTRY
Organisation and Production
Fuel and Power
Water Supply
Construction
Manufacturing Industries
Page
246
246
263
279
282
285
12. AGRICULTURE, FISHERIES AND FORESTRY
Agriculture
Fisheries
Forestry
3
11
33°
333
[3. TRANSPORT AND COMMUNICATIONS
Shipping
Inland Transport
Civil Aviation
The Post Office
337
337
34... | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328701 | DIAGRAMS
Birth Rates and Death Rates in the United Kingdom
Expectation of Life at Birth in England and Wales
The Royal Family: Genealogical Tree
Organisation of the National Health Service
Changes in National Expenditure 1956 to 1965
Public and Private Fixed Investment 1956 and 1965
Personal Income and Expenditure, 196... | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true | |
204486095 | 205328714 | Agriculture
Newspaper Production
Transport
Industrial Safety
Montreal Exhibition
Northern Ireland
Sport
facing page
247
358
betzveen pages 358 and 359
359
454
between pages 454 and 455
455
Acknowledgment is made for end-papers design to Miss Doreen Roberts and for photographs to Walter
Frentz for Carbisdale Castle (fac... | <?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/204486095.pdf</fileName></sourceImageInformation><OCRProcessing ID="IdOcr"><ocrProcessingStep><processingDateTime>Wed Nov ... | true | true |
Britain and UK Handbooks Dataset
Dataset Description
This dataset contains digitised Britain and UK Handbooks from the National Library of Scotland's digital collections. These annual reference books were originally published by the British Information Service (starting in 1946) to provide overseas readers with comprehensive information about the United Kingdom.
Dataset Summary
- Source: National Library of Scotland - Britain and UK Handbooks
- Time Period: 1954-2005
- Format: Image-text pairs with OCR output
- Processing: Converted from ALTO XML and JPG images to Hugging Face dataset format
- Contents: Official annual reference books covering UK government policy, economy, social welfare, defence, religion, science, and arts
- Size: 27,915 pages, 13.9 million words
Dataset Structure
Data Fields
Each record in the dataset contains the following fields:
document_id(string): Unique identifier for the handbook documentpage_number(string): Page number within the documentimage(image): Scanned image of the handbook pagetext(string): OCR-extracted text from the pagealto_xml(string): Raw ALTO XML containing detailed OCR informationhas_image(bool): Whether the page has an associated image filehas_alto(bool): Whether the page has associated ALTO OCR data
Usage
Loading the Dataset
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("davanstrien/nls-handbooks-test")
# Access the data
for example in dataset['train']:
print(f"Document: {example['document_id']}")
print(f"Page: {example['page_number']}")
print(f"Text preview: {example['text'][:200]}...")
break
Filtering for Complete Records
# Filter for pages with both images and OCR text
complete_pages = dataset.filter(lambda x: x['has_image'] and x['has_alto'])
print(f"Complete pages: {len(complete_pages)}")
Dataset Creation
Source Data
The original data comes from the National Library of Scotland's digitisation of Britain and UK Handbooks - annual reference publications that provided factual overviews of the UK, including government policy, national economy, social welfare, defence, religion, science, and arts.
Processing Pipeline
- Original Format: High-resolution JPG scans and ALTO XML files with OCR output
- Conversion Process: Using the
convert_to_hf_dataset.pyscript to pair images with corresponding ALTO XML and extract plain text while preserving metadata
Considerations for Using this Data
Historical Context
These handbooks represent official UK government information from 1954 to 2005 and should be understood within their historical and political context.
OCR Quality
Text extraction quality varies based on original document condition and print quality.
Additional Information
Licensing
- Items up to 1968: Public domain
- Items from 1969 onwards: Open Government License v.3.0
Please refer to the National Library of Scotland's terms of use for complete licensing information.
Citation
@misc{nls_uk_handbooks,
title={Britain and UK Handbooks},
author={National Library of Scotland},
howpublished={\url{https://data.nls.uk/data/digitised-collections/britain-uk-handbooks/}},
}
@misc{uk_handbooks_hf,
title={Britain and UK Handbooks - Hugging Face Dataset},
author={van Strien, Daniel},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/datasets/davanstrien/nls-handbooks-test}},
}
Acknowledgments
Thanks to the National Library of Scotland for digitising and making these historical reference materials available for research.
- Downloads last month
- 54