Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
csv
Languages:
English
Size:
10K - 100K
ArXiv:
License:
File size: 10,823 Bytes
508256d edd0f60 508256d edd0f60 dda2098 edd0f60 37235bc edd0f60 37235bc edd0f60 | 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 | ---
language:
- en
license: cc-by-4.0
task_categories:
- text-classification
tags:
- topic-modeling
- topic-modelling
- text-clustering
- document-representation
size_categories:
- 1K<n<10K
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-5736
This TopicNet preparation contains 5,735 retained English scientific abstracts from the 5,736-row WOS-5736 source, with 11 observed global classes and 3 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, 1 same-class lemma duplicate, 0 rows in lemma conflicts and 0 empty normalized documents; 1 row is removed in total.
Near duplicates are grouped, not deleted: body five-token shingle Jaccard similarity ≥0.9 identifies 1 pair 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 3,439, calibration 1,147, validation 1,149**. 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 11 global classes and three parent codes. No class names are inferred and numeric classes are not assumed comparable across WOS subsets.
Retained class counts:
| Global class | Documents |
| --- | ---: |
| 0 | 447 |
| 1 | 426 |
| 2 | 419 |
| 3 | 397 |
| 4 | 404 |
| 5 | 380 |
| 6 | 416 |
| 7 | 746 |
| 8 | 652 |
| 9 | 749 |
| 10 | 699 |
## Representations and preprocessing
The aligned source files are `WOS5736/X.txt`, `Y.txt`, `YL1.txt` and `YL2.txt` in `WebOfScience.zip`. Stable IDs are `wos5736_<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 and create the locked Linux x86-64 environment with Python 3.11.15. 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-5736 --sources-dir /path/to/sources
python preprocessing/prepare.py build --dataset wos-5736 \
--sources-dir /path/to/sources \
--output-dir /path/to/rebuilt/WOS-5736/data \
--scratch-dir /path/to/scratch/wos-5736
python preprocessing/prepare.py verify --dataset wos-5736 \
--data-dir /path/to/rebuilt/WOS-5736/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-5736. 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-5736"
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-5736")
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.
|