File size: 1,155 Bytes
1b78c0c 36f9e07 3f41611 d18c7d3 ebbc536 9c8f6ab 1b78c0c 1c35e6c 28d983c 1c35e6c 9c8f6ab 1c35e6c 846f590 2ddc5f9 1c35e6c 2ddc5f9 1c35e6c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
---
pipeline_tag: token-classification
tags:
- named-entity-recognition
- sequence-tagger-model
widget:
- text: "George Washington ging naar Washington"
inference:
parameters:
aggregation_strategy: "simple"
language:
- nl
---
Same model as [flair/ner-dutch-large](https://huggingface.co/flair/ner-dutch-large) but transformed back to pure huggingface pytorch for performance purposes
```python
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("EvanD/dutch-ner-xlm-conll2003")
ner_model = AutoModelForTokenClassification.from_pretrained("EvanD/dutch-ner-xlm-conll2003")
nlp = pipeline("ner", model=ner_model, tokenizer=tokenizer, aggregation_strategy="simple")
example = "George Washington ging naar Washington"
ner_results = nlp(example)
print(ner_results)
# {
# "start_pos": 0,
# "end_pos": 17,
# "text": "George Washington",
# "score": 0.9999986886978149,
# "label": "PER"
# }
# {
# "start_pos": 28,
# "end_pos": 38,
# "text": "Washington",
# "score": 0.9999939203262329,
# "label": "LOC"
# }
```
|