Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,39 +1,57 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
- name: url
|
| 9 |
-
dtype: string
|
| 10 |
-
- name: num_pages
|
| 11 |
-
dtype: int64
|
| 12 |
-
- name: file_size_mb
|
| 13 |
-
dtype: int64
|
| 14 |
-
- name: metadata
|
| 15 |
-
dtype: string
|
| 16 |
-
- name: created_at
|
| 17 |
-
dtype: string
|
| 18 |
-
- name: pdf_bytes
|
| 19 |
-
dtype: pdf
|
| 20 |
-
- name: original_md
|
| 21 |
-
dtype: string
|
| 22 |
-
- name: hierarchical_md
|
| 23 |
-
dtype: string
|
| 24 |
-
- name: sections_toc
|
| 25 |
-
dtype: string
|
| 26 |
-
- name: inference_info
|
| 27 |
-
dtype: string
|
| 28 |
-
splits:
|
| 29 |
-
- name: train
|
| 30 |
-
num_bytes: 36862814
|
| 31 |
-
num_examples: 20
|
| 32 |
-
download_size: 28920720
|
| 33 |
-
dataset_size: 36862814
|
| 34 |
-
configs:
|
| 35 |
-
- config_name: default
|
| 36 |
-
data_files:
|
| 37 |
-
- split: train
|
| 38 |
-
path: data/train-*
|
| 39 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
tags:
|
| 3 |
+
- document-processing
|
| 4 |
+
- docling
|
| 5 |
+
- hierarchical-parsing
|
| 6 |
+
- pdf-processing
|
| 7 |
+
- generated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
# PDF Document Processing with Docling
|
| 11 |
+
|
| 12 |
+
This dataset contains structured markdown extraction from PDFs in [baobabtech/test-eval-documents](https://huggingface.co/datasets/baobabtech/test-eval-documents)
|
| 13 |
+
using Docling with hierarchical parsing.
|
| 14 |
+
|
| 15 |
+
## Processing Details
|
| 16 |
+
|
| 17 |
+
- **Source Dataset**: [baobabtech/test-eval-documents](https://huggingface.co/datasets/baobabtech/test-eval-documents)
|
| 18 |
+
- **Number of PDFs**: 20
|
| 19 |
+
- **Processing Time**: 8.4 minutes
|
| 20 |
+
- **Processing Date**: 2025-12-02 15:40 UTC
|
| 21 |
+
|
| 22 |
+
### Configuration
|
| 23 |
+
|
| 24 |
+
- **PDF Column**: `pdf_bytes`
|
| 25 |
+
- **Dataset Split**: `train`
|
| 26 |
+
|
| 27 |
+
## Dataset Structure
|
| 28 |
+
|
| 29 |
+
The dataset contains all original columns plus:
|
| 30 |
+
- `original_md`: Markdown extracted by Docling (before hierarchical restructuring)
|
| 31 |
+
- `hierarchical_md`: Markdown with proper heading hierarchy (after hierarchical processing)
|
| 32 |
+
- `sections_toc`: Table of contents (one section per line, indented by level)
|
| 33 |
+
- `inference_info`: JSON with processing metadata
|
| 34 |
+
|
| 35 |
+
## Usage
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
from datasets import load_dataset
|
| 39 |
+
|
| 40 |
+
dataset = load_dataset("YOUR_DATASET_ID", split="train")
|
| 41 |
+
|
| 42 |
+
for example in dataset:
|
| 43 |
+
print(f"Document: {example.get('file_name', 'unknown')}")
|
| 44 |
+
|
| 45 |
+
# Original markdown from Docling
|
| 46 |
+
print("=== Original Markdown ===")
|
| 47 |
+
print(example['original_md'][:500])
|
| 48 |
+
|
| 49 |
+
# Hierarchical markdown with proper heading levels
|
| 50 |
+
print("\n=== Hierarchical Markdown ===")
|
| 51 |
+
print(example['hierarchical_md'][:500])
|
| 52 |
+
|
| 53 |
+
# Table of contents
|
| 54 |
+
print("\n=== Table of Contents ===")
|
| 55 |
+
print(example['sections_toc'])
|
| 56 |
+
break
|
| 57 |
+
```
|