Token Classification
Transformers
PyTorch
Dutch
xlm-roberta
named-entity-recognition
sequence-tagger-model
Instructions to use EvanD/dutch-ner-xlm-conll2003 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EvanD/dutch-ner-xlm-conll2003 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="EvanD/dutch-ner-xlm-conll2003")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("EvanD/dutch-ner-xlm-conll2003") model = AutoModelForTokenClassification.from_pretrained("EvanD/dutch-ner-xlm-conll2003") - Notebooks
- Google Colab
- Kaggle
Contrary to my other models, this one is purely a repackaging of flair/ner-dutch-large but transformed back to pure huggingface pytorch for performance purposes.
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"
# }
- Downloads last month
- 434