--- language: - en license: cc-by-4.0 task_categories: - text-classification tags: - topic-modeling - topic-modelling - text-clustering - document-representation size_categories: - 10K`. `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.