Skip to contents

A 100-row subset of the AG News Topic Classification dataset consisting of 25 documents from each of the four classes (World, Sports, Business, Sci/Tech). The sample is intended for quick demonstrations and tests without requiring the full external dataset.

Usage

data(ag_news_sample)

Format

A data frame with 100 rows and 3 character columns:

class

News topic label ("World", "Sports", "Business", or "Sci/Tech").

title

Headline of the news article.

description

Short description for the article.

Source

Zhang, X., Zhao, J., & LeCun, Y. (2015). "Character-level Convolutional Networks for Text Classification." arXiv:1509.01626. Original data distributed via the AG News Topic Classification dataset.

Details

The sample was obtained from textdata::dataset_ag_news() (Zhang et al., 2015) using a fixed random seed to ensure reproducibility. It is provided solely for illustrative purposes.

See also

[textdata::dataset_ag_news()]