Commit
·
abfc4f2
verified
·
0
Parent(s):
Duplicate from biglam/doab-metadata-extraction
Browse files- .gitattributes +59 -0
- README.md +370 -0
- data/train-00000-of-00020.parquet +3 -0
- data/train-00001-of-00020.parquet +3 -0
- data/train-00002-of-00020.parquet +3 -0
- data/train-00003-of-00020.parquet +3 -0
- data/train-00004-of-00020.parquet +3 -0
- data/train-00005-of-00020.parquet +3 -0
- data/train-00006-of-00020.parquet +3 -0
- data/train-00007-of-00020.parquet +3 -0
- data/train-00008-of-00020.parquet +3 -0
- data/train-00009-of-00020.parquet +3 -0
- data/train-00010-of-00020.parquet +3 -0
- data/train-00011-of-00020.parquet +3 -0
- data/train-00012-of-00020.parquet +3 -0
- data/train-00013-of-00020.parquet +3 -0
- data/train-00014-of-00020.parquet +3 -0
- data/train-00015-of-00020.parquet +3 -0
- data/train-00016-of-00020.parquet +3 -0
- data/train-00017-of-00020.parquet +3 -0
- data/train-00018-of-00020.parquet +3 -0
- data/train-00019-of-00020.parquet +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.mds filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
# Audio files - uncompressed
|
| 39 |
+
*.pcm filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
*.sam filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
*.raw filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
# Audio files - compressed
|
| 43 |
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
# Image files - uncompressed
|
| 49 |
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
# Image files - compressed
|
| 54 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
# Video files - compressed
|
| 58 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
*.webm filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-to-text
|
| 5 |
+
- image-text-to-text
|
| 6 |
+
tags:
|
| 7 |
+
- metadata-extraction
|
| 8 |
+
- glam
|
| 9 |
+
- MARC21
|
| 10 |
+
- library-science
|
| 11 |
+
size_categories:
|
| 12 |
+
- 1K<n<10K
|
| 13 |
+
language:
|
| 14 |
+
- en
|
| 15 |
+
- de
|
| 16 |
+
- it
|
| 17 |
+
- fr
|
| 18 |
+
- es
|
| 19 |
+
pretty_name: DOAB Open Access Books Metadata Extraction Dataset
|
| 20 |
+
dataset_info:
|
| 21 |
+
features:
|
| 22 |
+
- name: record_id
|
| 23 |
+
dtype: string
|
| 24 |
+
- name: title
|
| 25 |
+
dtype: string
|
| 26 |
+
- name: subtitle
|
| 27 |
+
dtype: string
|
| 28 |
+
- name: statement_of_responsibility
|
| 29 |
+
dtype: 'null'
|
| 30 |
+
- name: authors
|
| 31 |
+
dtype: 'null'
|
| 32 |
+
- name: editors
|
| 33 |
+
dtype: 'null'
|
| 34 |
+
- name: publisher
|
| 35 |
+
dtype: string
|
| 36 |
+
- name: publication_year
|
| 37 |
+
dtype: string
|
| 38 |
+
- name: isbn
|
| 39 |
+
list: string
|
| 40 |
+
- name: subjects
|
| 41 |
+
list: string
|
| 42 |
+
- name: language
|
| 43 |
+
dtype: string
|
| 44 |
+
- name: url_doab_handle
|
| 45 |
+
dtype: string
|
| 46 |
+
- name: url_pdf
|
| 47 |
+
dtype: string
|
| 48 |
+
- name: url_doi
|
| 49 |
+
dtype: 'null'
|
| 50 |
+
- name: url_oapen_viewer
|
| 51 |
+
dtype: 'null'
|
| 52 |
+
- name: url_other
|
| 53 |
+
list: string
|
| 54 |
+
- name: license_type
|
| 55 |
+
dtype: string
|
| 56 |
+
- name: license_url
|
| 57 |
+
dtype: string
|
| 58 |
+
- name: license_version
|
| 59 |
+
dtype: string
|
| 60 |
+
- name: license_text
|
| 61 |
+
dtype: string
|
| 62 |
+
- name: abstract
|
| 63 |
+
dtype: string
|
| 64 |
+
- name: series
|
| 65 |
+
dtype: string
|
| 66 |
+
- name: physical_description
|
| 67 |
+
dtype: string
|
| 68 |
+
- name: raw_marc
|
| 69 |
+
dtype: string
|
| 70 |
+
- name: pdf_path
|
| 71 |
+
dtype: string
|
| 72 |
+
- name: page_texts
|
| 73 |
+
list: string
|
| 74 |
+
- name: page_numbers
|
| 75 |
+
list: int64
|
| 76 |
+
- name: num_pages
|
| 77 |
+
dtype: int64
|
| 78 |
+
- name: page_images
|
| 79 |
+
list: image
|
| 80 |
+
splits:
|
| 81 |
+
- name: train
|
| 82 |
+
num_bytes: 9631204928
|
| 83 |
+
num_examples: 8086
|
| 84 |
+
download_size: 9289649199
|
| 85 |
+
dataset_size: 9631204928
|
| 86 |
+
configs:
|
| 87 |
+
- config_name: default
|
| 88 |
+
data_files:
|
| 89 |
+
- split: train
|
| 90 |
+
path: data/train-*
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
# DOAB Open Access Books - Metadata Extraction Dataset
|
| 94 |
+
|
| 95 |
+
## Dataset Description
|
| 96 |
+
|
| 97 |
+
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.
|
| 98 |
+
|
| 99 |
+
The dataset is derived from the [Penn State ScholarSphere DOAB collection](https://scholarsphere.psu.edu/resources/f917840a-5ee8-4f08-b3b0-e985e2638380) (Directory of Open Access Books), focusing on books with Creative Commons licenses that permit research and machine learning applications.
|
| 100 |
+
|
| 101 |
+
> **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.
|
| 102 |
+
|
| 103 |
+
### Key Features
|
| 104 |
+
|
| 105 |
+
- **9,363 open access books** with page images and metadata
|
| 106 |
+
- **Page images** extracted from the first few pages of each book
|
| 107 |
+
- **Rich metadata** including title, subtitle, authors, editors, publisher, publication year, ISBN, subjects, abstracts, and language
|
| 108 |
+
- **Full MARC21 records** preserved for comprehensive bibliographic information
|
| 109 |
+
- **License tracking** with specific Creative Commons license types (CC BY, CC BY-NC-ND, etc.) enabling filtering by usage rights
|
| 110 |
+
- **Predominantly CC BY licensed** (71.5%) - most permissive for ML applications
|
| 111 |
+
- **Predominantly English** with some German, Italian, French, and Spanish books
|
| 112 |
+
|
| 113 |
+
### Use Cases
|
| 114 |
+
|
| 115 |
+
This dataset is designed for:
|
| 116 |
+
|
| 117 |
+
1. **Training VLMs** to extract bibliographic metadata from book title pages and front matter
|
| 118 |
+
2. **Evaluating document understanding models** on structured metadata extraction tasks
|
| 119 |
+
3. **Benchmarking VLM performance** against ground-truth MARC21 catalog records
|
| 120 |
+
4. **Developing automated cataloging tools** for libraries and digital repositories
|
| 121 |
+
5. **Research in scholarly communication** and open access publishing patterns
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
## Dataset Structure
|
| 125 |
+
|
| 126 |
+
### Format
|
| 127 |
+
|
| 128 |
+
The dataset contains book metadata with images from the first few pages of each book.
|
| 129 |
+
|
| 130 |
+
### Data Fields
|
| 131 |
+
|
| 132 |
+
Each record contains the following fields:
|
| 133 |
+
|
| 134 |
+
**Core Bibliographic Metadata:**
|
| 135 |
+
|
| 136 |
+
- `record_id` (string): Unique DOAB record identifier
|
| 137 |
+
- `title` (string): Main title of the work
|
| 138 |
+
- `subtitle` (string, nullable): Subtitle if present
|
| 139 |
+
- `statement_of_responsibility` (string, nullable): Statement of responsibility from title field
|
| 140 |
+
- `authors` (list[string], nullable): List of authors
|
| 141 |
+
- `editors` (list[string], nullable): List of editors
|
| 142 |
+
- `publisher` (string): Publisher name
|
| 143 |
+
- `publication_year` (string): Year of publication
|
| 144 |
+
- `isbn` (list[string], nullable): ISBN numbers
|
| 145 |
+
- `language` (string): ISO 639-2/3 language code
|
| 146 |
+
|
| 147 |
+
**Subject and Description:**
|
| 148 |
+
|
| 149 |
+
- `subjects` (list[string], nullable): Subject headings (LCSH, BISAC, keywords)
|
| 150 |
+
- `abstract` (string, nullable): Book description/abstract
|
| 151 |
+
- `series` (string, nullable): Series title if part of a series
|
| 152 |
+
- `physical_description` (string, nullable): Physical details (page count, etc.)
|
| 153 |
+
|
| 154 |
+
**Access and Rights:**
|
| 155 |
+
|
| 156 |
+
- `license_type` (string): Specific Creative Commons license (e.g., "CC BY", "CC BY-NC-ND")
|
| 157 |
+
- `license_url` (string): Full URL to license deed
|
| 158 |
+
- `license_version` (string): License version (e.g., "4.0")
|
| 159 |
+
- `license_text` (string): Original license text from MARC record
|
| 160 |
+
|
| 161 |
+
**URLs:**
|
| 162 |
+
|
| 163 |
+
- `url_doab_handle` (string, nullable): DOAB catalog record URL
|
| 164 |
+
- `url_pdf` (string): Direct PDF download URL
|
| 165 |
+
- `url_doi` (string, nullable): DOI URL if available
|
| 166 |
+
- `url_oapen_viewer` (string, nullable): OAPEN viewer URL
|
| 167 |
+
- `url_other` (list[string]): Other related URLs
|
| 168 |
+
|
| 169 |
+
**Images:**
|
| 170 |
+
|
| 171 |
+
- `images` (list[Image]): Images from the first few pages of the book
|
| 172 |
+
|
| 173 |
+
**Technical:**
|
| 174 |
+
|
| 175 |
+
- `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.
|
| 176 |
+
|
| 177 |
+
### Data Splits
|
| 178 |
+
|
| 179 |
+
| Split | Records |
|
| 180 |
+
| --------- | --------- |
|
| 181 |
+
| Train | 9,363 |
|
| 182 |
+
| **Total** | **9,363** |
|
| 183 |
+
|
| 184 |
+
### License Distribution
|
| 185 |
+
|
| 186 |
+
The dataset includes books under various Creative Commons licenses, allowing users to filter by usage rights:
|
| 187 |
+
|
| 188 |
+
| License Type | Books | Commercial Use | Derivatives Allowed |
|
| 189 |
+
| ---------------- | --------------- | -------------- | ------------------- |
|
| 190 |
+
| CC BY | 6,693 (71.5%) | ✅ Yes | ✅ Yes |
|
| 191 |
+
| CC BY-NC-ND | 1,046 (11.2%) | ❌ No | ❌ No |
|
| 192 |
+
| CC BY-NC-SA | 879 (9.4%) | ❌ No | ✅ Yes (ShareAlike) |
|
| 193 |
+
| CC BY-NC | 532 (5.7%) | ❌ No | ✅ Yes |
|
| 194 |
+
| CC BY-SA | 147 (1.6%) | ✅ Yes | ✅ Yes (ShareAlike) |
|
| 195 |
+
| CC (Unspecified) | 37 (0.4%) | ⚠️ Varies | ⚠️ Varies |
|
| 196 |
+
| CC BY-ND | 29 (0.3%) | ✅ Yes | ❌ No |
|
| 197 |
+
|
| 198 |
+
**Note:** Filter by `license_type` to ensure compliance with your use case (e.g., use only CC BY for commercial applications).
|
| 199 |
+
|
| 200 |
+
## Loading the Dataset
|
| 201 |
+
|
| 202 |
+
### Basic Loading
|
| 203 |
+
|
| 204 |
+
```python
|
| 205 |
+
from datasets import load_dataset
|
| 206 |
+
|
| 207 |
+
# Load full dataset
|
| 208 |
+
dataset = load_dataset("biglam/doab-metadata-extraction")
|
| 209 |
+
|
| 210 |
+
# Access train split
|
| 211 |
+
train = dataset['train']
|
| 212 |
+
|
| 213 |
+
# View first record
|
| 214 |
+
print(train[0])
|
| 215 |
+
```
|
| 216 |
+
|
| 217 |
+
### Accessing Images and Metadata
|
| 218 |
+
|
| 219 |
+
```python
|
| 220 |
+
# Get a single record
|
| 221 |
+
record = train[0]
|
| 222 |
+
|
| 223 |
+
# Access metadata
|
| 224 |
+
print(f"Title: {record['title']}")
|
| 225 |
+
print(f"Authors: {record['authors']}")
|
| 226 |
+
print(f"Publisher: {record['publisher']}")
|
| 227 |
+
print(f"Abstract: {record['abstract']}")
|
| 228 |
+
print(f"License: {record['license_type']}")
|
| 229 |
+
|
| 230 |
+
# Access page images
|
| 231 |
+
images = record['images'] # List of PIL Images
|
| 232 |
+
print(f"Number of pages: {len(images)}")
|
| 233 |
+
|
| 234 |
+
# Display first page
|
| 235 |
+
images[0].show()
|
| 236 |
+
```
|
| 237 |
+
|
| 238 |
+
### Filtering by License
|
| 239 |
+
|
| 240 |
+
```python
|
| 241 |
+
# Filter to only commercially-usable books (CC BY, CC BY-SA, CC BY-ND)
|
| 242 |
+
commercial_ok = train.filter(
|
| 243 |
+
lambda x: x['license_type'] in ['CC BY', 'CC BY-SA', 'CC BY-ND']
|
| 244 |
+
)
|
| 245 |
+
|
| 246 |
+
# Filter to only most permissive license
|
| 247 |
+
cc_by_only = train.filter(lambda x: x['license_type'] == 'CC BY')
|
| 248 |
+
|
| 249 |
+
# Filter to derivative-allowed licenses
|
| 250 |
+
derivatives_ok = train.filter(
|
| 251 |
+
lambda x: x['license_type'] in ['CC BY', 'CC BY-SA', 'CC BY-NC', 'CC BY-NC-SA']
|
| 252 |
+
)
|
| 253 |
+
```
|
| 254 |
+
|
| 255 |
+
### Filtering by Language
|
| 256 |
+
|
| 257 |
+
```python
|
| 258 |
+
# English books only
|
| 259 |
+
english_books = train.filter(lambda x: x['language'] == 'eng')
|
| 260 |
+
|
| 261 |
+
# Non-English books
|
| 262 |
+
non_english = train.filter(lambda x: x['language'] != 'eng')
|
| 263 |
+
|
| 264 |
+
# Specific languages
|
| 265 |
+
german_books = train.filter(lambda x: x['language'] == 'ger')
|
| 266 |
+
italian_books = train.filter(lambda x: x['language'] == 'ita')
|
| 267 |
+
```
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
## Dataset Creation
|
| 271 |
+
|
| 272 |
+
### Source Data
|
| 273 |
+
|
| 274 |
+
This dataset is derived from the Penn State ScholarSphere collection of DOAB (Directory of Open Access Books) MARC21 records:
|
| 275 |
+
|
| 276 |
+
- **Source**: [Penn State ScholarSphere](https://scholarsphere.psu.edu/resources/f917840a-5ee8-4f08-b3b0-e985e2638380)
|
| 277 |
+
- **Original MARC Records**: 65,307 records with Creative Commons licenses
|
| 278 |
+
- **PDFs with Direct URLs**: 37,673 records
|
| 279 |
+
- **Successfully Downloaded**: ~9,400 PDFs
|
| 280 |
+
- **Dataset Records**: 9,363 books with extracted page images
|
| 281 |
+
|
| 282 |
+
### Processing Pipeline
|
| 283 |
+
|
| 284 |
+
1. **MARC Parsing**: Extracted structured metadata from MARC21 records using `pymarc`
|
| 285 |
+
2. **License Extraction**: Parsed Creative Commons license types from MARC 540 field
|
| 286 |
+
3. **URL Classification**: Categorized URLs into PDF downloads, DOI links, catalog records
|
| 287 |
+
4. **PDF Download**: Asynchronous download with retry logic and resume capability
|
| 288 |
+
5. **Image Extraction**: Extracted first few pages from each PDF as images
|
| 289 |
+
6. **Dataset Preparation**: Organized with metadata and page images
|
| 290 |
+
|
| 291 |
+
### Curation Rationale
|
| 292 |
+
|
| 293 |
+
The dataset focuses on:
|
| 294 |
+
|
| 295 |
+
- Books with **direct PDF download URLs** (not just catalog records)
|
| 296 |
+
- **Creative Commons licenses**
|
| 297 |
+
- **Successfully downloadable PDFs** (quality control through actual downloads)
|
| 298 |
+
- **Professional cataloging metadata** from DOAB/OAPEN library networks
|
| 299 |
+
- **Page images instead of full PDFs** to reduce dataset size while maintaining utility for metadata extraction
|
| 300 |
+
|
| 301 |
+
### Quality Notes
|
| 302 |
+
|
| 303 |
+
- All records include successfully extracted page images
|
| 304 |
+
- MARC metadata is professional library cataloging quality
|
| 305 |
+
- Page images may vary in quality (mix of born-digital PDFs and scanned images)
|
| 306 |
+
- Language distribution reflects DOAB's European academic publishing focus
|
| 307 |
+
|
| 308 |
+
## Limitations and Considerations
|
| 309 |
+
|
| 310 |
+
### Coverage Limitations
|
| 311 |
+
|
| 312 |
+
- **European/Academic Bias**: Strong representation of European academic publishers due to DOAB/OAPEN network
|
| 313 |
+
- **Open Access Only**: Does not represent commercial scholarly publishing
|
| 314 |
+
- **Language Distribution**: Heavily English-dominant; limited representation of other languages
|
| 315 |
+
- **Subject Areas**: Reflects open access publishing patterns (humanities and social sciences more common)
|
| 316 |
+
|
| 317 |
+
### Ethical Considerations
|
| 318 |
+
|
| 319 |
+
- All content is legally published as open access with Creative Commons licenses
|
| 320 |
+
- Users should filter by `license_type` to ensure compliance with their use case
|
| 321 |
+
- Attribution should be provided as per CC license requirements
|
| 322 |
+
- Commercial users should filter to exclude NC (Non-Commercial) licenses
|
| 323 |
+
|
| 324 |
+
## Citation and Attribution
|
| 325 |
+
|
| 326 |
+
### Dataset Citation
|
| 327 |
+
|
| 328 |
+
```bibtex
|
| 329 |
+
@dataset{doab_metadata_extraction_2024,
|
| 330 |
+
title={DOAB Open Access Books - Metadata Extraction Dataset},
|
| 331 |
+
author={van Strien, Daniel},
|
| 332 |
+
year={2024},
|
| 333 |
+
publisher={HuggingFace},
|
| 334 |
+
url={https://huggingface.co/datasets/biglam/doab-metadata-extraction}
|
| 335 |
+
}
|
| 336 |
+
```
|
| 337 |
+
|
| 338 |
+
### Source Data Citation
|
| 339 |
+
|
| 340 |
+
```bibtex
|
| 341 |
+
@dataset{penn_state_doab_2024,
|
| 342 |
+
title={MARC files of DOAB metadata (May 2024)},
|
| 343 |
+
author={{Penn State University Libraries}},
|
| 344 |
+
year={2024},
|
| 345 |
+
publisher={ScholarSphere},
|
| 346 |
+
doi={10.26207/f917-840a},
|
| 347 |
+
url={https://scholarsphere.psu.edu/resources/f917840a-5ee8-4f08-b3b0-e985e2638380}
|
| 348 |
+
}
|
| 349 |
+
```
|
| 350 |
+
|
| 351 |
+
### DOAB Acknowledgment
|
| 352 |
+
|
| 353 |
+
This dataset is built on bibliographic metadata from the [Directory of Open Access Books (DOAB)](https://www.doabooks.org/), a community-driven discovery service for open access books coordinated by OAPEN Foundation.
|
| 354 |
+
|
| 355 |
+
## Additional Resources
|
| 356 |
+
|
| 357 |
+
- **MARC21 Format Documentation**: [Library of Congress](https://www.loc.gov/marc/bibliographic/)
|
| 358 |
+
|
| 359 |
+
## License
|
| 360 |
+
|
| 361 |
+
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:
|
| 362 |
+
|
| 363 |
+
- **CC BY**: Free use with attribution
|
| 364 |
+
- **CC BY-NC**: Free use with attribution, non-commercial only
|
| 365 |
+
- **CC BY-ND**: Free use with attribution, no derivatives
|
| 366 |
+
- **CC BY-SA**: Free use with attribution, share-alike
|
| 367 |
+
- **CC BY-NC-ND**: Most restrictive - non-commercial, no derivatives
|
| 368 |
+
- **CC BY-NC-SA**: Non-commercial, share-alike
|
| 369 |
+
|
| 370 |
+
Filter by `license_type` to ensure compliance with your use case.
|
data/train-00000-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4bf38739cb3e77982833049e6c2766aa46bf47b6054a6a63b695555814213d0e
|
| 3 |
+
size 467612415
|
data/train-00001-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69e6ac4b466c6484955b80f5e9968c3684cc1d07d09325dccbe2f7e73582fb9c
|
| 3 |
+
size 449944184
|
data/train-00002-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b8f780b1aa5dfae24c3988864138b52132bfac7c7fc5e1c9fb7a49a1a8c37af6
|
| 3 |
+
size 403622474
|
data/train-00003-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3cdaae55f2f69f3dc464babf15895868a353b3c4c398641e8d4e4297fdb5d9fc
|
| 3 |
+
size 406700535
|
data/train-00004-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:792be6d53302b8e6d3fb44fbdb7096245dc7490140256be2597b2420a0e304ef
|
| 3 |
+
size 465487586
|
data/train-00005-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e1dda8515221af079d0decf73d4771f5cd128b0d0a35348e90242e5ec89d493
|
| 3 |
+
size 488955266
|
data/train-00006-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a715ed2831ce1e77a96b42532476ccac2f00189cab31edf3c5ccf0f24c9fea17
|
| 3 |
+
size 456636160
|
data/train-00007-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d4a01dd77e761e2fcae2a4f337d06ab54acc1e76133e901bddc89294ab0001e
|
| 3 |
+
size 454924569
|
data/train-00008-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:168b16e5c6209ee94f320e5468d3b9d39bc3f70ca10dfc34f9492ee6c8c46e30
|
| 3 |
+
size 460238293
|
data/train-00009-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b964d9503edd537432e38e690c176880bbd48608fb79be76c44284dd3e13fffa
|
| 3 |
+
size 413816122
|
data/train-00010-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16cf9917e6b756758b80988861de57d8956ccf67e484aa572b0dac38d14701db
|
| 3 |
+
size 479848462
|
data/train-00011-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea2dabd34a61d19a8694b62fe91f01e4a76a05f82b14f2599f7a2a4c4afc8142
|
| 3 |
+
size 705189125
|
data/train-00012-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3eff80b152b84090e9768b12de1f85d2ccd037d61208865c9b3d94ea8de29672
|
| 3 |
+
size 419219617
|
data/train-00013-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f04bce7fa7fa3264ab2755f938d14be6f8dcb9f488febe25ea4401885d3faca6
|
| 3 |
+
size 361416180
|
data/train-00014-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7a31e8d8800995719cf85f8aaee736bf8cb297e669cbccffdbdacdac4ba284d
|
| 3 |
+
size 313328390
|
data/train-00015-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02a06addc8f6833bb4c7e47dcbba7bf4e8a9b2f50989d6ee9d9dd87601c87e52
|
| 3 |
+
size 318517890
|
data/train-00016-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6900920f4ebbb38609a2b7391f5d026cbc366873449fa2ab92341a0066110ad7
|
| 3 |
+
size 474671468
|
data/train-00017-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:941947baea7940e771f0225ede93720fe7454df2b850c0041714255249819f85
|
| 3 |
+
size 614593057
|
data/train-00018-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6a32d20a8c2e99287ecfcbba2a735fddfed1475874185564952f16d81dde0a9
|
| 3 |
+
size 593327116
|
data/train-00019-of-00020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3169e552e618b5f76d91ebe5641c7711902c6a65b774754917155780bcfb3c49
|
| 3 |
+
size 541600290
|