rigonsallauka commited on
Commit
13c0943
1 Parent(s): 9501d7d

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/polish_ner_dataset
5
+ language:
6
+ - pl
7
+ metrics:
8
+ - f1
9
+ - recall
10
+ - precision
11
+ - confusion_matrix
12
+ base_model:
13
+ - google-bert/bert-base-cased
14
+ pipeline_tag: token-classification
15
+ tags:
16
+ - NER
17
+ - medical
18
+ - extraction
19
+ - symptom
20
+ - polish
21
+ ---
22
+ # Polish 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 Polish 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 Polish.
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/polish_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 = "Pacjent skarżył się na silne bóle głowy i nudności, które utrzymywały się przez dwa dni. W celu złagodzenia objawów przepisano mu paracetamol oraz zalecono odpoczynek i picie dużej ilości płynów."
64
+
65
+ # Tokenize the input text
66
+ inputs = tokenizer(text, return_tensors="pt")