File size: 18,573 Bytes
b7ac4bf 66e559a 86e3be2 b6eb88f 86e3be2 e5f35c9 86e3be2 a3effaa b7ac4bf 66e559a 8b1e98f 0245f06 598b7cc 0245f06 8b1e98f a4c8bb4 8b1e98f 598b7cc 0245f06 7d69dbc 0245f06 890025a 7d69dbc 890025a 7d69dbc 0245f06 a4c8bb4 0245f06 598b7cc 0245f06 a4c8bb4 8b1e98f 0245f06 a4c8bb4 598b7cc a4c8bb4 8b1e98f a4c8bb4 8b1e98f a64cb8e a4c8bb4 8b1e98f 598b7cc a4c8bb4 598b7cc 0245f06 abef798 a64cb8e abef798 bacf544 abef798 a4c8bb4 8b1e98f 0245f06 a4c8bb4 0245f06 a4c8bb4 0245f06 a4c8bb4 0245f06 a4c8bb4 8b1e98f 0245f06 a4c8bb4 8b1e98f a4c8bb4 8b1e98f b0f0299 29648af 2a1a625 29648af 2a1a625 b0f0299 0245f06 a4c8bb4 8b1e98f a4c8bb4 d034d5d a4c8bb4 8b1e98f 0245f06 8b1e98f 0245f06 7d69dbc 92ad748 7d69dbc 0245f06 8118632 0245f06 7d69dbc 0245f06 8118632 0245f06 7d69dbc |
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
---
language:
- es
- en
license: apache-2.0
dataset_info:
features:
- name: raw_text
dtype: string
- name: topic
dtype: string
- name: speciallity
dtype: string
- name: raw_text_type
dtype: string
- name: topic_type
dtype: string
- name: source
dtype: string
- name: country
dtype: string
- name: document_id
dtype: string
splits:
- name: train
num_bytes: 190710909
num_examples: 2136490
download_size: 48472707
dataset_size: 190710909
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
task_categories:
- question-answering
- zero-shot-classification
- text-generation
pretty_name: SMC
---
<!-- ###################################################################################################################### --->
<!--
Esta plantilla de Dataset Card es una adaptación de la de Hugging Face: https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/datasetcard_template.md
¿Cómo utilizar esta plantilla? Copia el contenido en el README.md del repo de tu dataset en el Hub de Hugging Face y rellena cada sección.
Para más información sobre cómo rellenar cada sección ver las docs: https://huggingface.co/docs/hub/datasets-cards y https://huggingface.co/docs/datasets/dataset_card
Para más información sobre la dataset card metadata ver: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
-->
# Dataset Card for Spanish Medical Corpus (SMC)
<!-- Suele haber un nombre corto ("pretty name") para las URLs, tablas y demás y uno largo más descriptivo. Para crear el pretty name podéis utilizar acrónimos. -->
<!-- Resumen del corpus y motivación del proyecto (inc. los ODS relacionados). Esta sección es como el abstract. También se puede incluir aquí el logo del proyecto. -->
<!-- Si queréis incluir una versión de la Dataset Card en español, enlazarla aquí al principio (e.g. `README_es.md`).-->
This dataset groups and organizes several datasets present in hugginface (e.g.: PlanTL-GOB-ES/cantemist-ner, PlanTL-GOB-ES/pharmaconer)
and other public resources created by researchers with different formats (e.g.; MedLexSp )
to allow it to be a source of knowledge of large language models in Spanish for the medical domain.
<!--
This dataset groups and organizes several datasets present in hugginface (e.g.: PlanTL-GOB-ES/cantemist-ner, PlanTL-GOB-ES/pharmaconer)
and other public resources created by researchers with different formats (e.g.; MedLexSp ) to allow it to be a source of knowledge of large language models
in Spanish for the medical domain.
-->
[**Dataset Card in Spanish**](README_es.md)
## Dataset Details
### Dataset Description
<!-- Resumen del dataset. -->
- **Curated by:** [Dionis López Ramos](https://www.linkedin.com/in/dionis-lopez-ramos/), [Alvaro Garcia Barragan](https://huggingface.co/Alvaro8gb), [Dylan Montoya](https://huggingface.co/dylanmontoya22), [Daniel Bermúdez](https://huggingface.co/Danielbrdz) <!-- Nombre de los miembros del equipo -->
- **Funded by:** SomosNLP, HuggingFace, Argilla, Universidad de Oriente (Cuba) <!-- Si contasteis con apoyo de otra entidad (e.g. vuestra universidad), añadidla aquí -->
- **Language(s) (NLP):** Spanish (`es-ES`, `es-CL`) <!-- Enumerar las lenguas en las que se ha entrenado el modelo, especificando el país de origen. Utilizar códigos ISO. Por ejemplo: Spanish (`es-CL`, `es-ES`, `es-MX`), Catalan (`ca`), Quechua (`qu`). -->
- **License:** apache-2.0 <!-- Elegid una licencia lo más permisiva posible teniendo en cuenta la licencia del model pre-entrenado y los datasets utilizados -->
### Dataset Sources
- **Repository:** [somosnlp/SMC](https://huggingface.co/datasets/somosnlp/SMC/tree/main)
- **Paper:** "Comming soon!" <!-- Si vais a presentarlo a NAACL poned "WIP", "Comming soon!" o similar. Si no tenéis intención de presentarlo a ninguna conferencia ni escribir un preprint, eliminar. -->
- **Demo:** [somosnlp/SMC/viewer](https://huggingface.co/datasets/somosnlp/SMC/viewer)
- **Video presentation:** [ SpanishMedicaLLM | Proyecto Hackathon #SomosNLP ](https://www.youtube.com/watch?v=tVe_MC7Da6k) <!-- Enlace a vuestro vídeo de presentación en YouTube (están todos subidos aquí: https://www.youtube.com/playlist?list=PLTA-KAy8nxaASMwEUWkkTfMaDxWBxn-8J) -->
## Uses
<!-- Address questions around how the dataset is intended to be used. -->
The use of this dataset is suggested to achieve self-tuning and pre-training of LLM for the medical domain with information in Spanish.
### Direct Use
<!-- This section describes suitable use cases for the dataset. -->
Fine Tuning an LLM instruction in Spanish language with question prompts and answers.
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
The creators of the dataset are not responsible for harmful results that the models may generate when trained with this information.
A rigorous evaluation process with specialists of the results generated by trained LLM models is suggested.
## Dataset Structure
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
<!-- En esta sección podéis enumerar y explicar cada columna del corpus. Para cada columna que sea de tipo "categoría" podéis indicar el porcentaje de ejemplos. -->
For each entry or document in the information source, organize it in a Hugginface dataset as follows:
- **question (raw_text)**: Text associated with the document, question, clinical case or other type of information.
- **answer (topic)**: (Text associated with medical treatment (healthcare_treatment), diagnosis (healthcare_diagnosis),
health topic (topic), answer to a question (answer), other, or be empty e.g. in the open text)
- **speciality**: (Medical specialty to which the raw_text relates, e.g. cardiology, surgery, others)
- **raw_text_type**: (Can be clinic_case, open_text, question or empty)
- **topic_type**: (It can be medical topic, medical diagnosis, answer, natural medicine topic, other, or empty)
- **source**: Identifier of the source associated with the document that appears in the README and description of the dataset.
- **country**: Identifier of the country of origin of the source (e.g.; ch, es) using the ISO 3166-1 alpha-2 standard (Two-letter country codes).
- **document_id**: Document identifier in the source dataset, this value can be empty in case it is not known.
<!-- - **idioma**: (Variedad geográfica) código ISO del idioma -->
<!--- **registro** (Variedad funcional): Siempre es `medio`. -->
<!-- - **periodo** (Variedad histórica): Siempre es `actual`. -->
<!-- - **dominio**: salud (clínico, biomédico, farmacia). -->
<!-- - **tarea**: `pregunta` | `resumen` | `open_text` | `clinic_case`. -->
<!-- - **país_origen**: País de origen de los datos. -->
At the beginning of this construction process, the table in the [Source Data](#source_data) section must be updated.
description of the source of information with the following data:
- **Id**: This will be a number so that the source of information can be referenced in each entry of the data set.
- **Name**: Name of the source from which it comes.
- **Tokens**: Number of tokens it contains.
- **Memory**: Memory size of the dataset generated for huggingface
- **Licencia**: In this case, if it is only for research or if you have another license such as MIT,
Apache 2 or others
- **Address**: URL from where the information can be downloaded or consulted.
- **Country**: Information source country of the using the [ISO 3166-1 standard](https://es.wikipedia.org/wiki/ISO_3166-1) alpha-2 code: 2-letter ISO code assigned to that country or territory.
## Dataset Creation
### Curation Rationale
<!-- Motivation for the creation of this dataset. -->
More than 600 million Spanish speakers need resources, such as LLMs, to obtain medical information freely
and safe, complying with the millennium objectives: Health and Wellbeing, Education and Quality, End of Poverty proposed by the UN.
There are few resources or data sets from the medical domain for training or self-tuning for an LLM in the Spanish language.
To train an LLM in the domain of medicine and healthcare, a large amount of data from this context is needed.
To create a data set in the medical domain, some certification by specialists in corpus construction is necessary.
### Source Data
<!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
| Id | Name | Tokens | Memory | Licencia | Address | Country |
| --- | ----------- | ----------- | ----------- | ----------- | ----------- | ----------- |
| 1 | Cantemist corpus: gold standard of oncology clinical cases annotated with CIE-O 3 terminology | 349287 | 9157 kB | [CC Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/) | https://huggingface.co/datasets/bigbio/cantemist/viewer/cantemist_bigbio_kb | es |
| 2 | MedlinePlus Spanish (National Library of Medicine, NLM) | 7757337 | 35 MB | | https://medlineplus.gov/spanish/ | es |
| 3 | PharmaCoNER | 275955 | 2 MB | [CC Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/) | https://huggingface.co/datasets/PlanTL-GOB-ES/pharmaconer | es |
| 4 | Spanish Biomedical Crawled Corpus | 1973048 | 264 MB | cc-by-4.0 | https://zenodo.org/records/5513237 | es |
| 5 | CARES | 322353 | 1828 kB | Afl-3.0 | https://huggingface.co/datasets/chizhikchi/CARES | es |
| 6 | MEDDOCAN | 364462 | 1639 kB | cc-by-4.0 | https://huggingface.co/datasets/bigbio/meddocan | es |
| 7 | Alvaro8gb/enfermedades-wiki-marzo-2024 | 1424685 | 9073 kB | [MIT](https://choosealicense.com/licenses/mit/) | https://huggingface.co/datasets/Alvaro8gb/enfermedades-wiki-marzo-2024 | es |
| 8 | BioMistral/BioInstructQA(**spanish**) | 1072476 | 5963 kB | [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/) | https://huggingface.co/datasets/BioMistral/BioInstructQA | ca |
| 9 | DisTEMIST | 550203 | 2754 kB | cc-by-4.0 | https://huggingface.co/datasets/bigbio/distemist | es |
| 10 | The Chilean Waiting List Corpus | 678934 | 3116 kB | cc-by-4.0 | https://zenodo.org/records/5518225 or https://huggingface.co/plncmm | cl |
| 11 | BARR2 | 1732432 | 8472 kB | cc-by-4.0 | https://temu.bsc.es/BARR2/downloads/background_set.raw_text.tar.bz2 | es |
| 12 | SPACC | 551849 | 2711 kB | cc-by-4.0 | https://zenodo.org/records/2560316 | es |
| 13 | MedLexSp | 608374 | 21 MByte | MedLexSp is distributed freely for research or educational purposes. You need to sign an agreement with the authors for other purposes. | https://digital.csic.es/handle/10261/270429 | es |
#### Data Collection and Processing
<!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
<!-- Enlazar aquí los scripts y notebooks utilizados para generar el corpus. -->
- [Cantemist corpus](./catemist)
- [MedlinePlus Spanish (National Library of Medicine)](./medlineplus_spanish)
- [PharmaCoNER](./pharmaconer)
- [Spanish Biomedical Crawled Corpus](./spanish_biomedical_craw_corpus)
- [CARES](./cares)
- [MEDDOCAN](./meddocan)
- [Alvaro8gb/enfermedades-wiki-marzo-2024](./wikipedia_datasets)
- [BioMistral/BioInstructQA(**spanish**)](./spanish_biomedical_craw_corpus)
- [DisTEMIST](./distemist)
- [The Chilean Waiting List Corpus](./chileancaselist)
- [BARR2](./barr2)
- [SPACC](./spaccc)
- [MedLexSp](./medlexsp)
**Sugerencias:**
- In [BioMistral/BioInstructQA](https://huggingface.co/datasets/BioMistral/BioInstructQA) the information was used in Spanish. For more information consult the article [BioMistral: A Collection of Open-Source Pretrained Large Language Models for Medical Domains](https://arxiv.org/pdf/2402.10373.pdf?trk=public_post_comment-text).
- In [Cantemist](https://huggingface.co/datasets/bigbio/cantemist/viewer/cantemist_bigbio_kb) a search was made for the code associated with the pathology and it was established as a topic.
- In [CARES](https://huggingface.co/datasets/chizhikchi/CARES) the associated type was searched in the established code table.
#### Who are the source data producers?
<!-- This section describes the people or systems who originally created the data. It should also include self-reported demographic or identity information for the source data creators if this information is available. -->
Different events, NLP competitions or the construction of data sets for LLM such as BioMistral. See [table in Source Data section](#Source)
#### Annotation process
<!-- This section describes the annotation process such as annotation tools used in the process, the amount of data annotated, annotation guidelines provided to the annotators, interannotator statistics, annotation validation, etc. -->
<!-- Enlazar aquí el notebook utilizado para crear el espacio de anotación de Argilla y la guía de anotación. -->
The annotation process was automatic, converting the data sources to the attributes of the new data set.
#### Who are the annotators?
<!-- This section describes the people or systems who created the annotations. -->
See the section [Team](#Team)
#### Personal and Sensitive Information
<!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
In the construction process, it was taken into account that sensitive user data was not included in any of the cases (e.g., clinical cases).
<!-- In the construction process, it was taken into account that sensitive user data was not included in any of the cases (e.g., clinical cases). -->
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
<!-- Aquí podéis mencionar los posibles sesgos heredados según el origen de los datos y de las personas que lo han anotado, hablar del balance de las categorías representadas, los esfuerzos que habéis hecho para intentar mitigar sesgos y riesgos. -->
It is suggested to take into account the scope of the license of each of the sources (e.g., review the source and License field in the previous table).
If you need to filter by data source or other criteria, you can use the properties of the `Dataset` data structure of the framework.
Hugginface. In the following code example, the entries that have a topic type about medical diagnosis or a medical topic are obtained from the data set:
```
spanishMedicaLllmDataset =
load_dataset(SPANISH_MEDICA_LLM_DATASET, split="train")
spanishMedicaLllmDataset =
spanishMedicaLllmDataset.filter(lambda example: example["topic_type"] in ['medical_diagnostic' | 'medical_topic'])
```
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations.
Example:
Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations. -->
Personnel using this dataset must be aware of the risks, biases and limitations of the dataset.
For the autotuning of an LLM, it is suggested to take into account the rows where the topic type (ed., topic_type field) has values: `medical_topic`,
`medical_diagnostic`, `answer`, `natural_medicine_topic`. Because it indicates that this field is not empty and has value for the creation of instructions of the
question and answer form.
For LLM pre-training, it is suggested to take into account when the `raw_text_type` field is equal to `open_text`. This indicates that the text
is not part of a question/answer format but has important value for LLM pre-training.
<!--
In case of using this dataset for the LLM training or finetuning for natural language generating with a production
environment target, we do not recommend the use of these results without a rigorous medical
specialists evaluation and evaluation with higth performances values.
-->
## License
<!-- Indicar bajo qué licencia se libera el dataset explicando, si no es apache 2.0, a qué se debe la licencia más restrictiva (i.e. herencia de los datos utilizados). -->
Apache License 2.0
## Citation
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
```
@software{lopez2024spanishmedicallm,
author = {Lopez Dionis, Garcia Alvaro, Montoya Dylan, Bermúdez Daniel},
title = {SpanishMedicaLLM},
month = February,
year = 2024,
url = {https://huggingface.co/datasets/somosnlp/SMC}
}
```
<!--
Aquí tenéis un ejemplo de cita de un dataset que podéis adaptar:
```
@software{benallal2024cosmopedia,
author = {Ben Allal, Loubna and Lozhkov, Anton and Penedo, Guilherme and Wolf, Thomas and von Werra, Leandro},
title = {Cosmopedia},
month = February,
year = 2024,
url = {https://huggingface.co/datasets/HuggingFaceTB/cosmopedia}
}
```
- benallal2024cosmopedia -> nombre + año + nombre del dataset
- author: lista de miembros del equipo
- title: nombre del dataset
- year: año
- url: enlace al dataset
-->
## More Information
<!-- Indicar aquí que el marco en el que se desarrolló el proyecto, en esta sección podéis incluir agradecimientos y más información sobre los miembros del equipo. Podéis adaptar el ejemplo a vuestro gusto. -->
This project was developed during the [Hackathon #Somos600M](https://somosnlp.org/hackathon) organized by SomosNLP. The dataset was created using `distilabel` by Argilla and endpoints sponsored by HuggingFace.
**Team:**
<!--
- [Name 1](Link to Hugging Face profile)
- [Name 2](Link to Hugging Face profile)
-->
- [Dionis López Ramos](https://huggingface.co/inoid)
- [Alvaro Garcia Barragan](https://huggingface.co/Alvaro8gb)
- [Dylan Montoya](https://huggingface.co/dylanmontoya22)
- [Daniel Bermúdez](https://huggingface.co/Danielbrdz)
## Contact
For any doubt or suggestion contact to: PhD Dionis López ([email protected]) |