Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,29 +1,45 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PDF OCR Classification Dataset
|
| 2 |
+
|
| 3 |
+
This dataset contains PDF documents with annotations for OCR classification tasks.
|
| 4 |
+
|
| 5 |
+
## Dataset Description
|
| 6 |
+
|
| 7 |
+
- **Total samples**: 1620
|
| 8 |
+
- **Classes**: OCR (requires OCR processing), NOCR (no OCR needed)
|
| 9 |
+
|
| 10 |
+
## Dataset Structure
|
| 11 |
+
|
| 12 |
+
Each row contains:
|
| 13 |
+
- `filename`: Original PDF filename
|
| 14 |
+
- `pdf`: PDF file as binary data (using Pdf feature type)
|
| 15 |
+
- `annotation`: Original annotation label
|
| 16 |
+
- `class`: Binary classification label (OCR/NOCR)
|
| 17 |
+
- `truncation_type`: Whether the PDF is truncated or non-truncated
|
| 18 |
+
- `pdf_size_bytes`: Size of the PDF file in bytes
|
| 19 |
+
|
| 20 |
+
## Class Distribution
|
| 21 |
+
|
| 22 |
+
class
|
| 23 |
+
NOCR 1393
|
| 24 |
+
OCR 227
|
| 25 |
+
|
| 26 |
+
## Usage
|
| 27 |
+
|
| 28 |
+
```python
|
| 29 |
+
from datasets import load_dataset
|
| 30 |
+
|
| 31 |
+
# Load the dataset
|
| 32 |
+
dataset = load_dataset("HuggingFaceFW/ocr-annotations")
|
| 33 |
+
|
| 34 |
+
# Access train split
|
| 35 |
+
train_data = dataset['train']
|
| 36 |
+
|
| 37 |
+
# Access a sample
|
| 38 |
+
sample = train_data[0]
|
| 39 |
+
pdf_bytes = sample['pdf'] # This will be bytes
|
| 40 |
+
label = sample['class']
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## License
|
| 44 |
+
|
| 45 |
+
Please check the original data source for licensing information.
|