metadata
dataset_info:
features:
- name: filename
dtype: string
- name: pdf
dtype:
pdf:
decode: false
- name: annotation
dtype: string
- name: class
dtype: string
- name: truncation_type
dtype: string
- name: pdf_size_bytes
dtype: int64
splits:
- name: train
num_bytes: 1503710871
num_examples: 1620
download_size: 1410319327
dataset_size: 1503710871
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
PDF OCR Classification Dataset
This dataset contains PDF documents with annotations for OCR classification tasks.
Dataset Description
- Total samples: 1620
- Classes: OCR (requires OCR processing), NOCR (no OCR needed)
Dataset Structure
Each row contains:
filename: Original PDF filenamepdf: PDF file as binary data (using Pdf feature type)annotation: Original annotation labelclass: Binary classification label (OCR/NOCR)truncation_type: Whether the PDF is truncated or non-truncatedpdf_size_bytes: Size of the PDF file in bytes
Class Distribution
class NOCR 1393 OCR 227
Usage
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("HuggingFaceFW/ocr-annotations")
# Access train split
train_data = dataset['train']
# Access a sample
sample = train_data[0]
pdf_bytes = sample['pdf'] # This will be bytes
label = sample['class']
License
Please check the original data source for licensing information.