hynky HF Staff commited on
Commit
c5c0b31
·
verified ·
1 Parent(s): 03e782b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +45 -29
README.md CHANGED
@@ -1,29 +1,45 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: filename
5
- dtype: string
6
- - name: pdf
7
- dtype:
8
- pdf:
9
- decode: false
10
- - name: annotation
11
- dtype: string
12
- - name: class
13
- dtype: string
14
- - name: truncation_type
15
- dtype: string
16
- - name: pdf_size_bytes
17
- dtype: int64
18
- splits:
19
- - name: train
20
- num_bytes: 1388286.0
21
- num_examples: 4
22
- download_size: 1308666
23
- dataset_size: 1388286.0
24
- configs:
25
- - config_name: default
26
- data_files:
27
- - split: train
28
- path: data/train-*
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.