Vasily Alexeev commited on
Commit
b07bb71
·
1 Parent(s): 483b98e

add hierarchy

Browse files
Files changed (3) hide show
  1. README.md +14 -7
  2. SHA256SUMS +2 -1
  3. data/hierarchy.json +0 -0
README.md CHANGED
@@ -30,7 +30,7 @@ This TopicNet derived preparation contains 11,965 retained scientific abstracts
30
 
31
  ## Population, labels and splits
32
 
33
- Raw duplicate identity is body text after casefold and whitespace collapse. There are no raw duplicate groups or cross-label conflicts. Two identical lemma-sequence groups remove two rows; five near-duplicate pairs join families without removing their members. Exported labels use only Y.txt, the authoritative global class. The original source hierarchy has these ambiguities: global label 6 has child values 2 and 3, label 10 has child values 2 and 3, and parent/child pair (2,3) maps to global labels 10 and 11. The original YL1.txt/YL2.txt files and per-document hierarchy metadata are not included in this package. Y values are not repaired and class names are not invented.
34
 
35
  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 7,182, calibration 2,391, validation 2,392**. The Hugging Face split `corpus` contains every retained document; it is not `fit`.
36
 
@@ -79,11 +79,11 @@ The source adapter reads aligned X/Y/YL1/YL2 lines with zero-based row indices.
79
 
80
  Each UTF-8 CSV has exactly `id,raw_text,vw_text` columns and lexicographically ordered document IDs. `raw_text` contains the source abstract. The VW string starts with the document ID followed by only `|@word`. There is no title namespace. 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.
81
 
82
- 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.
83
 
84
  ## Loading and metadata
85
 
86
- 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.
87
 
88
  ```python
89
  from datasets import load_dataset
@@ -109,24 +109,31 @@ with (package / "data/labels.json").open(encoding="utf-8") as handle:
109
  labels = json.load(handle)
110
  with (package / "data/splits.json").open(encoding="utf-8") as handle:
111
  splits = json.load(handle)
 
 
112
  membership = {doc_id: split for split, ids in splits.items() for doc_id in ids}
113
  annotated = corpus.map(lambda row: {"labels": labels[row["id"]],
 
114
  "research_split": membership[row["id"]]})
115
  fit = annotated.filter(lambda row: row["research_split"] == "fit")
116
  ```
117
 
118
- 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. Private repositories require authorized authentication.
 
 
 
 
119
 
120
  ## Files and integrity
121
 
122
- The package contains this card, unchanged `.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 every publication file except the checksum list itself. The representation files retain their original generated bytes.
123
 
124
  ## Rights, limitations and citation
125
 
126
- The [Mendeley release, version 6](https://data.mendeley.com/datasets/9rw3vkcfy4/6) declares CC BY 4.0. The verbatim [SOURCE_README.txt](SOURCE_README.txt) retains Copyright (c) 2017 Kamran Kowsari and the permission notice requiring the copyright and permission notices in copies or substantial portions. Preserve those notices and cite the source. The release license is not a blanket guarantee that abstracts or other third-party content have no additional rights.
127
 
128
  These local packages are intended for private research storage; remote visibility has not been verified or changed. Private storage does not supply redistribution permission. Labels and topic distributions reflect source selection, historical coverage, class imbalance and automatic preprocessing. Family grouping limits known leakage but does not establish that every semantic duplicate was detected. Normalized representations do not guarantee current facts, absence of personal information or suitability for downstream decisions.
129
 
130
- 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*, IEEE ICMLA.
131
 
132
  When citing this preparation, identify its retained population and repository revision as well as the source publication.
 
30
 
31
  ## Population, labels and splits
32
 
33
+ Raw duplicate identity is body text after casefold and whitespace collapse. There are no raw duplicate groups or cross-label conflicts. Two identical lemma-sequence groups remove two rows; five near-duplicate pairs join families without removing their members. Exported labels use only Y.txt, the authoritative global class. The original source hierarchy has these ambiguities: global label 6 has child values 2 and 3, label 10 has child values 2 and 3, and parent/child pair (2,3) maps to global labels 10 and 11. The original YL1.txt/YL2.txt files are not copied as separate text files; their values, together with Y.txt, are included for every retained document in data/hierarchy.json. YL2 is a local child code interpreted with its parent YL1, not a globally unique class. Y values are not repaired and class names are not invented.
34
 
35
  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 7,182, calibration 2,391, validation 2,392**. The Hugging Face split `corpus` contains every retained document; it is not `fit`.
36
 
 
79
 
80
  Each UTF-8 CSV has exactly `id,raw_text,vw_text` columns and lexicographically ordered document IDs. `raw_text` contains the source abstract. The VW string starts with the document ID followed by only `|@word`. There is no title namespace. 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.
81
 
82
+ 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, 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.
83
 
84
  ## Loading and metadata
85
 
86
+ 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. `data/hierarchy.json` directly maps each ID to {"Y": "...", "YL1": "...", "YL2": "..."}, with all source codes preserved as strings. Join these mappings by ID.
87
 
88
  ```python
89
  from datasets import load_dataset
 
