tokenizer = AutoTokenizer\
.from_pretrained("UMCU/MedRoBERTa.nl_Experiencer")
model = AutoModelForTokenClassification\
.from_pretrained("UMCU/MedRoBERTa.nl_Experiencer")
some_text = "De patient was niet aanspreekbaar en hij zag er grauw uit. \Hij heeft de inspanningstest echter goed doorstaan. \De broer heeft onlangs een operatie ondergaan."
inputs = tokenizer(some_text, return_tensors='pt')
output = model.forward(inputs)
probas = torch.nn.functional.softmax(output.logits[0]).detach().numpy()
# associate with tokens
input_tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
target_map = {0: 'B-Patient', 1:'B-Other',2:'I-Patient',3:'I-Other'}
results = [{'token': input_tokens[idx],
'proba_patient': proba_arr[0]+proba_arr[2],
'proba_other': proba_arr[1]+proba_arr[3]
}
for idx,proba_arr inenumerate(probas)]
The medical entity classifiers are (being) integrated in the opensource library
clinlp
, feel free to contact
us for access, either through Huggingface or through git.
The model is finetuned for experiencer 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 64-max token windows surrounding the concept-to-be labeled.
Data
The pre-trained model was trained on nearly 10 million hospital notes from the Amsterdam University Medical Centres.
The training data was anonymized before starting the pre-training procedure.
Paper: Verkijk, S. & Vossen, P. (2022) MedRoBERTa.nl: A Language Model for Dutch Electronic Health Records. Computational Linguistics in the Netherlands Journal, 11.
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 MedRoBERTa.nl_Experiencer on huggingface.co
78
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
71
30-day runs
More Information About MedRoBERTa.nl_Experiencer huggingface.co Model
More MedRoBERTa.nl_Experiencer license Visit here:
MedRoBERTa.nl_Experiencer huggingface.co is an AI model on huggingface.co that provides MedRoBERTa.nl_Experiencer's model effect (), which can be used instantly with this UMCU MedRoBERTa.nl_Experiencer model. huggingface.co supports a free trial of the MedRoBERTa.nl_Experiencer model, and also provides paid use of the MedRoBERTa.nl_Experiencer. Support call MedRoBERTa.nl_Experiencer model through api, including Node.js, Python, http.
MedRoBERTa.nl_Experiencer huggingface.co is an online trial and call api platform, which integrates MedRoBERTa.nl_Experiencer's modeling effects, including api services, and provides a free online trial of MedRoBERTa.nl_Experiencer, you can try MedRoBERTa.nl_Experiencer online for free by clicking the link below.
UMCU MedRoBERTa.nl_Experiencer online free url in huggingface.co:
MedRoBERTa.nl_Experiencer is an open source model from GitHub that offers a free installation service, and any user can find MedRoBERTa.nl_Experiencer on GitHub to install. At the same time, huggingface.co provides the effect of MedRoBERTa.nl_Experiencer install, users can directly use MedRoBERTa.nl_Experiencer installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
MedRoBERTa.nl_Experiencer install url in huggingface.co: