Views
No views yet
| Metric | Mean | Std Dev |
|---|---|---|
| Accuracy | 0.9651 | 0.0154 |
| Precision | 0.9731 | 0.0117 |
| Recall | 0.9632 | 0.0198 |
| F1-Score | 0.9681 | 0.0141 |
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Not Ironic | 0.8000 | 0.9600 | 0.8727 |
| Ironic | 0.9500 | 0.7600 | 0.8444 |
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("username/german-irony-detector")
4model = AutoModelForSequenceClassification.from_pretrained("username/german-irony-detector")
5
6def predict(text):
7 inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
8 outputs = model(**inputs)
9 probabilities = outputs.logits.softmax(dim=-1)
10 return probabilities1@misc{guhr2020german,
2 title={German Sentiment Analysis},
3 author={Guhr, Oliver and et al.},
4 year={2020},
5 howpublished={\url{https://github.com/oliverguhr/german-sentiment-lib}}
6}
7
8@misc{schmidt2023german,
9 title={German Irony Dataset},
10 author={Schmidt and Harbusch},
11 year={2023}
12}