davanstrien's picture
davanstrien HF Staff
Update main to match v2.0-text-and-images
85bd549 verified
metadata
license: other
task_categories:
  - image-to-text
  - image-text-to-text
tags:
  - metadata-extraction
  - glam
  - MARC21
  - library-science
size_categories:
  - 1K<n<10K
language:
  - en
  - de
  - it
  - fr
  - es
pretty_name: DOAB Open Access Books Metadata Extraction Dataset
dataset_info:
  features:
    - name: record_id
      dtype: string
    - name: title
      dtype: string
    - name: subtitle
      dtype: string
    - name: statement_of_responsibility
      dtype: 'null'
    - name: authors
      dtype: 'null'
    - name: editors
      dtype: 'null'
    - name: publisher
      dtype: string
    - name: publication_year
      dtype: string
    - name: isbn
      list: string
    - name: subjects
      list: string
    - name: language
      dtype: string
    - name: url_doab_handle
      dtype: string
    - name: url_pdf
      dtype: string
    - name: url_doi
      dtype: 'null'
    - name: url_oapen_viewer
      dtype: 'null'
    - name: url_other
      list: string
    - name: license_type
      dtype: string
    - name: license_url
      dtype: string
    - name: license_version
      dtype: string
    - name: license_text
      dtype: string
    - name: abstract
      dtype: string
    - name: series
      dtype: string
    - name: physical_description
      dtype: string
    - name: raw_marc
      dtype: string
    - name: pdf_path
      dtype: string
    - name: page_texts
      list: string
    - name: page_numbers
      list: int64
    - name: num_pages
      dtype: int64
    - name: page_images
      list: image
  splits:
    - name: train
      num_bytes: 9631204928
      num_examples: 8086
  download_size: 9289649199
  dataset_size: 9631204928
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

DOAB Open Access Books - Metadata Extraction Dataset

Dataset Description

This dataset contains 9,363 open access books with page images and rich bibliographic metadata extracted from MARC21 records, curated specifically for training and evaluating Vision Language Models (VLMs) on automatic metadata extraction from scholarly monographs.

The dataset is derived from the Penn State ScholarSphere DOAB collection (Directory of Open Access Books), focusing on books with Creative Commons licenses that permit research and machine learning applications.

Note: This version contains extracted images from the first few pages of each book to reduce dataset size and facilitate ML applications. Open an issue if a raw version with full PDFs would be of use.

Key Features

  • 9,363 open access books with page images and metadata
  • Page images extracted from the first few pages of each book
  • Rich metadata including title, subtitle, authors, editors, publisher, publication year, ISBN, subjects, abstracts, and language
  • Full MARC21 records preserved for comprehensive bibliographic information
  • License tracking with specific Creative Commons license types (CC BY, CC BY-NC-ND, etc.) enabling filtering by usage rights
  • Predominantly CC BY licensed (71.5%) - most permissive for ML applications
  • Predominantly English with some German, Italian, French, and Spanish books

Use Cases

This dataset is designed for:

  1. Training VLMs to extract bibliographic metadata from book title pages and front matter
  2. Evaluating document understanding models on structured metadata extraction tasks
  3. Benchmarking VLM performance against ground-truth MARC21 catalog records
  4. Developing automated cataloging tools for libraries and digital repositories
  5. Research in scholarly communication and open access publishing patterns

Dataset Structure

Format

The dataset contains book metadata with images from the first few pages of each book.

Data Fields

Each record contains the following fields:

Core Bibliographic Metadata:

  • record_id (string): Unique DOAB record identifier
  • title (string): Main title of the work
  • subtitle (string, nullable): Subtitle if present
  • statement_of_responsibility (string, nullable): Statement of responsibility from title field
  • authors (list[string], nullable): List of authors
  • editors (list[string], nullable): List of editors
  • publisher (string): Publisher name
  • publication_year (string): Year of publication
  • isbn (list[string], nullable): ISBN numbers
  • language (string): ISO 639-2/3 language code

Subject and Description:

  • subjects (list[string], nullable): Subject headings (LCSH, BISAC, keywords)
  • abstract (string, nullable): Book description/abstract
  • series (string, nullable): Series title if part of a series
  • physical_description (string, nullable): Physical details (page count, etc.)

Access and Rights:

  • license_type (string): Specific Creative Commons license (e.g., "CC BY", "CC BY-NC-ND")
  • license_url (string): Full URL to license deed
  • license_version (string): License version (e.g., "4.0")
  • license_text (string): Original license text from MARC record

URLs:

  • url_doab_handle (string, nullable): DOAB catalog record URL
  • url_pdf (string): Direct PDF download URL
  • url_doi (string, nullable): DOI URL if available
  • url_oapen_viewer (string, nullable): OAPEN viewer URL
  • url_other (list[string]): Other related URLs

Images:

  • images (list[Image]): Images from the first few pages of the book

Technical:

  • raw_marc (string): Complete MARC21 record in JSON format preserving all original cataloging information. This field contains the full bibliographic record and can be used for advanced applications requiring access to MARC fields not extracted into the structured metadata fields above.

Data Splits

Split Records
Train 9,363
Total 9,363

License Distribution

The dataset includes books under various Creative Commons licenses, allowing users to filter by usage rights:

License Type Books Commercial Use Derivatives Allowed
CC BY 6,693 (71.5%) ✅ Yes ✅ Yes
CC BY-NC-ND 1,046 (11.2%) ❌ No ❌ No
CC BY-NC-SA 879 (9.4%) ❌ No ✅ Yes (ShareAlike)
CC BY-NC 532 (5.7%) ❌ No ✅ Yes
CC BY-SA 147 (1.6%) ✅ Yes ✅ Yes (ShareAlike)
CC (Unspecified) 37 (0.4%) ⚠️ Varies ⚠️ Varies
CC BY-ND 29 (0.3%) ✅ Yes ❌ No

