phuong-tk-nguyen/vipubmed-deberta-base-en-vimedner-ner-vi
040
ViPubMedDeBERTa-base-En-ViMedNER-Vi
Fine-tuned `manhtt-079/vipubmed-deberta-base` for Vietnamese biomedical Named Entity Recognition with UMLS semantic-type labels, trained on the Vietnamese split of **En-ViMedNER**.
- Input: word-segmented Vietnamese biomedical text
- Output: BIO tags over 21 UMLS semantic types
- Details: see our EMNLP paper [TO-DO: add link]
Preprocessing Requirement - Word Segmentation
Vietnamese input should be word-segmented with [VnCoreNLP](https://github.com/vncorenlp/VnCoreNLP) (RDRSegmenter) before inference, since the model was fine-tuned on word-segmented text.
How to Use
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
model_id = "phuong-tk-nguyen/vipubmed-deberta-base-en-vimedner-ner-vi"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
ner = pipeline("token-classification", model=model, tokenizer=tokenizer,
aggregation_strategy="simple")
segmented_text = "Nhóm chẩn_đoán phổ_biến nhất dẫn đến nhập_viện là các bệnh_lý tim_mạch."
print(ner(segmented_text))
# [{'entity_group': 'T033', 'score': np.float32(0.7057605), 'word': 'chẩn_đoán', 'start': 4, 'end': 14}, {'entity_group': 'T058', 'score': np.float32(0.8302413), 'word': '', 'start': 36, 'end': 37}, {'entity_group': 'T058', 'score': np.float32(0.4629524), 'word': 'nhập_viện', 'start': 37, 'end': 46}, {'entity_group': 'T038', 'score': np.float32(0.7310076), 'word': 'các bệnh_lý tim', 'start': 49, 'end': 65}]Related
Another model variation: `phuong-tk-nguyen/vipubmed-deberta-xsmall-en-vimedner-ner-vi`
