Update README.md (#8820)
This commit is contained in:
@@ -22,6 +22,17 @@ For more details, please see, (https://github.com/SecexSaudeTCU/noticias_ner).
|
|||||||
|
|
||||||
#### How to use
|
#### 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
|
#### 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
|
- 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
|
||||||
|
|||||||
Reference in New Issue
Block a user