German Irony Detection Model πŸ‡©πŸ‡ͺ

Overview

This model detects irony in German text using a fine-tuned BERT architecture. It builds upon the German sentiment analysis work by Guhr et al. (2020) and incorporates tuning procedures from LΓΌdke et al. (2021).

Model Description

  • Task: Binary classification (ironic vs. non-ironic)
  • Language: German
  • Base Model: BERT
  • Training Data: Combined dataset from Schmidt & Harbusch (2023) and Claude by Anthropic (2025)
  • Training Infrastructure: CPU-based training

Performance Metrics

Cross-Validation Results (5-fold)

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

Hold-out Test Set Performance

Class Precision Recall F1-Score
Not Ironic 0.8000 0.9600 0.8727
Ironic 0.9500 0.7600 0.8444

Usage

from transformers import AutoModelForSequenceClassification, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("username/german-irony-detector")
model = AutoModelForSequenceClassification.from_pretrained("username/german-irony-detector")

def predict(text):
    inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
    outputs = model(**inputs)
    probabilities = outputs.logits.softmax(dim=-1)
    return probabilities

Limitations

  • Optimized for German social media text
  • May not capture very subtle forms of irony
  • Performance may vary with regional German dialects
  • Limited to text-based irony detection

Training Data

The model was trained on:

  1. Schmidt & Harbusch (2023) dataset:
    • Training set: 200 texts
    • Test set: 100 texts
  2. Synthetic data generated by Claude (Anthropic, 2025)

Future Development

  • Train on larger datasets
  • Add positive/negative irony classification

More Information

For detailed documentation, additional resources, and the full research context, please visit my GitHub repository: https://github.com/JacobSKN/german-irony-detector

Citations

@misc{guhr2020german,
    title={German Sentiment Analysis},
    author={Guhr, Oliver and et al.},
    year={2020},
    howpublished={\url{https://github.com/oliverguhr/german-sentiment-lib}}
}

@misc{schmidt2023german,
    title={German Irony Dataset},
    author={Schmidt and Harbusch},
    year={2023}
}

Author

Jacob Schildknecht ([email protected])

Contact

For questions or feedback about this model, please contact: [email protected]

Downloads last month
11
Safetensors
Model size
109M params
Tensor type
F32
Β·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.