1ou2/fr_dumas_chapters
Gutenberg Chapters Dataset This dataset contains chapters from french books in the Project Gutenberg collection. Each entry in the dataset represents a single chapter from a book. All books in this dataset were written or edited by Alexandre Dumas. Dataset Structure Each entry in the dataset contains: metadata: Information about the source book including: file_name: Original file name title: Book title author: Book author release_date: Release date of the book… See the full description on the dataset page: https://huggingface.co/datasets/1ou2/fr_dumas_chapters.
Gutenberg Chapters Dataset
This dataset contains chapters from french books in the Project Gutenberg collection. Each entry in the dataset represents a single chapter from a book. All books in this dataset were written or edited by Alexandre Dumas.
Dataset Structure
Each entry in the dataset contains:
- metadata: Information about the source book including:
file_name: Original file nametitle: Book titleauthor: Book authorrelease_date: Release date of the booklanguage: Language of the bookencoding: Character encoding of the original file
- chapter_title: The title of the chapter (e.g., "CHAPITRE I" or Roman numerals)
- text: The full text content of the chapter
Usage
You can load this dataset using the Hugging Face datasets library:
from datasets import load_dataset
dataset = load_dataset("1ou2/fr_dumas_chapters")
# Access the first example
example = dataset['train'][0]
print(f"Chapter: {example['chapter_title']}")
print(f"Book: {example['metadata']['title']} by {example['metadata']['author']}")
print(f"Text preview: {example['text'][:200]}...")Dataset Creation
This dataset was created by:
- Collecting text files from Project Gutenberg
- Preprocessing to remove headers and footers. Fix formatting issues (-- converted to —, _ removed, and fix carriage returns)
- Identifying chapter boundaries using pattern matching
- Extracting metadata from the original files
- Saving each chapter as a separate entry in JSONL format
License
This dataset contains works from Project Gutenberg. Project Gutenberg books are free and in the public domain in the United States. Please check the copyright laws in your country before using this dataset.
