Update README.md (#8820)

This commit is contained in:
moniquebm
2020-12-11 11:24:21 -03:00
committed by GitHub
parent 649d389dab
commit b161f1ae54

View File

@@ -22,6 +22,17 @@ For more details, please see, (https://github.com/SecexSaudeTCU/noticias_ner).
#### How to use
```python
from transformers import BertForTokenClassification, DistilBertTokenizerFast, pipeline
model = BertForTokenClassification.from_pretrained('monilouise/ner_pt_br')
tokenizer = DistilBertTokenizerFast.from_pretrained('neuralmind/bert-base-portuguese-cased'
, model_max_length=512
, do_lower_case=False
)
nlp = pipeline('ner', model=model, tokenizer=tokenizer, grouped_entities=True)
result = nlp("O Tribunal de Contas da União é localizado em Brasília e foi fundado por Rui Barbosa.")
```
#### Limitations and bias
- The finetunned model was trained on a corpus with around 180 news articles crawled from Google News. The original project's purpose was to recognize named entities in news