File size: 3,206 Bytes
8f0cf31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e8b2a7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
dataset_info:
  features:
  - name: post
    dtype: string
  - name: newsgroup
    dtype: string
  - name: embedding
    sequence: float64
  - name: map
    sequence: float64
  splits:
  - name: train
    num_bytes: 129296327
    num_examples: 18170
  download_size: 102808058
  dataset_size: 129296327
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

# Dataset Card for 20-Newsgroups Embedded

This provides a subset of 20-Newsgroup posts, along with sentence embeddings, and a dimension reduced 2D data map. 
This provides a basic setup for experimentation with various neural topic modelling approaches.

## Dataset Details

### Dataset Description

This is a dataset containing posts from the classic 20-Newsgroups dataset, along with sentence embeddings, and a dimension reduced 2D data map.

Per the [source](http://qwone.com/~jason/20Newsgroups/):
> The 20-Newsgroups dataset is a collection of approximately 20,000 newsgroup documents, partitioned (nearly) evenly across 20 different newsgroups. 
> As far as in known it was originally collected by Ken Lang, probably for his Newsweeder: Learning to filter netnews paper.
> The 20 newsgroups collection has become a popular data set for experiments in text applications of machine learning techniques, 
> such as text classification and text clustering.

This has then been enriched with sentence embeddings via sentence-transformers using the `all-mpnet-base-v2` model. Further enrichment is
provided in the form of a 2D representation of the sentence embeddings generated using UMAP.

- **Curated by:** Leland McInnes
- **Language(s) (NLP):** English
- **License:** Public Domain

### Dataset Sources

The post and newsgroup data was collected using the `sckit-learn` function `fetch_20newsgroups` and then processed to exclude very short
and excessively long posts in the following manner:

```python
newsgroups = sklearn.datasets.fetch_20newsgroups(subset="all", remove=("headers", "footers", "quotes"))
useable_content = np.asarray([len(x) > 8 and len(x) < 16384 for x in newsgroups.data])
documents = [
    doc
    for doc, worth_keeping in zip(newsgroups.data, useable_content)
    if worth_keeping
]
newsgroup_categories = [
    newsgroups.target_names[newsgroup_id]
    for newsgroup_id, worth_keeping in zip(newsgroups.target, useable_content)
    if worth_keeping
]
```

- **Repository:** The original source datasets can be found at [http://qwone.com/~jason/20Newsgroups/](http://qwone.com/~jason/20Newsgroups/)

## Uses

This datasets is intended to be used for simple experiments and demonstrations of topic modelling and related tasks.


#### Personal and Sensitive Information

This data may contain personal information that was posted publicly to NNTP servers in the mid 1990's. It is not believed to contain 
any senstive information.

## Bias, Risks, and Limitations

This dataset is a product of public discussion forums in the 1990s. As such it contains debate, potentially inflammatory and/or
derogatory language, etc. It does not provide a representative sampling of opinion from the era. This data should only be used
for experiments or demonstration and educational purposes.