Downloads · 30 days
3
0% of all-time downloads
DT4H-IE/CardioBERTa.nl_clinical_NL_MED
CardioBERTa.nl_clinical_NL_MED is a token classification model from DT4H-IE. Use it when you need labels on individual words, such as names. The card lists the license as mit.
This a UMCU/CardioBERTa.nlclinical base model finetuned for span classification. For this model we used IOB-tagging. Using the IOB-tagging schema facilitates the aggregation of predictions over sequences. This specifi…
Downloads · 30 days
3
0% of all-time downloads
All-time downloads
602
Public
Parameters
251M
3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1 GB · 99%
From the Hugging Face model README
This a UMCU/CardioBERTa.nl_clinical base model finetuned for span classification. For this model we used IOB-tagging. Using the IOB-tagging schema facilitates the aggregation of predictions over sequences. This specific model is trained on a batch of 240 span-labeled documents.
The input should be a string with Dutch cardio clinical text.
CardioNER model --medication is a muticlass span classification model. The classes that can be predicted are ['medication'].
The following script converts a string of <512 tokens to a list of span predictions.
from transformers import pipeline
le_pipe = pipeline('ner',
model=model,
tokenizer=model, aggregation_strategy="simple",
device=-1)
named_ents = le_pipe(SOME_TEXT)
To process a string of arbitrary length you can split the string into sentences or paragraphs using e.g. pysbd or spacy(sentencizer) and iteratively parse the list of with the span-classification pipe.
Alternatively you might try
named_ents = le_pipe(SOME_TEXT, stride=256)
50/50 Train/validation split on CardioCCC, a manually labeled cardiology corpus
This is part of the DT4H project.
For more details about training/eval and other scripts, see CardioNER github repo. and for more information on the background, see Datatools4Heart Huggingface/Website