--- license: apache-2.0 task_categories: - token-classification language: - el tags: - greek - ner - medical - symptoms size_categories: - 100K` - `` - `\n` (newline characters) - `\t` (tab characters) 2. **Punctuation Removal**: All punctuation marks were removed from the text to ensure consistency. 3. **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](https://stanfordnlp.github.io/stanza/available_biomed_models.html). 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](https://huggingface.co/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](https://huggingface.co/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: 1. **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. 2. **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. 3. **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. 4. **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.