Dataset Card for Custom Text Dataset
Dataset Name
Custom Text Dataset for Summarization
Overview
This dataset contains articles and their corresponding summaries, created specifically for text summarization tasks.
It is designed to train and evaluate models that can generate concise summaries from longer pieces of text.
The dataset is based on publicly available news articles from various sources.
- Task: Text Summarization
- Language: English
- Number of samples: Approximately 10,000 articles with summaries
- Sources: News articles from online sources, including technology, politics, and health categories.
Composition
-
Columns:
article: Full text of the news article.
summary: A concise summary or highlights of the article.
-
Data types:
- Both columns are strings, where the article can be of arbitrary length and the summary is typically much shorter (1-3 sentences).
-
Dataset split:
- Training set: 8,000 samples
- Validation set: 1,000 samples
- Test set: 1,000 samples
Collection Process
The dataset was curated by scraping news articles from publicly available sources.
We selected a wide range of articles to cover various domains such as politics, technology, sports, and health.
After collection, articles were manually paired with summaries to ensure accuracy.
- Scraping tools used: BeautifulSoup, Selenium
- Date range: Articles were collected from 2019 to 2021.
Preprocessing
The dataset was preprocessed to clean and normalize the text data:
- Tokenization: All text was tokenized into sentences and words using
nltk.
- Lowercasing: All text was converted to lowercase for consistency.
- Removal of noise: Non-alphabetic characters, HTML tags, and URLs were removed.
- Summary trimming: Summaries longer than 3 sentences were shortened to focus on key points.
How to Use
To use the dataset for text summarization tasks, you can load it using popular data handling libraries such as pandas or datasets.
Here's an example of loading and using the dataset for a summarization task:
1import pandas as pd
2
3# Load the dataset from CSV
4df = pd.read_csv("path/to/custom_text_dataset.csv")
5
6# Display first few rows
7print(df.head())
8
9# Example usage for a text summarization model
10article = df['article'][0]
11summary = df['summary'][0]
12
13print("Article:", article)
14print("Summary:", summary)
Evaluation
The dataset was evaluated using automatic summarization metrics such as ROUGE and BLEU. Summarization models trained on this dataset were evaluated on a separate test set.
ROUGE-1: 43.0
ROUGE-2: 21.0
BLEU-4: 10.5
These scores indicate how well the generated summaries match the human-written summaries in the dataset.
Limitations
The dataset contains only English articles, so it is not applicable to non-English text summarization tasks.
Due to the focus on news articles, the model may not generalize well to other domains like legal or medical text.
Summaries may occasionally omit nuanced information due to manual summarization.
Ethical Considerations
Data bias: Articles were scraped from specific sources, which may introduce bias depending on the perspective of the original publisher.
Content accuracy: Summaries are human-written but may still contain errors or subjective interpretations of the articles.
Data privacy: All data was collected from publicly available sources, and no private or sensitive data was used in the dataset creation.
Use of dataset: The dataset should not be used to create misleading or false summaries that could misinform the public.