bvanaken commited on
Commit
d2f8eb8
1 Parent(s): f272731

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -8
README.md CHANGED
@@ -14,28 +14,39 @@ tags:
14
 
15
  ## Model description
16
 
17
- The model is introduced in the paper [Assertion Detection in Clinical Notes: Medical Language Models to the Rescue?
18
- ](https://aclanthology.org/2021.nlpmc-1.5/).
19
- It is based on the [ClinicalBERT - Bio + Discharge Summary BERT Model](https://huggingface.co/emilyalsentzer/Bio_Discharge_Summary_BERT) by Alsentzer et al. and fine-tuned on assertion data from the [2010 i2b2 challenge](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3168320/).
 
20
 
21
 
22
  #### How to use the model
23
 
24
  You can load the model via the transformers library:
25
  ```
26
- from transformers import AutoTokenizer, AutoModel
27
  tokenizer = AutoTokenizer.from_pretrained("bvanaken/clinical-assertion-negation-bert")
28
- model = AutoModel.from_pretrained("bvanaken/clinical-assertion-negation-bert")
 
29
  ```
30
- The model expects input in the form of spans/sentences with one marked entity to classify as `PRESENT`, `ABSENT` or `POSSIBLE`. The entity in question is identified with the special token `[entity]` surrounding it.
31
 
32
- Example input:
 
 
33
  ```
34
- The patient recovered during the night and now denies any [entity] shortness of breath [entity].
 
 
 
 
 
 
35
  ```
36
 
37
  ### Cite
38
 
 
 
39
  ```bibtex
40
  @inproceedings{van-aken-2021-assertion,
41
  title = "Assertion Detection in Clinical Notes: Medical Language Models to the Rescue?",
 
14
 
15
  ## Model description
16
 
17
+ The Clinical Assertion and Negation Classification BERT is introduced in the paper [Assertion Detection in Clinical Notes: Medical Language Models to the Rescue?
18
+ ](https://aclanthology.org/2021.nlpmc-1.5/). The model helps structure information in clinical patient letters by classifying medical conditions mentioned in the letter into PRESENT, ABSENT and POSSIBLE.
19
+
20
+ The model is based on the [ClinicalBERT - Bio + Discharge Summary BERT Model](https://huggingface.co/emilyalsentzer/Bio_Discharge_Summary_BERT) by Alsentzer et al. and fine-tuned on assertion data from the [2010 i2b2 challenge](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3168320/).
21
 
22
 
23
  #### How to use the model
24
 
25
  You can load the model via the transformers library:
26
  ```
27
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
28
  tokenizer = AutoTokenizer.from_pretrained("bvanaken/clinical-assertion-negation-bert")
29
+ model = AutoModelForSequenceClassification.from_pretrained("bvanaken/clinical-assertion-negation-bert")
30
+
31
  ```
 
32
 
33
+ The model expects input in the form of spans/sentences with one marked entity to classify as `PRESENT(0)`, `ABSENT(1)` or `POSSIBLE(2)`. The entity in question is identified with the special token `[entity]` surrounding it.
34
+
35
+ Example input and inference:
36
  ```
37
+ input = "The patient recovered during the night and now denies any [entity] shortness of breath [entity]."
38
+
39
+ tokenized_input = tokenizer(input, return_tensors="pt")
40
+ output = model(**tokenized_input)
41
+
42
+ import numpy as np
43
+ predicted_label = np.argmax(output.logits.detach().numpy()) ## 1 == ABSENT
44
  ```
45
 
46
  ### Cite
47
 
48
+ When working with the model, please cite our paper as follows:
49
+
50
  ```bibtex
51
  @inproceedings{van-aken-2021-assertion,
52
  title = "Assertion Detection in Clinical Notes: Medical Language Models to the Rescue?",