alexandrainst/dane
Updated • 328 • 3
How to use alexandrainst/da-ner-base with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="alexandrainst/da-ner-base") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("alexandrainst/da-ner-base")
model = AutoModelForTokenClassification.from_pretrained("alexandrainst/da-ner-base")The model tags tokens (in Danish sentences) with named entity tags (BIO format) [PER, ORG, LOC, MISC]. The pretrained language model used for fine-tuning is the Danish BERT by BotXO.
See the DaNLP documentation for more details.
Here is how to use the model:
from transformers import BertTokenizer, BertForTokenClassification
model = BertForTokenClassification.from_pretrained("alexandrainst/da-ner-base")
tokenizer = BertTokenizer.from_pretrained("alexandrainst/da-ner-base")
The model has been trained on the DaNE.