rigonsallauka commited on
Commit
d4ddfc6
1 Parent(s): f5ced79

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -3
README.md CHANGED
@@ -1,3 +1,66 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - rigonsallauka/spanish_ner_dataset
5
+ language:
6
+ - es
7
+ metrics:
8
+ - f1
9
+ - precision
10
+ - recall
11
+ - confusion_matrix
12
+ base_model:
13
+ - google-bert/bert-base-cased
14
+ pipeline_tag: token-classification
15
+ tags:
16
+ - NER
17
+ - medical
18
+ - symptom
19
+ - extraction
20
+ - spanish
21
+ ---
22
+ # Spanish Medical NER
23
+
24
+ ## Use
25
+ - **Primary Use Case**: This model is designed to extract medical entities such as symptoms, diagnostic tests, and treatments from clinical text in the Spanish language.
26
+ - **Applications**: Suitable for healthcare professionals, clinical data analysis, and research into medical text processing.
27
+ - **Supported Entity Types**:
28
+ - `PROBLEM`: Diseases, symptoms, and medical conditions.
29
+ - `TEST`: Diagnostic procedures and laboratory tests.
30
+ - `TREATMENT`: Medications, therapies, and other medical interventions.
31
+
32
+ ## Training Data
33
+ - **Data Sources**: Annotated datasets, including clinical data and translations of English medical text into Spanish.
34
+ - **Data Augmentation**: The training dataset underwent data augmentation techniques to improve the model's ability to generalize to different text structures.
35
+ - **Dataset Split**:
36
+ - **Training Set**: 80%
37
+ - **Validation Set**: 10%
38
+ - **Test Set**: 10%
39
+
40
+ ## Model Training
41
+ - **Training Configuration**:
42
+ - **Optimizer**: AdamW
43
+ - **Learning Rate**: 3e-5
44
+ - **Batch Size**: 64
45
+ - **Epochs**: 200
46
+ - **Loss Function**: Focal Loss to handle class imbalance
47
+ - **Frameworks**: PyTorch, Hugging Face Transformers, SimpleTransformers
48
+
49
+ ## How to Use
50
+ You can easily use this model with the Hugging Face `transformers` library. Here's an example of how to load and use the model for inference:
51
+
52
+ ```python
53
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
54
+ import torch
55
+
56
+ model_name = "rigonsallauka/spanish_medical_ner"
57
+
58
+ # Load the tokenizer and model
59
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
60
+ model = AutoModelForTokenClassification.from_pretrained(model_name)
61
+
62
+ # Sample text for inference
63
+ text = "El paciente se quejó de fuertes dolores de cabeza y náuseas que habían persistido durante dos días. Para aliviar los síntomas, se le recetó paracetamol y se le aconsejó descansar y beber muchos líquidos."
64
+
65
+ # Tokenize the input text
66
+ inputs = tokenizer(text, return_tensors="pt")