NER / README.md
niltonseixas's picture
Update README.md
e8cf294
---
language:
- pt
library_name: adapter-transformers
---
# NER of medications
<!-- Provide a quick summary of what the model is/does. -->
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.
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [Nilton Seixas]
- **Language(s) (NLP):** [Brazilian portuguese]
- **License:** [More Information Needed]
- **Finetuned from model [optional]:** [neuralmind/bert-large-portuguese-cased]
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [niltonseixas/NER]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
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)