license: apache-2.0
task_categories:
- token-classification
language:
- el
tags:
- greek
- ner
- medical
- symptoms
size_categories:
- 100K<n<1M
Greek NER dataset
Acknowledgement
This dataset had been created as part of joint research of HUMADEX research group (https://www.linkedin.com/company/101563689/) and has received funding by the European Union Horizon Europe Research and Innovation Program project SMILE (grant number 101080923) and Marie Skłodowska-Curie Actions (MSCA) Doctoral Networks, project BosomShield ((rant number 101073222). Responsibility for the information and views expressed herein lies entirely with the authors. Authors: dr. Izidor Mlakar, Rigon Sallauka, dr. Umut Arioz, dr. Matej Rojc
Dataset Building
Data Integration and Preprocessing
We begin by merging two distinct datasets of English medical texts. This step ensures a robust and diverse corpus, combining the strengths of both datasets. Following the integration, we preprocess the texts to clean the data, which includes removal of strings that do not contain relevant information. This preprocessing step is crucial to ensure the texts are in an optimal format for subsequent annotation.
- Dataset 1: Kabatubare/autotrain-data-1w6s-u4vt-i7yo
- Dataset 2: s200862/medical_qa_meds
The data underwent a preprocessing process.
Data Cleaning: Since our dataset consisted of question-answer pairs between a user and an assistant, some extraneous text could be removed without losing relevant information.
- In the Kabatubare/autotrain-data-1w6s-u4vt-i7yo dataset, we removed the following strings:
Human:
Assistant:
\n
(newline characters)\t
(tab characters)Hyphens between words (
-
) were replaced with a single space.
- In the s200862/medical_qa_meds dataset, we removed:
[INST]
[/INST]
<s>
</s>
\n
(newline characters)\t
(tab characters)
- In the Kabatubare/autotrain-data-1w6s-u4vt-i7yo dataset, we removed the following strings:
Punctuation Removal: All punctuation marks were removed from the text to ensure consistency.
Lowercasing: Finally, the entire dataset was converted to lowercase to standardize the text.
Annotation with Stanza's i2b2 Clinical Model
The preprocessed English texts are then annotated using Stanza's i2b2 Clinical Model. This model is specifically designed for clinical text processing, and it annotates each text with three labels: - PROBLEM: Includes diseases, symptoms, and medical conditions. - TEST: Represents diagnostic procedures and laboratory tests.
TREATMENT: Covers medications, therapies, and other medical interventions.
This annotation step is essential for creating a labeled dataset that serves as the foundation for training and evaluating Named Entity Recognition (NER) models.
We used Stanza's clinical-domain NER system, which contains a general-purpose NER model trained on the 2010 i2b2/VA dataset. This model efficiently extracts entities related to problems, tests, and treatments from various types of clinical notes.
Tag encodings:
- "O": 0
- "B-PROBLEM": 1
- "I-PROBLEM": 2
- "E-PROBLEM": 3
- "S-PROBLEM": 4
- "B-TREATMENT": 5
- "I-TREATMENT": 6
- "E-TREATMENT": 7
- "S-TREATMENT": 8
- "B-TEST": 9
- "I-TEST": 10
- "E-TEST": 11
- "S-TEST": 12
Translation into Greek
The annotated English dataset is translated into Greek: Model name: Helsinki-NLP/opus-mt-en-el Model was developed by Language Technology Research Group at the University of Helsinki. Model Type is Translation.
Word Alignment
Model: aneuraz/awesome-align-with-co
This method is for extracting alignments between words in parallel sentences using contextual word embeddings from models like BERT . Main processing steps:
Contextual Word Embeddings: Powerful models like BERT capture the meaning of words based on their context in a sentence. These models can be used to generate numerical representations (embeddings) for each word in a sentence.
Alignment Scores: The method calculates alignment scores between words in two parallel sentences (sentences in different languages that mean the same thing). Two approaches are used:
- Probability Thresholding: This method uses a similarity matrix based on the dot product of word embeddings. It then applies a function (like softmax) to turn similarities into probabilities and identifies high-probability pairs as aligned.
- Optimal Transport: This approach views alignment as a transportation problem, where the goal is to move "probability mass" between words in a way that minimizes cost (distance between word embeddings). The resulting matrix shows likely alignments.
Bidirectional Alignments: The method considers alignments in both directions (source to target and target to source). The final alignment is obtained by finding the intersection of alignments in both directions.
Subword Handling: Since some models work with subwords (parts of words), the method considers two words aligned if any of their subwords are aligned.
Overall, this approach leverages contextual word embeddings and different techniques to find corresponding words between sentences in different languages.
Data Augmentation
We performed data augmentation to enhance the diversity and robustness of the training data. The augmentation process involved two main strategies:
- Sentence Reordering: Words within each sentence were reordered to create new variations of the same sentence structure. This method increases the variability of the dataset, enabling the model to generalize better to different sentence formations.
- Entity Extraction: All words within each sentence that were annotated with non-"O" labels (i.e., labeled as PROBLEM, TEST, or TREATMENT) were extracted and used to generate new sentences. These sentences were then added back into the dataset, ensuring that the model would encounter more examples of key medical entities during training.