--- license: odc-by language: - en pretty_name: OCR-Annotations size_categories: - n>1T --- ![image](https://cdn-uploads.huggingface.co/production/uploads/626ede24d2fa9e7d598c8709/R4lxpFbeNP0H7xZbtXj9X.png) # 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 filename - `pdf`: PDF file as binary data (using Pdf feature type) - `class`: Binary classification label (OCR/NOCR) - `truncation_type`: Whether the PDF is truncated or non-truncated - `pdf_size_bytes`: Size of the PDF file in bytes ## Class Distribution class NOCR 1393 OCR 227 ## Usage ```python 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.