| --- |
| license: mit |
| task_categories: |
| - text-generation |
| - question-answering |
| language: |
| - en |
| tags: |
| - pdf2dataset |
| - ocr |
| - chunked |
| size_categories: |
| - n<1K |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-* |
| dataset_info: |
| features: |
| - name: chunk_id |
| dtype: string |
| - name: text |
| dtype: string |
| - name: text_clean |
| dtype: string |
| - name: chapter |
| dtype: string |
| - name: section |
| dtype: string |
| - name: subsection |
| dtype: string |
| - name: images |
| list: image |
| - name: image_refs |
| list: string |
| - name: num_images |
| dtype: int64 |
| - name: has_images |
| dtype: bool |
| - name: source_filename |
| dtype: string |
| - name: start_index |
| dtype: int64 |
| - name: char_count |
| dtype: int64 |
| splits: |
| - name: train |
| num_bytes: 26302876 |
| num_examples: 419 |
| download_size: 25996981 |
| dataset_size: 26302876 |
| --- |
| |
| # EmpiresOfMedievalWestAfrica |
|
|
| Dataset created with [PDF2Dataset](https://github.com/svngoku/PDF2Dataset) -- OCR + structure-aware chunking pipeline. |
|
|
| ## Dataset Summary |
|
|
| | Metric | Value | |
| |---|---| |
| | Total chunks | 419 | |
| | Avg chars/chunk | 665 | |
| | Avg images/chunk | 0.10 | |
| | Source files | 1 | |
| | Duplicates removed | 0 | |
| | Quality filtered | 4 | |
|
|
| ## Schema |
|
|
| | Column | Type | Description | |
| |---|---|---| |
| | `chunk_id` | `string` | Unique identifier: `filename_chunk_N` | |
| | `text` | `string` | Raw markdown chunk with image refs | |
| | `text_clean` | `string` | Cleaned text without markdown formatting | |
| | `chapter` | `string` | H1 header active at chunk position | |
| | `section` | `string` | H2 header active at chunk position | |
| | `subsection` | `string` | H3+ header active at chunk position | |
| | `images` | `list[string]` | Base64 image data for images in chunk | |
| | `image_refs` | `list[string]` | Image reference IDs in chunk text | |
| | `num_images` | `int` | Number of images in chunk | |
| | `has_images` | `bool` | Whether chunk contains images | |
| | `source_filename` | `string` | Original source file name | |
| | `start_index` | `int` | Character offset in source document | |
| | `char_count` | `int` | Character count of chunk text | |
|
|
| ## Source Files |
|
|
| | File | Chunks | |
| |---|---| |
| | `david_c._conrad_empires_of_medieval_west_africabook4me.org_.pdf` | 419 | |
|
|
| ## Document Structure |
|
|
| Chapters found in the source documents: |
|
|
| - A Changeable King |
| - A Mix of Cultures |
| - A World Famous Arma |
| - Age Grade Societies |
| - Askiya Muhammad the Great |
| - BIBLIOGRAPHY |
| - CONNECTIONS |
| - CONTENTS |
| - Empires of Medieval West Africa |
| - Epilogue |
| - Ethnic Groups of the Ghana, Mali, and Songhay Empires |
| - HISTORY |
| - INDEX |
| - Introduction |
| - Making the Best of Life |
| - Mande Social Organization |
| - Mansa Musa the Great |
| - Mansa Musa's Pilgrimage |
| - Modern Mali |
| - Money Cowries |
| - Moroccan Firearms |
| - Muhammad and the Islamic Empire |
| - Other Influences |
| - RESOURCES: Books |
| - RESOURCES: Web Sites |
| - SOCIETY AND CULTURE |
| - SOME MALI BASICS |
| - Salt of the Sahara |
| - Secret Sites |
| - Sii Ali's Last Campaigns |
| - ... and 16 more |
|
|
| ## Pipeline |
|
|
| This dataset was processed through the PDF2Dataset pipeline: |
|
|
| 1. **OCR** -- Mistral OCR extracts text and images from PDF/image files |
| 2. **Chunking** -- Structure-aware recursive splitting preserves document hierarchy |
| 3. **Validation** -- Schema validation ensures every chunk has required fields |
| 4. **Deduplication** -- Content-hash based dedup removes identical chunks |
| 5. **Quality Filtering** -- Removes empty, too-short, or malformed chunks |
|
|