Update README.md
Browse files
README.md
CHANGED
@@ -27,10 +27,10 @@ You can use this model with Transformers *pipeline* for NER.
|
|
27 |
```python
|
28 |
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
29 |
|
30 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
31 |
-
model = AutoModelForTokenClassification.from_pretrained("
|
32 |
|
33 |
-
example = "Fue antes de llegar a Sigüeiro, en el Camino de Santiago.
|
34 |
ner_pipe = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
35 |
|
36 |
for ent in ner_pipe(example):
|
|
|
27 |
```python
|
28 |
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
29 |
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained("es_trf_ner_cds_bne-base")
|
31 |
+
model = AutoModelForTokenClassification.from_pretrained("es_trf_ner_cds_bne-base")
|
32 |
|
33 |
+
example = "Fue antes de llegar a Sigüeiro, en el Camino de Santiago. Si te metes en el Franco desde la Alameda, vas hacia la Catedral. Y allí precisamente es Santiago el patrón del pueblo."
|
34 |
ner_pipe = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
35 |
|
36 |
for ent in ner_pipe(example):
|