davanstrien's picture
davanstrien HF Staff
Update README.md
16464ff verified
metadata
dataset_info:
  features:
    - name: document_id
      dtype: string
    - name: page_number
      dtype: int32
    - name: file_identifier
      dtype: string
    - name: image
      dtype: image
    - name: text
      dtype: string
    - name: alto_xml
      dtype: string
    - name: has_image
      dtype: bool
    - name: has_alto
      dtype: bool
    - name: document_metadata
      dtype: string
    - name: has_metadata
      dtype: bool
    - name: topic
      dtype: string
    - name: year
      dtype: string
    - name: reference
      dtype: string
    - name: disease_focus
      dtype: string
  splits:
    - name: train
      num_bytes: 17768943623.127
      num_examples: 120903
  download_size: 12407753714
  dataset_size: 17768943623.127
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
language:
  - en
tags:
  - ocr
pretty_name: A Medical History of British India
license: cc0-1.0

A Medical History of British India Dataset

Dataset Description

This dataset contains digitized official publications documenting medical research and public health in British India from 1850-1950. The collection represents a crucial period in medical history, capturing the transition from humoral to biochemical medical traditions and documenting major breakthroughs in bacteriology, parasitology, and vaccine development. These documents provide invaluable insights into colonial medical surveillance systems and the evolution of public health policies in British India.

Dataset Summary

Dataset Structure

Data Fields

Each record in the dataset contains the following fields:

  • document_id (string): Unique identifier for the medical document
  • page_number (int): Sequential page number within the document
  • file_identifier (string): Original file identifier from the NLS dataset
  • image (image): Scanned image of the document page
  • text (string): OCR-extracted text from the page
  • alto_xml (string): Raw ALTO XML containing detailed OCR information
  • has_image (bool): Whether the page has an associated image file
  • has_alto (bool): Whether the page has associated ALTO OCR data
  • document_metadata (string): Full metadata description from inventory
  • has_metadata (bool): Whether metadata is available for this document
  • topic (string): Medical topic or subject of the document
  • year (string): Year of publication (extracted from metadata)
  • reference (string): Document reference code (e.g., "IP/HA.2")
  • disease_focus (string): Primary disease discussed (if applicable)

Disease Categories

The dataset includes documents focusing on various diseases prevalent in British India:

  • Cholera
  • Leprosy
  • Plague
  • Malaria
  • Beri-beri
  • Kala-azar (Kála-Azár)
  • Hookworm
  • Smallpox
  • Fever (various types)

Data Statistics

  • Total documents: 468 unique medical reports and publications
  • Page distribution: ~97% of pages have both images and OCR text
  • Geographic coverage: Multiple regions across British India
  • Notable medical figures: Documents work of Sir Ronald Ross and other prominent researchers

Usage

Loading the Dataset

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("davanstrien/india-medical-history")

# Access the data
for example in dataset['train']:
    print(f"Document: {example['document_id']}")
    print(f"Topic: {example['topic']}")
    print(f"Year: {example['year']}")
    print(f"Disease focus: {example['disease_focus']}")
    print(f"Text preview: {example['text'][:200]}...")
    break

Filtering by Disease Type

# Filter documents about cholera
cholera_docs = dataset.filter(lambda x: x['disease_focus'] == 'Cholera')
print(f"Cholera-related pages: {len(cholera_docs)}")

# Filter documents from a specific time period
docs_1880s = dataset.filter(lambda x: x['year'] and '188' in x['year'])
print(f"Documents from 1880s: {len(docs_1880s)}")

Working with Medical Topics

# Group documents by disease focus
from collections import defaultdict

disease_groups = defaultdict(list)
for example in dataset['train']:
    if example['disease_focus']:
        disease_groups[example['disease_focus']].append(example['document_id'])

# Display disease distribution
for disease, docs in disease_groups.items():
    unique_docs = len(set(docs))
    print(f"{disease}: {unique_docs} documents")

Extracting Geographic Information

# Search for location-specific medical reports
def extract_locations(text):
    # Common location patterns in colonial documents
    locations = ['Bengal', 'Bombay', 'Madras', 'Punjab', 'Assam', 'Burma']
    found = []
    for loc in locations:
        if loc.lower() in text.lower():
            found.append(loc)
    return found

# Find documents mentioning specific regions
for example in dataset['train'][:100]:
    if example['text']:
        locations = extract_locations(example['text'])
        if locations:
            print(f"Document {example['document_id']}: {', '.join(locations)}")

Dataset Creation

Source Data

The original data comes from the National Library of Scotland's comprehensive digitization project of official medical publications from British India. These documents include:

  • Annual medical reports from various provinces
  • Special investigations into disease outbreaks
  • Statistical compilations of mortality and morbidity
  • Research papers on tropical diseases
  • Maps showing disease distribution

Historical Significance

This collection documents:

  • The transition from traditional humoral medicine to modern biochemical approaches
  • Development of colonial medical surveillance systems
  • Breakthroughs in understanding tropical diseases
  • Early epidemiological studies and disease mapping
  • The work of pioneering medical researchers in British India

Processing Pipeline

  1. Original Format: The source data consists of:

    • High-resolution JPG scans of medical documents
    • ALTO XML files containing OCR output with cleaned-up text
    • METS metadata files with page ordering information
    • Inventory CSV with detailed document metadata
  2. Conversion Process: Using the custom convert_india_papers.py script:

    • Parsed METS XML files to maintain correct page ordering
    • Extracted medical metadata including disease focus, year, and topic
    • Paired image files with their corresponding ALTO XML
    • Preserved all structural and descriptive metadata
    • Added specialized fields for medical history research

Considerations for Using this Data

Historical and Cultural Context

These documents represent colonial-era medical perspectives and should be understood within their historical context:

  • Terminology reflects period-specific medical understanding
  • Documents may contain colonial-era biases and perspectives
  • Geographic names and administrative divisions are from the British colonial period
  • Medical theories and treatments described may be outdated

OCR Quality

The OCR quality is generally high due to NLS's cleaning efforts, but varies based on:

  • Original document preservation state
  • Complexity of medical terminology
  • Presence of statistical tables and charts
  • Mixed languages (English with local terms)

Research Applications

This dataset is particularly valuable for:

  • Medical History Research: Studying the evolution of tropical medicine and public health
  • Digital Humanities: Analyzing colonial medical discourse and knowledge production
  • Epidemiological Studies: Understanding historical disease patterns and outbreaks
  • OCR Development: Training models on historical medical texts
  • Colonial Studies: Examining medical aspects of colonial administration
  • Public Health History: Tracing the development of health surveillance systems

Additional Information

Licensing

This dataset is in the public domain and free of known copyright restrictions. Users should comply with the National Library of Scotland's terms of use when utilizing this dataset.

Citation

If you use this dataset, please cite both the original source and this Hugging Face dataset:

@misc{nls_india_medical,
  title={A Medical History of British India},
  author={National Library of Scotland},
  year={2019},
  publisher={National Library of Scotland},
  doi={10.34812/2w0t-3f08},
  howpublished={\url{https://data.nls.uk/data/digitised-collections/a-medical-history-of-british-india/}},
}

Acknowledgments

Dataset conversion for Hugging Face format done by davanstrien