Note: Filter by license_type to ensure compliance with your use case (e.g., use only CC BY for commercial applications).

Loading the Dataset

Basic Loading

from datasets import load_dataset

# Load full dataset
dataset = load_dataset("biglam/doab-metadata-extraction")

# Access train split
train = dataset['train']

# View first record
print(train[0])

Accessing Images and Metadata

# Get a single record
record = train[0]

# Access metadata
print(f"Title: {record['title']}")
print(f"Authors: {record['authors']}")
print(f"Publisher: {record['publisher']}")
print(f"Abstract: {record['abstract']}")
print(f"License: {record['license_type']}")

# Access page images
images = record['images']  # List of PIL Images
print(f"Number of pages: {len(images)}")

# Display first page
images[0].show()

Filtering by License

# Filter to only commercially-usable books (CC BY, CC BY-SA, CC BY-ND)
commercial_ok = train.filter(
    lambda x: x['license_type'] in ['CC BY', 'CC BY-SA', 'CC BY-ND']
)

# Filter to only most permissive license
cc_by_only = train.filter(lambda x: x['license_type'] == 'CC BY')

# Filter to derivative-allowed licenses
derivatives_ok = train.filter(
    lambda x: x['license_type'] in ['CC BY', 'CC BY-SA', 'CC BY-NC', 'CC BY-NC-SA']
)

Filtering by Language

# English books only
english_books = train.filter(lambda x: x['language'] == 'eng')

# Non-English books
non_english = train.filter(lambda x: x['language'] != 'eng')

# Specific languages
german_books = train.filter(lambda x: x['language'] == 'ger')
italian_books = train.filter(lambda x: x['language'] == 'ita')

Dataset Creation

Source Data

This dataset is derived from the Penn State ScholarSphere collection of DOAB (Directory of Open Access Books) MARC21 records:

  • Source: Penn State ScholarSphere
  • Original MARC Records: 65,307 records with Creative Commons licenses
  • PDFs with Direct URLs: 37,673 records
  • Successfully Downloaded: ~9,400 PDFs
  • Dataset Records: 9,363 books with extracted page images

Processing Pipeline

  1. MARC Parsing: Extracted structured metadata from MARC21 records using pymarc
  2. License Extraction: Parsed Creative Commons license types from MARC 540 field
  3. URL Classification: Categorized URLs into PDF downloads, DOI links, catalog records
  4. PDF Download: Asynchronous download with retry logic and resume capability
  5. Image Extraction: Extracted first few pages from each PDF as images
  6. Dataset Preparation: Organized with metadata and page images

Curation Rationale

The dataset focuses on:

  • Books with direct PDF download URLs (not just catalog records)
  • Creative Commons licenses
  • Successfully downloadable PDFs (quality control through actual downloads)
  • Professional cataloging metadata from DOAB/OAPEN library networks
  • Page images instead of full PDFs to reduce dataset size while maintaining utility for metadata extraction

Quality Notes

  • All records include successfully extracted page images
  • MARC metadata is professional library cataloging quality
  • Page images may vary in quality (mix of born-digital PDFs and scanned images)
  • Language distribution reflects DOAB's European academic publishing focus

Limitations and Considerations

Coverage Limitations

  • European/Academic Bias: Strong representation of European academic publishers due to DOAB/OAPEN network
  • Open Access Only: Does not represent commercial scholarly publishing
  • Language Distribution: Heavily English-dominant; limited representation of other languages
  • Subject Areas: Reflects open access publishing patterns (humanities and social sciences more common)

Ethical Considerations

  • All content is legally published as open access with Creative Commons licenses
  • Users should filter by license_type to ensure compliance with their use case
  • Attribution should be provided as per CC license requirements
  • Commercial users should filter to exclude NC (Non-Commercial) licenses

Citation and Attribution

Dataset Citation

@dataset{doab_metadata_extraction_2024,
  title={DOAB Open Access Books - Metadata Extraction Dataset},
  author={van Strien, Daniel},
  year={2024},
  publisher={HuggingFace},
  url={https://huggingface.co/datasets/biglam/doab-metadata-extraction}
}

Source Data Citation

@dataset{penn_state_doab_2024,
  title={MARC files of DOAB metadata (May 2024)},
  author={{Penn State University Libraries}},
  year={2024},
  publisher={ScholarSphere},
  doi={10.26207/f917-840a},
  url={https://scholarsphere.psu.edu/resources/f917840a-5ee8-4f08-b3b0-e985e2638380}
}

DOAB Acknowledgment

This dataset is built on bibliographic metadata from the Directory of Open Access Books (DOAB), a community-driven discovery service for open access books coordinated by OAPEN Foundation.

Additional Resources

License

This dataset contains content under multiple licenses. The metadata and dataset structure are provided as-is, but individual book content retains the original Creative Commons licenses as specified in the license_type field. Users must comply with the specific license of each book:

  • CC BY: Free use with attribution
  • CC BY-NC: Free use with attribution, non-commercial only
  • CC BY-ND: Free use with attribution, no derivatives
  • CC BY-SA: Free use with attribution, share-alike
  • CC BY-NC-ND: Most restrictive - non-commercial, no derivatives
  • CC BY-NC-SA: Non-commercial, share-alike

Filter by license_type to ensure compliance with your use case.