Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
csv
Languages:
English
Size:
10K - 100K
License:
|
Download README.md from TopicNet/SciNews: direct link, hf CLI and curl.
- Browser
- Download file 9.61 kB
-
https://huggingface.co/datasets/TopicNet/SciNews/resolve/main/README.md
- Command line
-
hf download hf://datasets/TopicNet/SciNews/README.md
-
curl -L -o README.md https://huggingface.co/datasets/TopicNet/SciNews/resolve/main/README.md
9.61 kB
| 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 | |
| # SciNews | |
| This TopicNet preparation contains 41,854 retained scientific news bodies with nine source labels, derived from SciNews by Dongqi Liu, Yifan Wang, Jia Loy and Vera Demberg. The texts are news bodies rather than the scholarly articles or abstracts they discuss. | |
| ## Population, labels and splits | |
| Raw duplicate identity is body text after casefold and whitespace collapse. Same-label duplicates retain the lexicographically smallest ID. Two raw duplicate groups remove two documents; eight cross-label conflict groups quarantine 16 documents. There are no identical lemma-sequence duplicate groups. Source URL and normalized DOI families are joined before splitting; one near-duplicate pair joins families without deleting its members. Original source train/test/val counts are 33,497/4,188/4,187 and are provenance, not the research memberships. | |
| Family groups combine raw/lemma duplicate relations, source URL/DOI relations where present, and body five-token shingle Jaccard similarity ≥0.9. Groups are assigned by iterative multilabel stratification with seeds 20260824 and 20260825; all retained members of a group stay together. The resulting disjoint, exhaustive research splits are **fit 25,109, calibration 8,370, validation 8,375**. The Hugging Face split `corpus` contains every retained document; it is not `fit`. | |
| Retained class counts: | |
| | Label | Documents | | |
| | --- | ---: | | |
| | Biology | 8571 | | |
| | Chemistry | 3381 | | |
| | Computer | 1142 | | |
| | Earth | 3856 | | |
| | Medicine | 15098 | | |
| | Nano | 2638 | | |
| | Other | 1164 | | |
| | Physics | 4851 | | |
| | Space | 1153 | | |
| ## Representations and preprocessing | |
| The source adapter saves `News_Body` as the body and `News_Title` as the original headline, and uses `Topic` as the external label. IDs are `scinews_<original-split>_<six-digit-row-index>`; their original split component does not imply research membership. | |
| Each UTF-8 CSV has exactly `id,raw_text,vw_text` columns and lexicographically ordered document IDs. `raw_text` contains the original, unnormalized headline followed by a blank line (two LF characters) and the original body. Only leading CR and LF characters are removed from the body at this boundary; all other headline and body characters are preserved. The VW string starts with the document ID followed by `|@title` then `|@word`: `@title` contains normalized original headline tokens, and `@word` contains normalized body tokens only. Normalizing the complete `raw_text` therefore does not reproduce the existing features in each modality. Labels are separate from the VW string. `noow` preserves normalized token occurrences in order; `bow` counts the same tokens independently per namespace as `token:count`, with lexicographic token order. The full prepared token sequences are included. | |
| NOOW means occurrence order after preprocessing, not untouched or reversible prose. English preprocessing uses Python 3.11.15, NLTK 3.9.2 and NLTK-data commit `550b6625bcef1f2abff2ff770a5a0d272c9c6b2a`: WordPunctTokenizer, lowercase per original span, minimum token length 2, averaged_perceptron_tagger_eng, WordNet POS mapping J/V/N/R with noun fallback, English stopword removal and `lemma.isalpha()` filtering. Names are not masked. | |
| ## Reproduce from source | |
| The [preprocessing folder](preprocessing/) contains the standalone code shared by all five prepared corpora. Its [README](preprocessing/README.md) explains how 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. No parent project checkout, BigARTM or TopicNet installation is needed. | |
| Obtain approved access to the original `dongqi-me/SciNews` dataset and authenticate using standard Hugging Face credentials before downloading sources. Access to this preparation does not grant access to the original source. From the directory containing `preprocessing/`, run: | |
| ```bash | |
| python preprocessing/prepare.py download --dataset scinews --sources-dir /path/to/sources | |
| python preprocessing/prepare.py build --dataset scinews \ | |
| --sources-dir /path/to/sources \ | |
| --output-dir /path/to/rebuilt/SciNews/data \ | |
| --scratch-dir /path/to/scratch/scinews | |
| python preprocessing/prepare.py verify --dataset scinews \ | |
| --data-dir /path/to/rebuilt/SciNews/data | |
| ``` | |
| The download provides pinned `scinews/README.md`, `train.json`, `val.json` and `test.json`, together with NLTK resources under the source directory. Build and verify run offline after setup. Choose fresh output and scratch paths. The output contains only `noow.csv`, `bow.csv`, `labels.json` and `splits.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 code's separate [MIT license](preprocessing/LICENSE) does not change the source-text rights or access terms below. | |
| ## Loading and metadata | |
| The default configuration is `noow`; `bow` contains aggregated counts. Both expose the complete population as the Hugging Face split `corpus`. Labels and the stored fit/calibration/validation memberships are auxiliary files, joined by document ID. `data/labels.json` directly maps each string ID to a list of string labels; `data/splits.json` directly maps each split name to an ordered ID list. | |
| ```python | |
| from datasets import load_dataset | |
| repo = "TopicNet/SciNews" | |
| corpus = load_dataset(repo, "noow", split="corpus") | |
| bow = load_dataset(repo, "bow", split="corpus") | |
| ``` | |
| For local use, obtain the complete package including actual Git LFS contents. Set `HF_DATASETS_OFFLINE=1` and `HF_HUB_OFFLINE=1` before Python starts and choose a writable cache directory: | |
| ```python | |
| import json | |
| from pathlib import Path | |
| from datasets import load_dataset | |
| package = Path("/path/to/SciNews") | |
| corpus = load_dataset(str(package), "noow", split="corpus", | |
| cache_dir="/writable/cache") | |
| bow = load_dataset(str(package), "bow", split="corpus", | |
| cache_dir="/writable/cache") | |
| with (package / "data/labels.json").open(encoding="utf-8") as handle: | |
| labels = json.load(handle) | |
| with (package / "data/splits.json").open(encoding="utf-8") as handle: | |
| splits = json.load(handle) | |
| membership = {doc_id: split for split, ids in splits.items() for doc_id in ids} | |
| annotated = corpus.map(lambda row: {"labels": labels[row["id"]], | |
| "research_split": membership[row["id"]]}) | |
| fit = annotated.filter(lambda row: row["research_split"] == "fit") | |
| ``` | |
| For remote metadata, download `data/labels.json` and `data/splits.json` with `huggingface_hub.hf_hub_download(repo, filename, repo_type="dataset")`, then read the same direct mappings. | |
| ## Files and integrity | |
| The package contains this card, `.gitattributes`, [SHA256SUMS](SHA256SUMS), two CSV representations and [labels](data/labels.json)/[splits](data/splits.json) metadata, plus the verbatim source README. Run `sha256sum -c SHA256SUMS` from the package root to check the listed files. | |
| ## Rights, limitations and citation | |
| ### Publication permission and source notices | |
| This topic-modeling version is published with permission from Dongqi Liu, one of the original SciNews authors. | |
| The [official dataset card](https://huggingface.co/datasets/dongqi-me/SciNews) lists [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) as its license. Separately, its access form requires applicants to limit use to non-commercial academic research or educational purposes. Both source notices are preserved in [SOURCE_README.md](SOURCE_README.md). Permission to publish this preparation does not change these notices or third-party rights in the news articles. | |
| ### Limitations | |
| The corpus reflects the source's selection of news articles, historical coverage and class imbalance. Source categories are retained as labels and may not describe every topic discussed in an article. Automatic preprocessing changes the token representation and may lose distinctions present in the original text. | |
| Family grouping reduces known duplicate leakage, but some semantic duplicates may remain. The articles may contain personal information and outdated claims. | |
| ### Citation | |
| Please cite the original SciNews publication using the full BibTeX entry below when using this dataset. Also identify this TopicNet preparation and its repository revision so readers can distinguish it from the original SciNews release. | |
| ```bibtex | |
| @inproceedings{pu-etal-2024-scinews, | |
| title = "{S}ci{N}ews: From Scholarly Complexities to Public Narratives {--} a Dataset for Scientific News Report Generation", | |
| author = "Liu, Dongqi and | |
| Wang, Yifan and | |
| Loy, Jia and | |
| Demberg, Vera", | |
| editor = "Calzolari, Nicoletta and | |
| Kan, Min-Yen and | |
| Hoste, Veronique and | |
| Lenci, Alessandro and | |
| Sakti, Sakriani and | |
| Xue, Nianwen", | |
| booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)", | |
| month = may, | |
| year = "2024", | |
| address = "Torino, Italia", | |
| publisher = "ELRA and ICCL", | |
| url = "https://aclanthology.org/2024.lrec-main.1258", | |
| pages = "14429--14444" | |
| } | |
| ``` | |