Downloads · 30 days
115
0% of all-time downloads
ZurichNLP/swissbert-ner
swissbert-ner is a token classification model from ZurichNLP. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
The SwissBERT model fine-tuned on the WikiNEuRal dataset for multilingual NER.
Downloads · 30 days
115
0% of all-time downloads
All-time downloads
29.6K
Public
Parameters
152M
1.2 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin610 MB · 50%
How the weights are stored.
F32152M · 100%
From the Hugging Face model README
The SwissBERT model fine-tuned on the WikiNEuRal dataset for multilingual NER.
Supports German, French and Italian as supervised languages and Romansh Grischun as a zero-shot language.
from transformers import pipeline
token_classifier = pipeline(
model="ZurichNLP/swissbert-ner",
aggregation_strategy="simple",
)
token_classifier.model.set_default_language("de_CH")
token_classifier("Mein Name sei Gantenbein.")
Output:
[{'entity_group': 'PER',
'score': 0.5002625,
'word': 'Gantenbein',
'start': 13,
'end': 24}]
token_classifier.model.set_default_language("fr_CH")
token_classifier("J'habite à Lausanne.")
Output:
[{'entity_group': 'LOC',
'score': 0.99955386,
'word': 'Lausanne',
'start': 10,
'end': 19}]
@article{vamvas-etal-2023-swissbert,
title={Swiss{BERT}: The Multilingual Language Model for Switzerland},
author={Jannis Vamvas and Johannes Gra\"en and Rico Sennrich},
year={2023},
eprint={2303.13310},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2303.13310}
}