rigonsallauka commited on
Commit
7f061b9
1 Parent(s): 1296ef5

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/portugese_ner_dataset
5
+ language:
6
+ - pt
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
+ - symptoms
19
+ - extraction
20
+ - portugese
21
+ ---
22
+ # Portugese 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 Portugese 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 Portugese.
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/portugese_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 = "O paciente reclamou de fortes dores de cabeça e náusea que persistiram por dois dias. Para aliviar os sintomas, foi prescrito paracetamol e recomendado descansar e beber bastante líquidos."
64
+
65
+ # Tokenize the input text
66
+ inputs = tokenizer(text, return_tensors="pt")