File size: 12,706 Bytes
b7065ae
58b8c16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7065ae
58b8c16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f2e1d62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58b8c16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c841396
58b8c16
 
 
 
 
c841396
58b8c16
 
 
 
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
---
language:
  - en
license: cc-by-4.0
task_categories:
  - text-classification
tags:
  - topic-modeling
  - topic-modelling
  - text-clustering
  - document-representation
size_categories:
  - 10K<n<100K
configs:
  - config_name: noow
    default: true
    data_files:
      - split: corpus
        path: data/noow.csv
  - config_name: bow
    data_files:
      - split: corpus
        path: data/bow.csv
---

# WOS-46985

This TopicNet preparation contains 46,972 retained English scientific abstracts from the 46,985-row WOS-46985 source, with 134 observed global classes and 7 parent codes. It provides raw abstracts, two normalized text representations, labels, the original numeric hierarchy and generated research splits. It is a derived preparation of the [Web of Science dataset, version 6](https://data.mendeley.com/datasets/9rw3vkcfy4/6), DOI [10.17632/9rw3vkcfy4.6](https://doi.org/10.17632/9rw3vkcfy4.6).

## Population, labels and splits

Raw duplicate identity is source abstract text after casefold and whitespace collapse. Raw duplicates are checked first, then identical ordered lemma sequences: a same-class group keeps its smallest document ID, while a group with conflicting global classes is quarantined in full. Documents with empty normalized sequences are removed. The removal counts are 0 same-class raw duplicates, 0 rows in raw conflicts, 13 same-class lemma duplicates, 0 rows in lemma conflicts and 0 empty normalized documents; 13 rows are removed in total.

Near duplicates are grouped, not deleted: body five-token shingle Jaccard similarity ≥0.9 identifies 18 pairs among retained documents. Families combine the raw/lemma duplicate relations and these near-duplicate links. Each family stays in one split. Iterative multilabel stratification uses seeds 20260824 and 20260825, targeting approximately 60%/20%/20%. These are newly generated research splits, not official source train/test splits: **fit 28,181, calibration 9,366, validation 9,425**. They are disjoint and exhaustive. The Hugging Face split `corpus` contains every retained document; it is not `fit`.

`Y.txt` supplies the authoritative global class, stored as a string in `data/labels.json`. `YL1.txt` supplies the parent code and `YL2.txt` the local child code, which must be interpreted together with its parent. The observed source codes have 134 global classes and seven parent codes. The source hierarchy is inconsistent: global classes 40 and 43 each occur under parents 2 and 5, and global class 76 occurs under parents 4 and 5. These source values are preserved. No class names are inferred and numeric classes are not assumed comparable across WOS subsets.

Retained class counts:

| Global class | Documents |
| --- | ---: |
| 0 | 432 |
| 1 | 398 |
| 2 | 445 |
| 3 | 387 |
| 4 | 379 |
| 5 | 412 |
| 6 | 415 |
| 7 | 443 |
| 8 | 377 |
| 9 | 416 |
| 10 | 403 |
| 11 | 43 |
| 12 | 402 |
| 13 | 379 |
| 14 | 425 |
| 15 | 392 |
| 16 | 365 |
| 17 | 447 |
| 18 | 44 |
| 19 | 375 |
| 20 | 54 |
| 21 | 426 |
| 22 | 417 |
| 23 | 392 |
| 24 | 413 |
| 25 | 646 |
| 26 | 378 |
| 27 | 148 |
| 28 | 276 |
| 29 | 274 |
| 30 | 344 |
| 31 | 429 |
| 32 | 419 |
| 33 | 389 |
| 34 | 397 |
| 35 | 391 |
| 36 | 394 |
| 37 | 387 |
| 38 | 350 |
| 39 | 387 |
| 40 | 510 |
| 41 | 376 |
| 42 | 365 |
| 43 | 373 |
| 44 | 368 |
| 45 | 296 |
| 46 | 389 |
| 47 | 404 |
| 48 | 395 |
| 49 | 362 |
| 50 | 416 |
| 51 | 360 |
| 52 | 371 |
| 53 | 402 |
| 54 | 346 |
| 55 | 420 |
| 56 | 386 |
| 57 | 387 |
| 58 | 361 |
| 59 | 289 |
| 60 | 335 |
| 61 | 410 |
| 62 | 423 |
| 63 | 384 |
| 64 | 441 |
| 65 | 447 |
| 66 | 395 |
| 67 | 148 |
| 68 | 418 |
| 69 | 384 |
| 70 | 412 |
| 71 | 373 |
| 72 | 309 |
| 73 | 357 |
| 74 | 368 |
| 75 | 321 |
| 76 | 264 |
| 77 | 317 |
| 78 | 262 |
| 79 | 294 |
| 80 | 309 |
| 81 | 339 |
| 82 | 260 |
| 83 | 335 |
| 84 | 350 |
| 85 | 198 |
| 86 | 237 |
| 87 | 353 |
| 88 | 327 |
| 89 | 97 |
| 90 | 290 |
| 91 | 222 |
| 92 | 372 |
| 93 | 341 |
| 94 | 129 |
| 95 | 291 |
| 96 | 288 |
| 97 | 182 |
| 98 | 358 |
| 99 | 315 |
| 100 | 246 |
| 101 | 336 |
| 102 | 90 |
| 103 | 305 |
| 104 | 267 |
| 105 | 254 |
| 106 | 371 |
| 107 | 178 |
| 108 | 253 |
| 109 | 197 |
| 110 | 359 |
| 111 | 301 |
| 112 | 320 |
| 113 | 339 |
| 114 | 343 |
| 115 | 298 |
| 116 | 148 |
| 117 | 128 |
| 118 | 202 |
| 119 | 188 |
| 120 | 118 |
| 121 | 257 |
| 122 | 365 |
| 123 | 142 |
| 124 | 361 |
| 125 | 746 |
| 126 | 566 |
| 127 | 622 |
| 128 | 652 |
| 129 | 566 |
| 130 | 576 |
| 131 | 749 |
| 132 | 699 |
| 133 | 509 |

## Representations and preprocessing

The aligned source files are `WOS46985/X.txt`, `Y.txt`, `YL1.txt` and `YL2.txt` in `WebOfScience.zip`. Stable IDs are `wos46985_<six-digit-zero-based-source-row>`. `raw_text` is the complete source `X.txt` line without its line terminator. There is no title field.

Both UTF-8 CSV files have exactly `id,raw_text,vw_text` columns and lexicographically ordered IDs. The VW string begins with the document ID and contains only the `|@word` namespace; labels are separate metadata. In `noow`, normalized token occurrences retain their order. In `bow`, the same tokens are represented as `token:count` with lexicographically sorted tokens. Neither representation truncates the prepared token sequence.

NOOW means occurrence order after normalization, not original or reversible prose. English preprocessing uses Python 3.11.15, NLTK 3.9.2 and NLTK-data commit `550b6625bcef1f2abff2ff770a5a0d272c9c6b2a`: WordPunctTokenizer, lowercase, lowercased input token length at least 2 before POS tagging and lemmatization, `averaged_perceptron_tagger_eng`, WordNet POS mapping J/V/N/R with noun fallback, English stopword removal and `lemma.isalpha()` filtering. Output lemmas are not filtered by length and can contain one character. Names are not masked. Near-duplicate shingles use lowercased WordPunct body tokens of length at least two containing letters only.

## Reproduce from source

The shared standalone code is in the [SciNews preprocessing folder](https://huggingface.co/datasets/TopicNet/SciNews/tree/main/preprocessing). Follow its [setup and code-download instructions](https://huggingface.co/datasets/TopicNet/SciNews/blob/main/preprocessing/README.md) to download only that folder at a full commit revision, create the locked Linux x86-64 environment with Python 3.11.15, and record a full server build and verification. Access follows the SciNews repository's permissions. No parent project checkout, BigARTM or TopicNet installation is needed.

From the directory containing the downloaded `preprocessing/` folder, choose writable source storage and fresh output and scratch paths. First obtain the original `ReadMe.txt` from the [official version 6 release](https://data.mendeley.com/datasets/9rw3vkcfy4/6) and place it at `/path/to/sources/wos/ReadMe.txt`, preserving its exact bytes. Its required size and SHA-256 are listed in the shared instructions and checked by the command:

```bash
python preprocessing/prepare.py download --dataset wos-46985 --sources-dir /path/to/sources
python preprocessing/prepare.py build --dataset wos-46985 \
  --sources-dir /path/to/sources \
  --output-dir /path/to/rebuilt/WOS-46985/data \
  --scratch-dir /path/to/scratch/wos-46985
python preprocessing/prepare.py verify --dataset wos-46985 \
  --data-dir /path/to/rebuilt/WOS-46985/data
```

The download validates the manually supplied notice and provides pinned `wos/WebOfScience.zip` and NLTK resources under the source directory. All three WOS selectors share these sources; the selector above builds WOS-46985. Build and verify run offline after setup. The output contains only `noow.csv`, `bow.csv`, `labels.json`, `splits.json` and `hierarchy.json`; verification compares them with the recorded SHA-256 values. Builds refuse to overwrite outputs. Preserve failed output and scratch files, and use fresh paths for a retry. The shared code's MIT license does not change the source-text rights below.

## Loading and metadata

The default configuration is `noow`; the alternative is `bow`. Both expose the full retained population as `corpus`:

```python
from datasets import load_dataset

repo = "TopicNet/WOS-46985"
corpus = load_dataset(repo, "noow", split="corpus")
bow = load_dataset(repo, "bow", split="corpus")
```

Obtain the complete local package, including actual Git LFS contents. Set `HF_DATASETS_OFFLINE=1` and `HF_HUB_OFFLINE=1` before Python starts for offline loading, and choose a writable cache directory:

```python
import json
from pathlib import Path
from datasets import load_dataset

package = Path("/path/to/WOS-46985")
corpus = load_dataset(str(package), "noow", split="corpus",
                      cache_dir="/writable/cache")
bow = load_dataset(str(package), "bow", split="corpus",
                   cache_dir="/writable/cache")
labels = json.loads((package / "data/labels.json").read_text(encoding="utf-8"))
splits = json.loads((package / "data/splits.json").read_text(encoding="utf-8"))
hierarchy = json.loads((package / "data/hierarchy.json").read_text(encoding="utf-8"))
membership = {doc_id: split for split, ids in splits.items() for doc_id in ids}
annotated = corpus.map(lambda row: {"labels": labels[row["id"]],
                                   "source_hierarchy": hierarchy[row["id"]],
                                   "research_split": membership[row["id"]]})
fit = annotated.filter(lambda row: row["research_split"] == "fit")
```

`labels.json` directly maps each ID to `[Y]`, a list containing one string class. `splits.json` directly maps `fit`, `calibration` and `validation` to ordered ID arrays. `hierarchy.json` directly maps each ID to `{"Y": "...", "YL1": "...", "YL2": "..."}`, preserving the three source codes as strings. Join all metadata by ID, not by JSON position.

For remote metadata, download each auxiliary file and use the same ID joins:

```python
import json
from huggingface_hub import hf_hub_download

metadata = {}
for name in ("labels", "splits", "hierarchy"):
    path = hf_hub_download(repo, f"data/{name}.json", repo_type="dataset")
    with open(path, encoding="utf-8") as handle:
        metadata[name] = json.load(handle)
```

## Related datasets and overlap

Related preparations are [TopicNet/WOS-5736](https://huggingface.co/datasets/TopicNet/WOS-5736), [TopicNet/WOS-11967](https://huggingface.co/datasets/TopicNet/WOS-11967) and [TopicNet/WOS-46985](https://huggingface.co/datasets/TopicNet/WOS-46985). They are not independent datasets. Comparing the original source abstracts after casefold and whitespace collapse gives 5,736 shared abstract identities between WOS-5736 and WOS-46985, 11,268 between WOS-11967 and WOS-46985, and 1,708 between WOS-5736 and WOS-11967. These counts describe source abstracts, not final retained populations. WOS-11967 is not entirely contained in WOS-46985 under this comparison. Research splits are generated independently for each preparation; combining subsets for training and evaluation can therefore leak shared documents across splits.

## Files and integrity

The package contains `.gitattributes`, this card, [SHA256SUMS](SHA256SUMS), the verbatim [SOURCE_README.txt](SOURCE_README.txt), `data/noow.csv`, `data/bow.csv`, [labels](data/labels.json), [splits](data/splits.json) and [hierarchy](data/hierarchy.json). Run `sha256sum -c SHA256SUMS` from the package root to check the listed files.

## Rights, limitations and citation

The [official version 6 release](https://data.mendeley.com/datasets/9rw3vkcfy4/6) declares CC BY 4.0. [SOURCE_README.txt](SOURCE_README.txt) is preserved verbatim, including Copyright (c) 2017 Kamran Kowsari, the permission notice and the request to cite HDLTex. Preserve the copyright and permission notices in copies or substantial portions and cite the source. The release license does not establish that all abstracts or other third-party content are free of additional rights.

Source selection, historical coverage and class imbalance limit generalization. Source hierarchy codes are preserved without inferred corrections. Family grouping reduces known duplicate leakage, but some semantic duplicates may remain. The abstracts may contain personal information and outdated claims. Assess the corpus's suitability for your application before relying on it for decisions.

Kamran Kowsari, Donald E. Brown, Mojtaba Heidarysafa, Kiana Jafari Meimandi, Matthew S. Gerber and Laura E. Barnes (2017). [*HDLTex: Hierarchical Deep Learning for Text Classification*](https://arxiv.org/abs/1709.08267), IEEE ICMLA. DOI: [10.1109/ICMLA.2017.0-134](https://doi.org/10.1109/ICMLA.2017.0-134).

When citing this preparation, identify its retained population and repository revision as well as the source publication.