Datasets:
Mahmoud Amiri commited on
Commit ·
a137ded
1
Parent(s): 308a1ac
update readme file
Browse files- README.md +133 -230
- lit2vec_subfield_classifier.py +9 -5
README.md
CHANGED
|
@@ -1,230 +1,133 @@
|
|
| 1 |
-
---
|
| 2 |
-
dataset_name: lit2vec-subfield-classifier-dataset
|
| 3 |
-
pretty_name: Lit2Vec Subfield Classifier Dataset
|
| 4 |
-
tags:
|
| 5 |
-
- scientific-papers
|
| 6 |
-
- classification
|
| 7 |
-
- embeddings
|
| 8 |
-
- semantic-scholar
|
| 9 |
-
- scientific-literature
|
| 10 |
-
license: cc-by-4.0
|
| 11 |
-
task_categories:
|
| 12 |
-
- text-classification
|
| 13 |
-
language:
|
| 14 |
-
- en
|
| 15 |
-
size_categories:
|
| 16 |
-
- 10K<n<100K
|
| 17 |
-
---
|
| 18 |
-
|
| 19 |
-
# Lit2Vec Subfield Classifier Dataset
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
The
|
| 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 |
-
"Biochemistry": 7,
|
| 135 |
-
"Environmental Chemistry": 8,
|
| 136 |
-
"Energy Chemistry": 9,
|
| 137 |
-
"Medicinal Chemistry": 10,
|
| 138 |
-
"Chemical Engineering": 11,
|
| 139 |
-
"Supramolecular Chemistry": 12,
|
| 140 |
-
"Radiochemistry & Nuclear Chemistry": 13,
|
| 141 |
-
"Forensic & Legal Chemistry": 14,
|
| 142 |
-
"Food Chemistry": 15,
|
| 143 |
-
"Chemical Education": 16,
|
| 144 |
-
"Others": 17
|
| 145 |
-
},
|
| 146 |
-
"index_to_label": {
|
| 147 |
-
"0": "Catalysis",
|
| 148 |
-
"1": "Organic Chemistry",
|
| 149 |
-
"2": "Polymer Chemistry",
|
| 150 |
-
"3": "Inorganic Chemistry",
|
| 151 |
-
"4": "Materials Science",
|
| 152 |
-
"5": "Analytical Chemistry",
|
| 153 |
-
"6": "Physical Chemistry",
|
| 154 |
-
"7": "Biochemistry",
|
| 155 |
-
"8": "Environmental Chemistry",
|
| 156 |
-
"9": "Energy Chemistry",
|
| 157 |
-
"10": "Medicinal Chemistry",
|
| 158 |
-
"11": "Chemical Engineering",
|
| 159 |
-
"12": "Supramolecular Chemistry",
|
| 160 |
-
"13": "Radiochemistry & Nuclear Chemistry",
|
| 161 |
-
"14": "Forensic & Legal Chemistry",
|
| 162 |
-
"15": "Food Chemistry",
|
| 163 |
-
"16": "Chemical Education",
|
| 164 |
-
"17": "Others"
|
| 165 |
-
}
|
| 166 |
-
}
|
| 167 |
-
```
|
| 168 |
-
|
| 169 |
-
---
|
| 170 |
-
|
| 171 |
-
## Usage
|
| 172 |
-
|
| 173 |
-
```python
|
| 174 |
-
from datasets import load_dataset
|
| 175 |
-
|
| 176 |
-
dataset = load_dataset("Bocklitz-Lab/lit2vec-subfield-classifier-dataset")
|
| 177 |
-
|
| 178 |
-
print(dataset["train"][0]["title"])
|
| 179 |
-
print(dataset["train"][0]["field_classification"])
|
| 180 |
-
```
|
| 181 |
-
|
| 182 |
-
Each entry includes:
|
| 183 |
-
|
| 184 |
-
* A machine-readable **embedding**
|
| 185 |
-
* A list of **labels (IDs)**
|
| 186 |
-
* The **original text**, metadata, and license info
|
| 187 |
-
|
| 188 |
-
---
|
| 189 |
-
|
| 190 |
-
## Applications
|
| 191 |
-
|
| 192 |
-
* 🧠 **Text classification** using BERT, RoBERTa, etc.
|
| 193 |
-
* 🔍 **Semantic search** with sentence-transformer or FAISS
|
| 194 |
-
* 🧬 **Domain adaptation** for scientific NLP tasks
|
| 195 |
-
* 🧭 **Clustering** and unsupervised topic modeling
|
| 196 |
-
* 📈 **Benchmarking** embedding models on scientific literature
|
| 197 |
-
|
| 198 |
-
---
|
| 199 |
-
|
| 200 |
-
## Licensing
|
| 201 |
-
|
| 202 |
-
* All entries are sourced from **CC BY 4.0** licensed publications.
|
| 203 |
-
* Each entry includes original attribution via `license_publisher`, `oa_url`, and `doi`.
|
| 204 |
-
* You are free to reuse, modify, and distribute the dataset under the terms of **Creative Commons Attribution 4.0 International License**.
|
| 205 |
-
|
| 206 |
-
---
|
| 207 |
-
|
| 208 |
-
## Citation
|
| 209 |
-
|
| 210 |
-
If you use this dataset in your research, please cite:
|
| 211 |
-
|
| 212 |
-
```bibtex
|
| 213 |
-
@dataset{lit2vec_classifier_2025,
|
| 214 |
-
author = {Mahmoud Amiri, Thomas Bocklitz},
|
| 215 |
-
title = {Lit2Vec Subfield Classifier Dataset},
|
| 216 |
-
year = {2025},
|
| 217 |
-
publisher = {Hugging Face},
|
| 218 |
-
howpublished = {\url{https://huggingface.co/datasets/Bocklitz-Lab/lit2vec-subfield-classifier-dataset}},
|
| 219 |
-
note = {Submitted to Nature Scientific Data}
|
| 220 |
-
}
|
| 221 |
-
```
|
| 222 |
-
|
| 223 |
-
---
|
| 224 |
-
|
| 225 |
-
## Acknowledgements
|
| 226 |
-
|
| 227 |
-
* Built on top of **Semantic Scholar Open Research Corpus (S2ORC)**
|
| 228 |
-
* Flattened and cleaned using custom preprocessing by the **Bocklitz Lab**
|
| 229 |
-
* Embeddings generated from proprietary or publicly available models (details forthcoming in accompanying paper)
|
| 230 |
-
|
|
|
|
| 1 |
+
---
|
| 2 |
+
dataset_name: lit2vec-subfield-classifier-dataset
|
| 3 |
+
pretty_name: Lit2Vec Subfield Classifier Dataset
|
| 4 |
+
tags:
|
| 5 |
+
- scientific-papers
|
| 6 |
+
- classification
|
| 7 |
+
- embeddings
|
| 8 |
+
- semantic-scholar
|
| 9 |
+
- scientific-literature
|
| 10 |
+
license: cc-by-4.0
|
| 11 |
+
task_categories:
|
| 12 |
+
- text-classification
|
| 13 |
+
language:
|
| 14 |
+
- en
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Lit2Vec Subfield Classifier Dataset
|
| 20 |
+
|
| 21 |
+
This dataset contains 39,900 short chemistry texts with e5-large-v2 embeddings and multi-label subfield annotations. It is the training data of the [subfield classifier](https://huggingface.co/Bocklitz-Lab/lit2vec-subfield-classifier-model) of the Lit2Vec workflow ([paper](https://arxiv.org/abs/2604.12498), [code](https://github.com/Bocklitz-Lab/lit2vec-subfield-classifier)).
|
| 22 |
+
|
| 23 |
+
The texts come from 19,992 papers whose license metadata indicates CC BY. They are the same papers as in the [TL;DR dataset](https://huggingface.co/datasets/Bocklitz-Lab/lit2vec-tldr-bart-dataset), and the texts are identical to its abstracts and summaries. Each paper contributes two records: its abstract (19,992 records) and its GPT-4o summary (19,908 records, because 84 papers have no summary). Both records of a paper carry the same labels.
|
| 24 |
+
|
| 25 |
+
The subfield labels were generated by GPT-4o from a controlled vocabulary of 17 chemistry subfields plus "Others". They were not curated by experts. Two domain experts reviewed a random sample of 45 annotated abstracts and found them generally reasonable (see the paper).
|
| 26 |
+
|
| 27 |
+
## Splits
|
| 28 |
+
|
| 29 |
+
| Split | Records |
|
| 30 |
+
|---|---:|
|
| 31 |
+
| train | 31,920 |
|
| 32 |
+
| validation | 3,990 |
|
| 33 |
+
| test | 3,990 |
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## Fields
|
| 37 |
+
|
| 38 |
+
Each record is one line of a JSON Lines file under `data/`.
|
| 39 |
+
|
| 40 |
+
| Field | Type | Description |
|
| 41 |
+
|---|---|---|
|
| 42 |
+
| `corpus_id` | int | Semantic Scholar corpus ID. Two records share it (abstract and summary). |
|
| 43 |
+
| `doi` | string | DOI. |
|
| 44 |
+
| `url` | string | Semantic Scholar page of the paper. |
|
| 45 |
+
| `title` | string | Title. |
|
| 46 |
+
| `authors` | list of strings | Author names. Empty for 70 records. |
|
| 47 |
+
| `author_ids` | list of strings | Semantic Scholar author IDs, aligned with `authors`; an empty string where the ID is unknown. |
|
| 48 |
+
| `venue` | string | Venue. Empty for 7,263 records. |
|
| 49 |
+
| `year` | int | Publication year (1967 to 2024). |
|
| 50 |
+
| `fields_of_study` | list of strings | Field labels from Semantic Scholar. |
|
| 51 |
+
| `publication_date` | string | ISO date. Empty for 1,458 records. |
|
| 52 |
+
| `journal_name` | string | Journal name. Empty for 1,918 records. |
|
| 53 |
+
| `license_publisher` | string | Publisher of the open-access version. |
|
| 54 |
+
| `license` | string | License category from the screening. It is `cc-by` for every record. |
|
| 55 |
+
| `oa_url` | string | Link to the open-access full text. |
|
| 56 |
+
| `text` | string | The abstract or the summary, see `text_type`. |
|
| 57 |
+
| `text_type` | string | `abstract` or `summary`. |
|
| 58 |
+
| `field_classification` | list of strings | Subfield names as produced by GPT-4o. |
|
| 59 |
+
| `label` | list of ints | IDs of the names in `field_classification` that belong to the 18-class vocabulary. |
|
| 60 |
+
| `embedding` | list of 1,024 floats | e5-large-v2 embedding of `text` (see below). |
|
| 61 |
+
|
| 62 |
+
### Embeddings
|
| 63 |
+
|
| 64 |
+
`embedding` is the L2-normalised output of `intfloat/e5-large-v2` for the string `abstract: <text>` when `text_type` is `abstract` and `summary: <text>` when it is `summary`. We checked this by re-encoding records: the stored vectors and the re-computed ones have a cosine similarity of 1.00000. To classify new text with the [model](https://huggingface.co/Bocklitz-Lab/lit2vec-subfield-classifier-model), use the same prefixes.
|
| 65 |
+
|
| 66 |
+
### Labels
|
| 67 |
+
|
| 68 |
+
| ID | Subfield | Papers | | ID | Subfield | Papers |
|
| 69 |
+
|---:|---|---:|---|---:|---|---:|
|
| 70 |
+
| 0 | Catalysis | 997 | | 9 | Energy Chemistry | 754 |
|
| 71 |
+
| 1 | Organic Chemistry | 1,247 | | 10 | Medicinal Chemistry | 6,326 |
|
| 72 |
+
| 2 | Polymer Chemistry | 569 | | 11 | Chemical Engineering | 2,019 |
|
| 73 |
+
| 3 | Inorganic Chemistry | 1,053 | | 12 | Supramolecular Chemistry | 207 |
|
| 74 |
+
| 4 | Materials Science | 4,664 | | 13 | Radiochemistry & Nuclear Chemistry | 93 |
|
| 75 |
+
| 5 | Analytical Chemistry | 3,208 | | 14 | Forensic & Legal Chemistry | 61 |
|
| 76 |
+
| 6 | Physical Chemistry | 1,157 | | 15 | Food Chemistry | 1,502 |
|
| 77 |
+
| 7 | Biochemistry | 10,514 | | 16 | Chemical Education | 91 |
|
| 78 |
+
| 8 | Environmental Chemistry | 2,664 | | 17 | Others | 125 |
|
| 79 |
+
|
| 80 |
+
The last column counts papers (out of 19,992). A paper has 1.86 labels on average, and the distribution is strongly skewed towards Biochemistry and Medicinal Chemistry.
|
| 81 |
+
|
| 82 |
+
## Example
|
| 83 |
+
|
| 84 |
+
A paper with its two records (embeddings and long fields shortened):
|
| 85 |
+
|
| 86 |
+
```json
|
| 87 |
+
{"corpus_id": 105403827, "text_type": "abstract",
|
| 88 |
+
"title": "Modeling of Chemical Reacting Transport Phenomena in a PEM Fuel Cell using Finite Volume Method",
|
| 89 |
+
"doi": "10.31031/PPS.2018.02.000549", "year": 2018, "license": "cc-by",
|
| 90 |
+
"text": "Modeling the transport phenomena in a fuel cell system is important to the development of fuel cells. ...",
|
| 91 |
+
"field_classification": ["Energy Chemistry", "Chemical Engineering"], "label": [9, 11],
|
| 92 |
+
"embedding": [-0.0153, -0.0243, 0.0022, "... 1,024 values"]}
|
| 93 |
+
|
| 94 |
+
{"corpus_id": 105403827, "text_type": "summary",
|
| 95 |
+
"text": "A two-dimensional transient model using finite volume method enhances PEMFC design by simulating gas flow and solving movement and energy equations.",
|
| 96 |
+
"field_classification": ["Energy Chemistry", "Chemical Engineering"], "label": [9, 11],
|
| 97 |
+
"embedding": [-0.0149, -0.0214, 0.0076, "... 1,024 values"]}
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
## Usage
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
from datasets import load_dataset
|
| 104 |
+
|
| 105 |
+
ds = load_dataset("Bocklitz-Lab/lit2vec-subfield-classifier-dataset")
|
| 106 |
+
print(ds["train"][0]["title"])
|
| 107 |
+
print(ds["train"][0]["label"])
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
## Licensing and attribution
|
| 112 |
+
|
| 113 |
+
The texts are the work of the original authors and were published under CC BY, which requires attribution. Each record carries the DOI, the publisher and a link to the open-access full text. The summaries and the labels are machine-generated, were produced with OpenAI's GPT-4o, and are released under CC BY 4.0 together with the abstracts. Check OpenAI's terms of use if you plan to use them to train other models. The license metadata was resolved from Unpaywall, OpenAlex and Crossref as described in the paper. This is a metadata-based screen and not legal clearance.
|
| 114 |
+
|
| 115 |
+
## Citation
|
| 116 |
+
|
| 117 |
+
Please cite the Lit2Vec paper:
|
| 118 |
+
|
| 119 |
+
```bibtex
|
| 120 |
+
@misc{amiri2026lit2vec,
|
| 121 |
+
title = {Lit2Vec: A Reproducible Workflow for Building a Legally Screened Chemistry Corpus from S2ORC for Downstream Retrieval and Text Mining},
|
| 122 |
+
author = {Amiri, Mahmoud and Jafari, Jamile Mohammad and Mostafapour, Sara and Bocklitz, Thomas},
|
| 123 |
+
year = {2026},
|
| 124 |
+
eprint = {2604.12498},
|
| 125 |
+
archivePrefix = {arXiv},
|
| 126 |
+
doi = {10.48550/arXiv.2604.12498},
|
| 127 |
+
url = {https://arxiv.org/abs/2604.12498}
|
| 128 |
+
}
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
## Acknowledgements
|
| 132 |
+
|
| 133 |
+
The texts come from S2ORC, provided by the Allen Institute for AI and the Semantic Scholar team. The embeddings were computed with `intfloat/e5-large-v2`. The work was developed in the Bocklitz Lab at the Leibniz Institute of Photonic Technology (Leibniz IPHT) and Friedrich Schiller University Jena and was funded by the BMFTR within the programme Photonics Research Germany (13N15466, 13N15710, 13N15715). Questions: mahmoud.amiri@uni-jena.de.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lit2vec_subfield_classifier.py
CHANGED
|
@@ -16,7 +16,7 @@ def safe_sequence(val, default_type=int):
|
|
| 16 |
class lit2vec_subfield_classifier(GeneratorBasedBuilder):
|
| 17 |
def _info(self):
|
| 18 |
return DatasetInfo(
|
| 19 |
-
description="Lit2Vec Subfield Classifier:
|
| 20 |
features=Features({
|
| 21 |
"corpus_id": Value("int64"),
|
| 22 |
"doi": Value("string"),
|
|
@@ -35,13 +35,17 @@ class lit2vec_subfield_classifier(GeneratorBasedBuilder):
|
|
| 35 |
"text": Value("string"),
|
| 36 |
"field_classification": Sequence(Value("string")),
|
| 37 |
"text_type": Value("string"),
|
| 38 |
-
"embedding": Sequence(Value("float32")), #
|
| 39 |
"label": Sequence(Value("int32"))
|
| 40 |
}),
|
| 41 |
supervised_keys=None,
|
| 42 |
-
license="cc-by",
|
| 43 |
-
homepage="https://huggingface.co/datasets/
|
| 44 |
-
citation="""@misc{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
)
|
| 46 |
|
| 47 |
def _split_generators(self, dl_manager):
|
|
|
|
| 16 |
class lit2vec_subfield_classifier(GeneratorBasedBuilder):
|
| 17 |
def _info(self):
|
| 18 |
return DatasetInfo(
|
| 19 |
+
description="Lit2Vec Subfield Classifier: chemistry abstracts and GPT-4o summaries with e5-large-v2 embeddings and multi-label subfield annotations.",
|
| 20 |
features=Features({
|
| 21 |
"corpus_id": Value("int64"),
|
| 22 |
"doi": Value("string"),
|
|
|
|
| 35 |
"text": Value("string"),
|
| 36 |
"field_classification": Sequence(Value("string")),
|
| 37 |
"text_type": Value("string"),
|
| 38 |
+
"embedding": Sequence(Value("float32")), # 1,024 values (intfloat/e5-large-v2)
|
| 39 |
"label": Sequence(Value("int32"))
|
| 40 |
}),
|
| 41 |
supervised_keys=None,
|
| 42 |
+
license="cc-by-4.0",
|
| 43 |
+
homepage="https://huggingface.co/datasets/Bocklitz-Lab/lit2vec-subfield-classifier-dataset",
|
| 44 |
+
citation="""@misc{amiri2026lit2vec,
|
| 45 |
+
title={Lit2Vec: A Reproducible Workflow for Building a Legally Screened Chemistry Corpus from S2ORC for Downstream Retrieval and Text Mining},
|
| 46 |
+
author={Amiri, Mahmoud and Jafari, Jamile Mohammad and Mostafapour, Sara and Bocklitz, Thomas},
|
| 47 |
+
year={2026}, eprint={2604.12498}, archivePrefix={arXiv}, doi={10.48550/arXiv.2604.12498}
|
| 48 |
+
}"""
|
| 49 |
)
|
| 50 |
|
| 51 |
def _split_generators(self, dl_manager):
|