etextno int64 1 16.2k | book_title stringlengths 1 620 | author stringlengths 4 270 ⌀ | issued stringdate 1971-12-01 00:00:00 2018-10-28 00:00:00 | context stringlengths 3 29M |
|---|---|---|---|---|
1 | The Declaration of Independence of the United States of America | Jefferson, Thomas | 1971-12-01 | one file, with one header for the entire file. This is to keep
the overhead down, and in response to requests from Gopher site
keeper to eliminate as much of the headers as possible.
However, for legal and financial reasons, we must request these
headers be left at the beginning of each file that is posted in
donatio... |
2 | The United States Bill of Rights
The Ten Original Amendments to the Constitution of the United States | United States | 1972-12-01 | December, 1972 [Etext #2]
We apologize for the fact that the legal small print is longer,
and more complicated, than the Etext itself, our legal beagles,
of whom there are now a half dozen or so, insist this must be a
from the rest of the legal beagles out there. The US has twice
as many lawyers as the rest of the ... |
3 | John F. Kennedy's Inaugural Address | Kennedy, John F. (John Fitzgerald) | 1973-11-01 | JFK's Inaugural Address, January 20, 1961, 12:11 EST
We observe today not a victory of party but a celebration of freedom. . .
symbolizing an end as well as a beginning. . .signifying renewal
as well as change for I have sworn before you and Almighty God
the same solemn oath our forbears prescribed nearly a century
a... |
4 | Lincoln's Gettysburg Address
Given November 19, 1863 on the battlefield near Gettysburg, Pennsylvania, USA | Lincoln, Abraham | 1973-11-01 | December, 1974 [Etext #4]
We apologize for the fact that the legal small print is longer,
and more complicated, than the Etext itself, our legal beagles,
of whom there are now a half dozen or so, insist this must be a
from the rest of the legal beagles out there. The US has twice
as many lawyers as the rest of the ... |
5 | The United States Constitution | United States | 1975-12-01 | 1970's were produced in ALL CAPS, no lower case. The
computers we used then didn't have lower case at all.
The following edition of The Consitution of the United States of America
has been based on many hours of study of a variety of editions, and will
include certain variant spellings, punctuation, and captializatio... |
6 | Give Me Liberty or Give Me Death | Henry, Patrick | 1976-12-01 | December, 1975 [Etext #6]
[Date last updated: May 5, 2005]
Officially released in December 1975, unofficially released for
the 200th anniversary of the speech by Patrick Henry before the
"House" as he referred to it. [Which was the Virgina Provincial
Convention, March 23, 1775]
We apologize for the fact that the leg... |
7 | The Mayflower Compact | null | 1977-12-01 | The Mayflower Compact
November 11, 1620 [This was November 21, old style calendar]
In the name of God, Amen. We, whose names are underwritten, the Loyal
Subjects of our dread Sovereigne Lord, King James, by the Grace of God,
of Great Britaine, France, and Ireland, King, Defender of the Faith,
&c.
Having undertaken... |
8 | Abraham Lincoln's Second Inaugural Address | Lincoln, Abraham | 1978-12-01 | 4, 1865, by Abraham Lincoln
This eBook is for the use of anyone anywhere at no cost and with
almost no restrictions whatsoever. You may copy it, give it away or
Title: Lincoln's Second Inaugural Address, March 4, 1865
Author: Abraham Lincoln
Posting Date: January 24, 2015 [EBook #8]
Release Date: December, 1978
... |
9 | Abraham Lincoln's First Inaugural Address | Lincoln, Abraham | 1979-12-01 | Lincoln’s First Inaugural Address
March 4, 1861
Fellow citizens of the United States: in compliance with a custom as
old as the government itself, I appear before you to address you
briefly and to take, in your presence, the oath prescribed by the
Constitution of the United States, to be taken by the President “befo... |
10 | The King James Version of the Bible | null | 1989-08-01 | "The Old Testament of the King James Version of the Bible\nThe First Book of Moses: Called Genesis\n(...TRUNCATED) |
Gutenberg-BookCorpus-Cleaned-Data-English
This dataset is been cleaned and preprocessed using Gutenberg_English_Preprocessor class method (given below) from preference Kaggle dataset 75,000+ Gutenberg Books and Metadata 2025. This dataset is only specialisation for english contented with rights as "Public domain in the USA" hence you can free used it anywhere. Following reference metadata of Gutenberg is also available and downloaded it using following CLI command below :-
pip install kaggle
kaggle kernels output lokeshparab/gutenberg-metadata-downloader -p /path/to/dest
About Project Gutenberg
Project Gutenberg is a digital library that hosts over 75,000 free eBooks. Users can choose among EPUB, Kindle, and plain text formats, download them, or read them online. The library primarily focuses on older literary works whose U.S. copyright has expired. Thousands of volunteers have digitized and meticulously proofread the eBooks for readers to enjoy.
Dataset Details
| Column | Description |
|---|---|
| etextno | Unique identifier for each book. |
| book_title | Title of the book. |
| Authors | Author(s) of the respective book. |
| Issued | Date when the book was published or added to the collection. |
| Context | Cleaned and preprocessed the plain text version in UTF-8 encoding. |
Gutenberg English Preprocessor (Methodolody)
The Gutenberg English Preprocessor is designed to clean and preprocess text data from Project Gutenberg files by removing unwanted patterns such as special markers, Gutenberg-specific sentences, and decorative text blocks.
Notebook Reference :- Click here
Following Features :-
- Removes Blocks Enclosed in
=Symbols — Eliminates text sections framed by lines of=symbols, often found in decorative headers or footers. - Removes Gutenberg-Specific Sentences — Filters out sentences containing the term "Gutenberg" in any case (uppercase, lowercase, or mixed).
- Removes Small Print Notices — Identifies and removes text segments marked as "Small Print" content.
- Trims Text Between Project Gutenberg Start/End Markers — Extracts content enclosed between
*** START OF THE PROJECT GUTENBERG...and*** END OF THE PROJECT GUTENBERG.... - Removes Inline and Block Patterns Marked with
*,**,***, etc. — Effectively cleans unwanted text patterns that are enclosed in stars.
- Removes Blocks Enclosed in
Class function :-
class Gutenberg_English_Preprocessor: """ A text preprocessor designed to clean Project Gutenberg text data. This class removes unwanted patterns like: - Blocks enclosed in '=' lines - Sentences containing "Gutenberg" (case insensitive) - "Small Print" sections from Project Gutenberg files - Blocks enclosed in '*' patterns """ def __init__(self, text: str): """ Initializes the Gutenberg_English_Preprocessor with the provided text. Args: text (str): The text content to be processed. """ self.text = text def remove_equal_sign_blocks(self): """ Removes blocks of text enclosed by lines containing only '=' symbols. Example: ======================== This content will be removed. ======================== """ equal_block_pattern = r'^\s*=+\s*\n(?:.*?\n)*?\s*=+\s*$' self.text = re.sub(equal_block_pattern, '', self.text, flags=re.MULTILINE) self.text = self.text.strip() def remove_gutenberg_sentences(self): """ Removes sentences that contain the word "Gutenberg" in any case format. Example: "This is a Project Gutenberg text." → Removed "Random sentence without Gutenberg." → Removed "This is a normal sentence." → Retained """ gutenberg_pattern = r'^[^\n]*\bgutenberg\b[^\n]*\n?' self.text = re.sub(gutenberg_pattern, '', self.text, flags=re.IGNORECASE | re.MULTILINE) self.text = self.text.strip() def remove_small_print(self): """ Removes Project Gutenberg's "Small Print" sections. These sections often contain legal disclaimers and metadata. """ pattern1 = r'\*\*\*START\*\*THE SMALL PRINT.*?\*END\*THE SMALL PRINT!' pattern2 = r'\*\*\*START\*\*THE SMALL PRINT.*?\*END THE SMALL PRINT' self.text = re.sub(pattern1, '', self.text, flags=re.DOTALL) self.text = re.sub(pattern2, '', self.text, flags=re.DOTALL) self.text = self.text.strip() def start_end(self): """ Trims the text to retain only the content between: - "*** START OF THE PROJECT GUTENBERG..." - "*** END OF THE PROJECT GUTENBERG..." Ensures non-essential content outside these markers is excluded. """ str_str = "*** START OF THE PROJECT GUTENBERG" end_str = "*** END OF THE PROJECT GUTENBERG" start_idx = self.text.find(str_str) end_idx = self.text.find(end_str) if start_idx != -1 and end_idx != -1: self.text = self.text[start_idx:end_idx] def remove_patterns(self): """ Removes patterns enclosed by '*' characters, such as: - Inline patterns like "* text *", "** text **", etc. - Standalone patterns and multi-line blocks enclosed in '*' """ star_pattern = r'^\s*\*{1,4}.*?\*{1,4}\s*$' self.text = re.sub(star_pattern, '', self.text, flags=re.MULTILINE | re.DOTALL) self.text = self.text.strip() def preprocess(self): """ Executes the full text preprocessing pipeline by calling all individual cleaning functions in the desired sequence. Returns: str: The cleaned and processed text content. """ self.start_end() self.remove_small_print() self.remove_patterns() self.remove_equal_sign_blocks() self.remove_gutenberg_sentences() return self.textExecution Steps
preprocessor = Gutenberg_English_Preprocessor(text="Here contents Gutenberg text") clean_text = preprocessor.preprocess()
Usage
This dataset can be effectively applied to various Natural Language Processing (NLP) and Machine Learning (ML) tasks, such as:
- Creating Embeddings: Extract meaningful vector representations for search engines and recommendation systems.
- Training Transformers: Utilize the dataset to train transformer models like BERT, GPT, etc., for improved language understanding and generation.
- Language Model Fine-tuning: Fine-tune LLMs (Large Language Models) to enhance performance in specific domains or tasks.
- Text Analysis and Classification: Conduct topic modeling, sentiment analysis, or language detection.
- Information Retrieval: Develop powerful search systems by indexing the dataset with metadata attributes.
- Downloads last month
- 169