abdelazizeeeee commited on
Commit ·
ed1032a
1
Parent(s): eaab154
update README file
Browse files
README.md
CHANGED
|
@@ -1,109 +1,40 @@
|
|
| 1 |
---
|
| 2 |
configs:
|
| 3 |
-
- config_name: default
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
dataset_info:
|
| 12 |
-
features:
|
| 13 |
-
- name: id
|
| 14 |
-
dtype: string
|
| 15 |
-
- name: image
|
| 16 |
-
dtype: image
|
| 17 |
-
- name: output
|
| 18 |
-
dtype: string
|
| 19 |
-
splits:
|
| 20 |
-
- name: train
|
| 21 |
-
num_bytes: 2440808481
|
| 22 |
-
num_examples: 22435
|
| 23 |
-
- name: validation
|
| 24 |
-
num_bytes: 329337240
|
| 25 |
-
num_examples: 2804
|
| 26 |
-
- name: test
|
| 27 |
-
num_bytes: 328649745
|
| 28 |
-
num_examples: 2805
|
| 29 |
-
download_size: 3127169673
|
| 30 |
-
dataset_size: 3098795466
|
| 31 |
---
|
|
|
|
| 32 |
# Arabic-Image2Html Dataset
|
| 33 |
|
| 34 |
-
A dataset of **28K image-HTML pairs** for training OCR models to transform Arabic documents into structured
|
| 35 |
|
| 36 |
## Dataset Description
|
| 37 |
|
| 38 |
-
This dataset
|
| 39 |
-
|
| 40 |
-
### Dataset Composition
|
| 41 |
-
|
| 42 |
-
The dataset consists of two main components:
|
| 43 |
-
|
| 44 |
-
**1. Web-Scraped Wikipedia Content (~13K samples, 46%)**
|
| 45 |
-
- Extracted from Arabic Wikipedia articles
|
| 46 |
-
- Post-processed HTML with only semantic tags preserved
|
| 47 |
-
- Screenshots captured with real styling using Playwright
|
| 48 |
-
- Cleaned structure with proper semantic elements (section, header, main, etc.)
|
| 49 |
-
|
| 50 |
-
**2. Synthetically Generated Documents (~15K samples, 54%)**
|
| 51 |
-
- HTML documents rendered into images using CSS styling
|
| 52 |
-
- Mimics various real-world document types:
|
| 53 |
-
- Historical manuscripts
|
| 54 |
-
- Newspaper articles
|
| 55 |
-
- Scientific papers
|
| 56 |
-
- Invoices
|
| 57 |
-
- Recipes
|
| 58 |
-
- And more (~13 formats total)
|
| 59 |
-
- Diverse layouts, styles, noise levels, fonts, and text flows
|
| 60 |
-
- Filled with plain Arabic text from open datasets
|
| 61 |
-
- Multiple semantic tag combinations (footer, table, section, etc.)
|
| 62 |
-
|
| 63 |
-
### Features
|
| 64 |
-
|
| 65 |
-
- **Total samples:** 28,000 image-HTML pairs
|
| 66 |
-
- **Language:** Arabic
|
| 67 |
-
- **Output format:** Semantic HTML (clean tags without id, class attributes)
|
| 68 |
-
- **Document diversity:** Multiple formats and layouts
|
| 69 |
|
| 70 |
## Usage
|
| 71 |
|
| 72 |
-
### Loading the Dataset
|
| 73 |
-
|
| 74 |
```python
|
| 75 |
from datasets import load_dataset
|
| 76 |
|
| 77 |
-
dataset = load_dataset("
|
| 78 |
```
|
| 79 |
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
-
|
| 84 |
-
-
|
| 85 |
-
-
|
| 86 |
-
|
| 87 |
-
## Related Resources
|
| 88 |
-
|
| 89 |
-
- **Model:** [Alef-OCR-Image2Html](https://huggingface.co/OussamaBenSlama/Alef-OCR-Image2Html)
|
| 90 |
-
- **Training Notebooks:** [Github Repository](https://github.com/OussamaBenSlama/Alef-OCR-Image2Html)
|
| 91 |
-
|
| 92 |
-
## Citation
|
| 93 |
-
|
| 94 |
-
```bibtex
|
| 95 |
-
@misc{arabic_image2html_2025,
|
| 96 |
-
title={Arabic-Image2Html: A Dataset for Arabic OCR to Semantic HTML},
|
| 97 |
-
author={Oussama Ben Slama},
|
| 98 |
-
year={2025},
|
| 99 |
-
howpublished={Hugging Face Datasets},
|
| 100 |
-
url={https://huggingface.co/datasets/OussamaBenSlama/arabic-image2html}
|
| 101 |
-
}
|
| 102 |
-
```
|
| 103 |
|
| 104 |
## License
|
| 105 |
|
| 106 |
-
|
| 107 |
-
## Acknowledgments
|
| 108 |
-
|
| 109 |
-
This work builds upon the excellent research by the NAMAA community and their state-of-the-art Qari-OCR model.
|
|
|
|
| 1 |
---
|
| 2 |
configs:
|
| 3 |
+
- config_name: default
|
| 4 |
+
data_files:
|
| 5 |
+
- split: train
|
| 6 |
+
path: data/train-*
|
| 7 |
+
- split: validation
|
| 8 |
+
path: data/validation-*
|
| 9 |
+
- split: test
|
| 10 |
+
path: data/test-*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
+
|
| 13 |
# Arabic-Image2Html Dataset
|
| 14 |
|
| 15 |
+
A dataset of **28K image-HTML pairs** for training OCR models to transform Arabic documents into structured HTML.
|
| 16 |
|
| 17 |
## Dataset Description
|
| 18 |
|
| 19 |
+
This dataset contains Arabic document images paired with semantic HTML output. It includes diverse document types and layouts for training image-to-HTML models.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## Usage
|
| 22 |
|
|
|
|
|
|
|
| 23 |
```python
|
| 24 |
from datasets import load_dataset
|
| 25 |
|
| 26 |
+
dataset = load_dataset("abdouuu/arabic-image2html")
|
| 27 |
```
|
| 28 |
|
| 29 |
+
## Dataset Stats
|
| 30 |
|
| 31 |
+
- **Total samples:** 28,044
|
| 32 |
+
- **Train:** 22,435 examples
|
| 33 |
+
- **Validation:** 2,804 examples
|
| 34 |
+
- **Test:** 2,805 examples
|
| 35 |
+
- **Language:** Arabic
|
| 36 |
+
- **Output format:** Semantic HTML
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## License
|
| 39 |
|
| 40 |
+
Apache 2.0
|
|
|
|
|
|
|
|
|