The model is finetuned for negation detection on Dutch clinical text. Since it is a domain-specific model trained on medical data, it is meant to be used on medical NLP tasks for Dutch. This particular model is trained on a 32-max token windows surrounding the concept-to-be negated. Note that we also trained a biLSTM which can be incorporated in
MedCAT
.
Minimal example
tokenizer = AutoTokenizer\
.from_pretrained("UMCU/MedRoBERTa.nl_NegationDetection")
model = AutoModelForTokenClassification\
.from_pretrained("UMCU/MedRoBERTa.nl_NegationDetection")
some_text = "De patient was niet aanspreekbaar en hij zag er grauw uit. \Hij heeft de inspanningstest echter goed doorstaan."
inputs = tokenizer(some_text, return_tensors='pt')
output = model.forward(inputs)
probas = torch.nn.functional.softmax(output.logits[0]).detach().numpy()
# koppel aan tokens
input_tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
target_map = {0: 'B-Negated', 1:'B-NotNegated',2:'I-Negated',3:'I-NotNegated'}
results = [{'token': input_tokens[idx],
'proba_negated': proba_arr[0]+proba_arr[2],
'proba_not_negated': proba_arr[1]+proba_arr[3]
}
for idx,proba_arr inenumerate(probas)]
Paper: Pieter Delobelle, Thomas Winters, Bettina Berendt (2020), RobBERT: a Dutch RoBERTa-based Language Model, Findings of the Association for Computational Linguistics: EMNLP 2020
Paper: Bram van Es, Leon C. Reteig, Sander C. Tan, Marijn Schraagen, Myrthe M. Hemker, Sebastiaan R.S. Arends, Miguel A.R. Rios, Saskia Haitjema (2022): Negation detection in Dutch clinical texts: an evaluation of rule-based and machine learning methods, Arxiv
Runs of UMCU RobBERT_NegationDetection_32xTokenWindow on huggingface.co
9
Total runs
0
24-hour runs
0
3-day runs
-1
7-day runs
-1
30-day runs
More Information About RobBERT_NegationDetection_32xTokenWindow huggingface.co Model
More RobBERT_NegationDetection_32xTokenWindow license Visit here:
RobBERT_NegationDetection_32xTokenWindow huggingface.co is an AI model on huggingface.co that provides RobBERT_NegationDetection_32xTokenWindow's model effect (), which can be used instantly with this UMCU RobBERT_NegationDetection_32xTokenWindow model. huggingface.co supports a free trial of the RobBERT_NegationDetection_32xTokenWindow model, and also provides paid use of the RobBERT_NegationDetection_32xTokenWindow. Support call RobBERT_NegationDetection_32xTokenWindow model through api, including Node.js, Python, http.
RobBERT_NegationDetection_32xTokenWindow huggingface.co is an online trial and call api platform, which integrates RobBERT_NegationDetection_32xTokenWindow's modeling effects, including api services, and provides a free online trial of RobBERT_NegationDetection_32xTokenWindow, you can try RobBERT_NegationDetection_32xTokenWindow online for free by clicking the link below.
UMCU RobBERT_NegationDetection_32xTokenWindow online free url in huggingface.co:
RobBERT_NegationDetection_32xTokenWindow is an open source model from GitHub that offers a free installation service, and any user can find RobBERT_NegationDetection_32xTokenWindow on GitHub to install. At the same time, huggingface.co provides the effect of RobBERT_NegationDetection_32xTokenWindow install, users can directly use RobBERT_NegationDetection_32xTokenWindow installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
RobBERT_NegationDetection_32xTokenWindow install url in huggingface.co: