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.
data(ag_news_sample)A data frame with 100 rows and 3 character columns:
News topic label ("World", "Sports", "Business", or "Sci/Tech").
Headline of the news article.
Short description for the article.
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.
[textdata::dataset_ag_news()]