109
  labels = json.load(handle)
110
  with (package / "data/splits.json").open(encoding="utf-8") as handle:
111
  splits = json.load(handle)
112
+ with (package / "data/hierarchy.json").open(encoding="utf-8") as handle:
113
+ hierarchy = json.load(handle)
114
  membership = {doc_id: split for split, ids in splits.items() for doc_id in ids}
115
  annotated = corpus.map(lambda row: {"labels": labels[row["id"]],
116
+ "source_hierarchy": hierarchy[row["id"]],
117
  "research_split": membership[row["id"]]})
118
  fit = annotated.filter(lambda row: row["research_split"] == "fit")
119
  ```
120
 
121
+ For remote metadata, download `data/labels.json`, `data/splits.json` and `data/hierarchy.json` with `huggingface_hub.hf_hub_download(repo, filename, repo_type="dataset")`, then read the same direct mappings. Private repositories require authorized authentication.
122
+
123
+ ## Related datasets and overlap
124
+
125
+ Related preparations are [TopicNet/WOS-5736](https://huggingface.co/datasets/TopicNet/WOS-5736) and [TopicNet/WOS-46985](https://huggingface.co/datasets/TopicNet/WOS-46985), alongside [TopicNet/WOS-11967](https://huggingface.co/datasets/TopicNet/WOS-11967). They are not independent datasets. Comparing 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. Splits are generated independently for each preparation; combining subsets for training and evaluation can leak shared documents across splits.
126
 
127
  ## Files and integrity
128
 
129
+ The package contains this card, unchanged `.gitattributes`, [SHA256SUMS](SHA256SUMS), two CSV representations and [labels](data/labels.json)/[splits](data/splits.json)/[hierarchy](data/hierarchy.json) metadata, plus the verbatim source README. Run `sha256sum -c SHA256SUMS` from the package root to check every publication file except the checksum list itself. The representation files retain their original generated bytes.
130
 
131
  ## Rights, limitations and citation
132
 
133
+ The [Mendeley release, version 6](https://data.mendeley.com/datasets/9rw3vkcfy4/6) declares CC BY 4.0; its DOI is [10.17632/9rw3vkcfy4.6](https://doi.org/10.17632/9rw3vkcfy4.6). The verbatim [SOURCE_README.txt](SOURCE_README.txt) retains Copyright (c) 2017 Kamran Kowsari and the permission notice requiring the copyright and permission notices in copies or substantial portions. Preserve those notices and cite the source. The release license is not a blanket guarantee that abstracts or other third-party content have no additional rights.
134
 
135
  These local packages are intended for private research storage; remote visibility has not been verified or changed. Private storage does not supply redistribution permission. Labels and topic distributions reflect source selection, historical coverage, class imbalance and automatic preprocessing. Family grouping limits known leakage but does not establish that every semantic duplicate was detected. Normalized representations do not guarantee current facts, absence of personal information or suitability for downstream decisions.
136
 
137
+ 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).
138
 
139
  When citing this preparation, identify its retained population and repository revision as well as the source publication.
SHA256SUMS CHANGED
@@ -1,7 +1,8 @@
1
  947f03cf79a99d7f9061220c575021c918ae95f64ab75c4112917be804fb51cd .gitattributes
2
- 303bf68fc20feb4b23046647f098f9d0533c65c7b4710eac8588283ff92bc5cd README.md
3
  6da4ab1e624c4ef61c46600d727770f873ff4db3c15541fb481e7af8a715c0ec SOURCE_README.txt
4
  4e27d8e46bad08061568222a0931b963f6ad637074b1b227de095af05757d339 data/bow.csv
 
5
  138c7a5ed0ae4787afdbd306a7fd2732b392ad8db65c22e7ce312c33a178470c data/labels.json
6
  101d1c8a690ae0fe1b68491cb144ff42114280e12770f8a332647106bd12580e data/noow.csv
7
  608c14b244f02df40b897dfc7de3411352079bed0a507f2fd8ccf70b9c5996d7 data/splits.json
 
1
  947f03cf79a99d7f9061220c575021c918ae95f64ab75c4112917be804fb51cd .gitattributes
2
+ 858403645e465f50b75e9b6b2cfb587994c76ceb9af446891a5250d6865ea4b2 README.md
3
  6da4ab1e624c4ef61c46600d727770f873ff4db3c15541fb481e7af8a715c0ec SOURCE_README.txt
4
  4e27d8e46bad08061568222a0931b963f6ad637074b1b227de095af05757d339 data/bow.csv
5
+ 5a4ab746cdc75b048143eb8aeac2660535bed1a23cca7d37a6e4775bb9b7d3b6 data/hierarchy.json
6
  138c7a5ed0ae4787afdbd306a7fd2732b392ad8db65c22e7ce312c33a178470c data/labels.json
7
  101d1c8a690ae0fe1b68491cb144ff42114280e12770f8a332647106bd12580e data/noow.csv
8
  608c14b244f02df40b897dfc7de3411352079bed0a507f2fd8ccf70b9c5996d7 data/splits.json
data/hierarchy.json ADDED
The diff for this file is too large to render. See raw diff