Views
No views yet
| Base Model | Huggingface id (fine-tuned) |
|---|---|
| BERTje | LoicDL/bert-base-dutch-cased-finetuned-snli |
| RobBERT V2 | this model |
| RobBERTje | loicDL/robbertje-dutch-finetuned-snli |
1from transformers import pipeline
2
3classifier = pipeline(
4 task="zero-shot-classification",
5 model='LoicDL/robbert-v2-dutch-finetuned-snli'
6 )
7
8
9text_piece = "Het eten in dit restaurant is heel lekker."
10labels = ["positief", "negatief", "neutraal"]
11template = "Het sentiment van deze review is {}"
12
13predictions = classifier(text_piece,
14 labels,
15 multi_class=False,
16 hypothesis_template=template
17 )| Model | Accuracy [%] | F1 [%] |
|---|---|---|
| bert-base-dutch-cased-finetuned-snli | 86.21 | 86.42 |
| robbert-v2-dutch-finetuned-snli | 87.61 | 88.02 |
| robbertje-dutch-finetuned-snli | 83.28 | 84.11 |
1@article{De Langhe_Maladry_Vanroy_De Bruyne_Singh_Lefever_2024,
2title={Benchmarking Zero-Shot Text Classification for Dutch},
3volume={13},
4url={https://www.clinjournal.org/clinj/article/view/172},
5journal={Computational Linguistics in the Netherlands Journal},
6author={De Langhe, Loic and Maladry, Aaron and Vanroy, Bram and De Bruyne, Luna and Singh, Pranaydeep and Lefever, Els and De Clercq, Orphée},
7year={2024},
8month={Mar.},
9pages={63–90} }