Commit ·
40e5cb2
1
Parent(s): 93d1f3d
update readme after moving repo
Browse files
README.md
CHANGED
|
@@ -7,7 +7,7 @@ language:
|
|
| 7 |
|
| 8 |
This model card aims to simplify the use of the [portuguese Bert, a.k.a, Bertimbau](https://github.com/neuralmind-ai/portuguese-bert) for the Named Entity Recognition task.
|
| 9 |
|
| 10 |
-
For this model card the we used the BERT-CRF (selective scenario, 5 classes) model available in the [
|
| 11 |
|
| 12 |
## Usage
|
| 13 |
|
|
@@ -15,8 +15,8 @@ For this model card the we used the BERT-CRF (selective scenario, 5 classes) mod
|
|
| 15 |
# Load model directly
|
| 16 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 17 |
|
| 18 |
-
tokenizer = AutoTokenizer.from_pretrained("marquesafonso/bertimbau-large-ner")
|
| 19 |
-
model = AutoModelForTokenClassification.from_pretrained("marquesafonso/bertimbau-large-ner")
|
| 20 |
|
| 21 |
```
|
| 22 |
|
|
@@ -25,7 +25,7 @@ model = AutoModelForTokenClassification.from_pretrained("marquesafonso/bertimbau
|
|
| 25 |
```
|
| 26 |
from transformers import pipeline
|
| 27 |
|
| 28 |
-
pipe = pipeline("ner", model="marquesafonso/bertimbau-large-ner", aggregation_strategy='simple')
|
| 29 |
|
| 30 |
sentence = "Acima de Ederson, abaixo de Rúben Dias. É entre os dois jogadores do Manchester City que se vai colocar Gonçalo Ramos no ranking de vendas mais avultadas do Benfica."
|
| 31 |
|
|
|
|
| 7 |
|
| 8 |
This model card aims to simplify the use of the [portuguese Bert, a.k.a, Bertimbau](https://github.com/neuralmind-ai/portuguese-bert) for the Named Entity Recognition task.
|
| 9 |
|
| 10 |
+
For this model card the we used the `BERT-CRF (selective scenario, 5 classes)` model available in the [ner_evaluation](https://github.com/neuralmind-ai/portuguese-bert/tree/master/ner_evaluation) folder of the original Bertimbau repo.
|
| 11 |
|
| 12 |
## Usage
|
| 13 |
|
|
|
|
| 15 |
# Load model directly
|
| 16 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 17 |
|
| 18 |
+
tokenizer = AutoTokenizer.from_pretrained("marquesafonso/bertimbau-large-ner-selective")
|
| 19 |
+
model = AutoModelForTokenClassification.from_pretrained("marquesafonso/bertimbau-large-ner-selective")
|
| 20 |
|
| 21 |
```
|
| 22 |
|
|
|
|
| 25 |
```
|
| 26 |
from transformers import pipeline
|
| 27 |
|
| 28 |
+
pipe = pipeline("ner", model="marquesafonso/bertimbau-large-ner-selective", aggregation_strategy='simple')
|
| 29 |
|
| 30 |
sentence = "Acima de Ederson, abaixo de Rúben Dias. É entre os dois jogadores do Manchester City que se vai colocar Gonçalo Ramos no ranking de vendas mais avultadas do Benfica."
|
| 31 |
|