MohammadOthman/20-News-Groups
收藏Hugging Face2023-09-24 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/MohammadOthman/20-News-Groups
下载链接
链接失效反馈官方服务:
资源简介:
---
tags:
- text classification
- clustering
- newsgroups
license: unknown
size: 70 MB
language:
- en
description: >
The 20 Newsgroups dataset is a collection of approximately 20,000 newsgroup
documents, partitioned across 20 different newsgroups. It's widely used for
text classification and clustering experiments. The dataset offers three
versions: the original, a date-sorted version, and a version with only "From"
and "Subject" headers.
homepage: http://qwone.com/~jason/20Newsgroups/
task_categories:
- text-classification
- summarization
- question-answering
---
# 20 Newsgroups Dataset
## Introduction
The 20 Newsgroups dataset comprises roughly 20,000 documents from newsgroups, with an almost even distribution across 20 distinct newsgroups. Initially gathered by Ken Lang, this dataset has gained prominence in the machine learning community, particularly for text-related applications like classification and clustering.
## Dataset Structure
The dataset's organization is based on 20 different newsgroups, each representing a unique topic. While some of these newsgroups share similarities or are closely related, others are quite distinct from one another.
### List of Newsgroups:
- Computer Graphics
- Windows OS Miscellaneous
- IBM PC Hardware
- Mac Hardware
- Windows X
- Automobiles
- Motorcycles
- Baseball
- Hockey
- Cryptography
- Electronics
- Medicine
- Space
- Miscellaneous Sales
- Miscellaneous Politics
- Politics & Guns
- Middle East Politics
- Miscellaneous Religion
- Atheism
- Christianity
## Sample Entries
### Sample from `Windows X`
```
From: Bill.Kayser@delft.SGp.slb.COM (Bill Kayser)
Subject: Re: TeleUse, UIM/X, and C++
Article-I.D.: parsival.199304060629.AA00339
Organization: The Internet
Lines: 25
NNTP-Posting-Host: enterpoop.mit.edu
To: xpert@expo.lcs.mit.edu
Cc: Bill.Kayser@delft.sgp.slb.com
>
> Does anyone have any good ideas on how to integrate C++ code elegantly
> with TeleUse, UIM/X / Interface Architect generated code?
>
> Source would be great, but any suggestions are welcome.
It's my understanding that the next release of UIM/X, due out
last February :-) has full support for C++.
I use XDesigner which does not have the interpreter or UI meta languages
of these other tools but does fully support C++ code generation,
reusable templates via C++ classes which are generated, a variety of
other handy features for using C++ and layout functions in different
ways, and generates Motif 1.2 code (including drag 'n drop,
internationalization, etc.). Fits in quite nicely with Doug Young's
paradigm for C++/Motif.
Available in the US from VI Corp, in Europe from Imperial Software,
London (see FAQ for details).
Bill
________________________________________________________________________
Schlumberger Geco Prakla
kayser@delft.sgp.slb.com
```
### Sample from `Electronics`
```
From: baden@sys6626.bison.mb.ca (baden de bari)
Subject: Re: Jacob's Ladder
Organization: System 6626 BBS, Winnipeg Manitoba Canada
Lines: 36
g92m3062@alpha.ru.ac.za (Brad Meier) writes:
> Hi, I'm looking for a circuit, that is called a "Jacob's Ladder".
> This little box is usually seen in sci-fi movies. It consists of
> two curves of wire protruding into the air, with little blue sparks
> starting at their base (where the two wires are closer to each other),
> moving up the wires to the top, and ending in a small crackling noise.
>
> Could anyone supply me with the schematic for the innards of this box?
>
> Thanks in advance
> Mike
>
> (Please reply by email to g90k3853@alpha.ru.ac.za)
>
> --
> | / | | ~|~ /~~\ | | ~|~ /~~\ |~~\ /~~\ The KnightOrc
> |/ |\ | | | __ |__| | | | |__/ | g92m3062@hippo.ru.ac.za
> |\ | \| | | | | | | | | | | | "When it's over I'll go home,
> | \ | | _|_ \__/ | | | \__/ | | \__/ until then, I stay!" - Me
I'd like any accumulated information on this as well please.
Thanks.
_________________________________________
_____ |
| | | |
=========== | Baden de Bari |
| o o | | |
| ^ | | baden@sys6626.bison.ca |
| {-} | | baden@inqmind.bison.ca |
\_____/ | |
-----------------------------------------
```
## Data Availability
The dataset is bundled in `.tar.gz` format. Within each bundle, individual subdirectories represent a newsgroup. Every file within these subdirectories corresponds to a document posted in that specific newsgroup.
There are three primary versions of the dataset:
1. The original version, which remains unaltered.
2. A version sorted by date, which segregates the data into training (60%) and test (40%) sets. This version has removed duplicates and some headers for clarity.
3. A version that only retains the "From" and "Subject" headers, with duplicates removed.
For those seeking a more consistent benchmark, the date-sorted version is recommended. It offers a realistic split based on time and has removed any newsgroup-specific identifiers.
## Matlab/Octave Version
For users of Matlab or Octave, a processed variant of the date-sorted dataset is available. This version is structured as a sparse matrix and includes files like `train.data`, `train.label`, `test.data`, and more. Additionally, a vocabulary file is provided to help users understand the indexed data.
## Additional Information
For more details and the original dataset, you can refer to the [official website](http://qwone.com/~jason/20Newsgroups/).
---
license: cc-by-nc-4.0
---
tags:
- 文本分类
- 聚类
- 新闻组
license: 未知
size: 70 MB
language:
- 英语
description: >
20新闻组(20 Newsgroups)数据集是约20000篇新闻组文档的集合,被划分至20个不同的新闻组中。该数据集被广泛应用于文本分类与聚类实验,共提供三个版本:原始版本、按日期排序版本,以及仅保留“发件人(From)”和“主题(Subject)”头部信息的版本。
homepage: http://qwone.com/~jason/20Newsgroups/
task_categories:
- 文本分类
- 摘要生成
- 问答系统
---
# 20新闻组数据集
## 数据集简介
20新闻组数据集包含来自20个不同新闻组、分布近乎均匀的约20000篇文档。该数据集由肯·朗(Ken Lang)最初收集,现已在机器学习社区中广受关注,尤其适用于分类、聚类等文本相关应用。
## 数据集结构
该数据集按照20个不同的新闻组进行组织,每个新闻组对应一个独特的主题。其中部分新闻组主题相似或关联紧密,另一些则差异显著。
### 新闻组列表:
- 计算机图形学
- Windows操作系统杂谈
- IBM个人计算机硬件
- Mac硬件
- Windows X
- 汽车
- 摩托车
- 棒球
- 冰球
- 密码学
- 电子学
- 医学
- 太空探索
- 综合销售
- 综合政治
- 政治与枪械
- 中东政治
- 综合宗教
- 无神论
- 基督教
## 样本条目
### `Windows X` 板块样本
From: Bill.Kayser@delft.SGp.slb.COM (Bill Kayser)
Subject: Re: TeleUse, UIM/X, and C++
Article-I.D.: parsival.199304060629.AA00339
Organization: The Internet
Lines: 25
NNTP-Posting-Host: enterpoop.mit.edu
To: xpert@expo.lcs.mit.edu
Cc: Bill.Kayser@delft.sgp.slb.com
>
> Does anyone have any good ideas on how to integrate C++ code elegantly
> with TeleUse, UIM/X / Interface Architect generated code?
>
> Source would be great, but any suggestions are welcome.
It's my understanding that the next release of UIM/X, due out
last February :-) has full support for C++.
I use XDesigner which does not have the interpreter or UI meta languages
of these other tools but does fully support C++ code generation,
reusable templates via C++ classes which are generated, a variety of
other handy features for using C++ and layout functions in different
ways, and generates Motif 1.2 code (including drag 'n drop,
internationalization, etc.). Fits in quite nicely with Doug Young's
paradigm for C++/Motif.
Available in the US from VI Corp, in Europe from Imperial Software,
London (see FAQ for details).
Bill
________________________________________________________________________
Schlumberger Geco Prakla
kayser@delft.sgp.slb.com
### 电子学板块样本
From: baden@sys6626.bison.mb.ca (baden de bari)
Subject: Re: Jacob's Ladder
Organization: System 6626 BBS, Winnipeg Manitoba Canada
Lines: 36
g92m3062@alpha.ru.ac.za (Brad Meier) writes:
> Hi, I'm looking for a circuit, that is called a "Jacob's Ladder".
> This little box is usually seen in sci-fi movies. It consists of
> two curves of wire protruding into the air, with little blue sparks
> starting at their base (where the two wires are closer to each other),
> moving up the wires to the top, and ending in a small crackling noise.
>
> Could anyone supply me with the schematic for the innards of this box?
>
> Thanks in advance
> Mike
>
> (Please reply by email to g90k3853@alpha.ru.ac.za)
>
> --
> | / | | ~|~ /~~\ | | ~|~ /~~\ |~~\ /~~\ The KnightOrc
> |/ |\ | | | __ |__| | | | |__/ | g92m3062@hippo.ru.ac.za
> |\ | \| | | | | | | | | | | | "When it's over I'll go home,
> | \ | | _|_ \__/ | | | \__/ | | \__/ until then, I stay!" - Me
I'd like any accumulated information on this as well please.
Thanks.
_________________________________________
_____ |
| | | |
=========== | Baden de Bari |
| o o | | |
| ^ | | baden@sys6626.bison.ca |
| {-} | | baden@inqmind.bison.ca |
\_____/ | |
-----------------------------------------
## 数据可用性
该数据集以`.tar.gz`格式打包分发。每个打包文件内的子目录均对应一个新闻组,子目录下的每个文件则代表该新闻组内发布的一篇文档。
该数据集共有三个主要版本:
1. 原始版本:未经过任何修改的初始版本。
2. 按日期排序版本:将数据划分为训练集(60%)与测试集(40%),该版本已去除重复文档与部分头部信息以提升可读性。
3. 仅保留头部信息版本:仅留存“发件人(From)”与“主题(Subject)”头部信息,且已移除重复文档。
若需获取更具一致性的基准测试集,推荐使用按日期排序版本。该版本基于时间进行数据划分,且已移除所有新闻组专属标识符。
## Matlab/Octave适配版本
针对Matlab或Octave用户,我们提供了经过预处理的按日期排序版本数据集。该版本以稀疏矩阵的形式组织,包含`train.data`、`train.label`、`test.data`等文件,同时附带词汇表文件,便于使用者理解索引化后的数据内容。
## 补充信息
如需获取更多细节与原始数据集,请访问[官方网站](http://qwone.com/~jason/20Newsgroups/).
---
license: cc-by-nc-4.0
---
提供机构:
MohammadOthman
原始信息汇总
20 Newsgroups 数据集
简介
20 Newsgroups 数据集包含约 20,000 篇来自新闻组的文档,分布在 20 个不同的新闻组中。最初由 Ken Lang 收集,该数据集在机器学习社区中广泛用于文本分类和聚类等应用。
数据集结构
数据集根据 20 个不同的新闻组进行组织,每个新闻组代表一个独特的主题。一些新闻组之间存在相似性或紧密相关,而其他新闻组则截然不同。
新闻组列表:
- 计算机图形学
- Windows 操作系统杂项
- IBM PC 硬件
- Mac 硬件
- Windows X
- 汽车
- 摩托车
- 棒球
- 冰球
- 密码学
- 电子学
- 医学
- 太空
- 杂项销售
- 杂项政治
- 政治与枪支
- 中东政治
- 杂项宗教
- 无神论
- 基督教
数据可用性
数据集以 .tar.gz 格式打包。每个包中的单独子目录代表一个新闻组。这些子目录中的每个文件对应于在该特定新闻组中发布的文档。
数据集有三个主要版本:
- 原始版本,未经修改。
- 按日期排序的版本,将数据分为训练集(60%)和测试集(40%)。该版本删除了重复项和一些头信息以提高清晰度。
- 仅保留“From”和“Subject”头信息的版本,删除了重复项。
对于寻求一致基准的用户,建议使用按日期排序的版本。它提供了基于时间的实际分割,并删除了任何新闻组特定的标识符。
Matlab/Octave 版本
对于使用 Matlab 或 Octave 的用户,提供了按日期排序的数据集的处理版本。该版本结构为稀疏矩阵,并包含 train.data、train.label、test.data 等文件。此外,还提供了词汇文件以帮助用户理解索引数据。
搜集汇总
数据集介绍

构建方式
在自然语言处理领域,构建高质量文本数据集是推动算法发展的基石。20 Newsgroups数据集的构建源于对新闻组文档的系统性收集,涵盖了约20,000份文档,均匀分布于20个不同的新闻组主题。该数据集提供了三个版本:原始未处理版本保留了文档的完整结构;按日期排序版本则依据时间顺序将数据划分为训练集与测试集,并移除了重复项及部分冗余头部信息;精简版本仅保留“发件人”与“主题”头部,同样经过去重处理。这种分层设计使得数据集既能满足原始文本分析需求,又能为时序建模提供基准。
特点
作为文本分类与聚类研究的经典资源,20 Newsgroups数据集展现出鲜明的多主题特性。其内容覆盖计算机图形、硬件技术、体育运动、政治宗教等20个差异显著的领域,部分主题间存在语义关联,而另一些则相对独立,这种结构为模型区分细粒度类别提供了挑战。数据集文档格式统一,包含发件人、主题、正文等标准新闻组元数据,模拟了真实网络讨论环境。此外,按日期排序的版本引入了时间维度,支持更具现实意义的时序分割评估,增强了实验的严谨性与可复现性。
使用方法
在机器学习实践中,该数据集常被用于文本分类、聚类及信息检索等任务。研究者可依据实验目标选择相应版本:若需进行标准分类评估,推荐采用按日期排序的版本,其预设的训练-测试分割避免了时序泄露;若关注头部信息的影响,则可选用仅含“发件人”与“主题”的简化版本。对于Matlab或Octave用户,已处理的稀疏矩阵格式可直接加载,配套的词汇表文件辅助理解特征索引。使用时应遵循数据许可协议,并参考官方文档确保处理流程与基准设定一致,以保障实验结果的可靠性。
背景与挑战
背景概述
20 Newsgroups数据集由Ken Lang于上世纪九十年代初期构建,作为新闻组文档的经典汇编,该数据集收录了约两万份文档,均匀分布于二十个不同主题的新闻组中。其诞生正值互联网文本数据激增与机器学习技术萌芽交汇之际,旨在为自然语言处理领域提供标准化的文本分类与聚类研究基准。该数据集不仅推动了文本分类算法的发展,如支持向量机与朴素贝叶斯等模型的性能评估,更成为信息检索、主题建模等多个研究方向不可或缺的基础资源,深刻影响了后续大规模文本数据集的构建范式。
当前挑战
该数据集核心挑战在于解决多类别文本分类问题,其二十个新闻组主题间存在语义重叠与领域差异,例如‘政治’与‘枪支政治’类别的细微区分,要求模型具备高阶语义理解与歧义消解能力。构建过程中的挑战则体现于数据采集与预处理环节:新闻组文档包含大量非结构化文本、重复帖子及冗余头部信息,需通过去重、头部过滤与时间排序等操作确保数据纯净性与基准一致性;同时,保持原始语料的真实分布与时间演化特性,也为数据划分与版本管理带来了复杂性。
常用场景
经典使用场景
在自然语言处理领域,20 Newsgroups数据集作为文本分类与聚类研究的基准工具,其经典使用场景集中于监督学习与无监督学习的模型评估。研究者常利用该数据集训练分类器,如支持向量机或神经网络,以验证算法在区分20个不同新闻主题上的性能;同时,其文档的文本特征也适用于聚类分析,探索主题间的相似性与文档分组结构,为文本表示学习提供标准实验环境。
衍生相关工作
围绕该数据集,衍生了一系列经典研究工作,如基于朴素贝叶斯和最大熵的文本分类方法探索,以及潜在狄利克雷分配在主题建模中的应用。此外,深度学习兴起后,卷积神经网络和循环神经网络等模型在该数据集上的性能比较,进一步推动了文本表示学习的发展,为后续预训练语言模型如BERT的评估提供了重要参考基础。
数据集最近研究
最新研究方向
在自然语言处理领域,20 Newsgroups数据集作为经典文本分类基准,持续推动着前沿探索。当前研究聚焦于利用预训练语言模型如BERT和GPT系列,通过微调或提示学习提升跨新闻主题的细粒度分类性能,同时结合对比学习与领域自适应技术,以应对数据分布偏移和领域泛化挑战。热点事件包括该数据集在少样本学习与零样本分类任务中的广泛应用,特别是在模拟现实场景中新闻流动态演化方面,为社交媒体内容分析与虚假信息检测提供了重要参考。这些进展不仅深化了对文本表征的理解,也强化了模型在开放域环境中的鲁棒性与可解释性,对信息检索与知识组织系统的优化具有深远意义。
以上内容由遇见数据集搜集并总结生成



