Downloads · 30 days
0
niltonseixas/NER
NER is a machine learning model from niltonseixas. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for adapter-transformers.
This model aims to demonstrate an extraction of entities from from medical texts. It gets the name of the doctor, his registration code (CRM), the substance and the dose prescribed in PtBR.
Downloads · 30 days
0
Access
Public
Updated Nov 21, 2023
Repo size
2.7 GB
Likes
0
Public
Click a slice to open those files.
.bin1.3 GB · 100%
From the Hugging Face model README
This model aims to demonstrate an extraction of entities from from medical texts. It gets the name of the doctor, his registration code (CRM), the substance and the dose prescribed in Pt_BR.
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("niltonseixas/NER_tokenizer")
model = AutoModelForTokenClassification.from_pretrained("niltonseixas/NER")
nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy = "average")
example = "dra. Nayara Barbosa, CRM 12345 receitou Amoxilina 50 mg"
ner_results = nlp(example)
print(ner_results)