benchaffe/shakespeare-lines
Shakespeare Lines Dataset The Shakespeare Lines dataset contains cleaned, line-by-line excerpts from the Complete Works of William Shakespeare. This dataset is curated for use in training and fine-tuning language models on literary or archaic English. It has been stripped of metadata, scene directions, headers/footers, and other non-dialogue filler commonly found in public domain eBooks. Dataset Structure Each example contains: text: A single line of dialogue… See the full description on the dataset page: https://huggingface.co/datasets/benchaffe/shakespeare-lines.
Shakespeare Lines Dataset
The Shakespeare Lines dataset contains cleaned, line-by-line excerpts from the Complete Works of William Shakespeare. This dataset is curated for use in training and fine-tuning language models on literary or archaic English. It has been stripped of metadata, scene directions, headers/footers, and other non-dialogue filler commonly found in public domain eBooks.
Dataset Structure
Each example contains:
text: A single line of dialogue from one of Shakespeare’s plays or sonnets.
Example:
{
"text": "To be, or not to be: that is the question."
}Source
The raw texts were sourced from Project Gutenberg, which provides public domain books. The dataset was manually cleaned to remove:
- Stage directions (e.g., [Enter Romeo], [Exit.])
- Scene headers (ACT I, SCENE II)
- Line numbers and roman numerals
- Table of contents and licensing info
Usage
from datasets import load_dataset
dataset = load_dataset("benchaffe/shakespeare-lines")
print(dataset[0])Limitations
The dataset does not preserve scene or speaker metadata.<br> Some filtering may accidentally remove legitimate content (e.g., short lines in all caps).<br> Lines are context-independent unless reassembled manually.<br>
Source
Project Gutenberg: (https://www.gutenberg.org/)
