--- dataset_info: features: - name: text dtype: string - name: book_title dtype: string - name: author dtype: string - name: category dtype: string - name: section_title dtype: string - name: chars dtype: int64 - name: book_id dtype: string splits: - name: train num_bytes: ~ num_examples: 47546 - name: validation num_bytes: ~ num_examples: 2642 - name: test num_bytes: ~ num_examples: 2642 download_size: ~ dataset_size: ~ --- # Hindawi Arabic Books — Sections Dataset A cleaned, section-level dataset of Arabic books from [Hindawi.org](https://www.hindawi.org), prepared for NLP training and research. ## Dataset Description - **Language:** Arabic - **Level:** Section-level (each row = one book section) - **Text format:** Single-line, cleaned Arabic text - **Total sections:** 52,830 - **Total books:** 3,265 - **Total characters:** 843,868,321 - **Mean chars / section:** 15,973.3 - **Median chars / section:** 7,915.0 - **Min chars / section:** 250 - **Max chars / section:** 723,964 - **Sections < 500 chars:** 1,593 (3.02%) ## Source Original books scraped from [Hindawi.org](https://www.hindawi.org), a non-profit foundation providing free Arabic books. The dataset covers categories including literature, philosophy, history, science, psychology, and more. ## Cleaning Pipeline 1. **Scraped** book content section-by-section from Hindawi.org 2. **Removed English / Latin** text and characters 3. **Removed tashkeel** (Arabic diacritics: َ ُ ِ ْ ّ etc.) 4. **Removed tatweel** (kashida: ـ) 5. **Normalized Arabic letters:** - `أ` `إ` `آ` `ٱ` → `ا` - `ى` → `ي` - `ة` → `ه` 6. **Deduplicated** exact duplicate lines and near-duplicate paragraphs (فرهس) 7. **Replaced Eastern Arabic numerals** (`٠١٢٣٤٥٦٧٨٩` and `۰۱۲۳۴۵۶۷۸۹`) with Western `0-9` 8. **Collapsed** each section to a single line (newlines → spaces) 9. **Filtered** sections with fewer than 250 characters 10. **Cross-book deduplication:** removed 342 sections that were >95% similar to sections in other books (3,253 duplicate pairs found, mean similarity 99.79%) ## Splits | Split | Rows | Percentage | |------------|---------|------------| | train | 47,546 | 90.0% | | validation | 2,642 | 5.0% | | test | 2,642 | 5.0% | Split was done with `train_test_split` from scikit-learn with `random_state=42` and `shuffle=True`. ## Columns | Column | Type | Description | |--------|------|-------------| | `text` | string | Cleaned Arabic text of the section (single line) | | `book_title` | string | Title of the parent book | | `author` | string | Author name | | `category` | string | Book category (e.g., أدب, فلسفة, تاريخ, علم نفس) | | `section_title` | string | Title of the section within the book | | `chars` | int64 | Character count of the section text | | `book_id` | string | Hindawi book ID (when available) | ## Category Distribution (top 10) | Category | Sections | |----------|----------| | أدب | 10,441 | | تاريخ | 6,383 | | روايات | 6,373 | | فلسفة | 4,424 | | شعر | 3,947 | | سير الأعلام | 2,554 | | علوم اجتماعية | 2,229 | | علوم | 1,916 | | نقد أدبي | 1,903 | | سياسة | 1,723 | ## Usage Example ```python from datasets import load_dataset dataset = load_dataset("your-username/hindawi-arabic-sections") # Access train split print(dataset["train"][0]["text"][:200]) # Filter by category history = dataset["train"].filter(lambda x: x["category"] == "تاريخ") ``` ## Loading with Pandas ```python import pandas as pd train = pd.read_parquet("train.parquet") print(train.head()) ``` ## Statistics ``` Total sections: 52,830 Total books: 3,265 Total characters: 843,868,321 Mean chars/section: 15,973.3 Median chars/section: 7,915.0 Min chars: 250 Max chars: 723,964 Std dev: ~26,000 ``` ## Citation ```bibtex @dataset{hindawi_arabic_sections, title = {Hindawi Arabic Books — Sections Dataset}, year = {2026}, publisher = {Hindawi Foundation}, url = {https://www.hindawi.org} } ``` ## License The original books are made available by [Hindawi Foundation](https://www.hindawi.org) under their free-access agreement. This dataset is a derived work prepared for research and educational purposes. ## Acknowledgments - [Hindawi Foundation](https://www.hindawi.org) for making these books freely available - This dataset was prepared using automated scraping and cleaning tools