Text Classification
Transformers
Safetensors
Icelandic
roberta
icelandic
sequence-classification
irony
sarcasm
social-media
text-embeddings-inference
Instructions to use AMBJ24/icelandic-irony with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AMBJ24/icelandic-irony with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="AMBJ24/icelandic-irony")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("AMBJ24/icelandic-irony") model = AutoModelForSequenceClassification.from_pretrained("AMBJ24/icelandic-irony") - Notebooks
- Google Colab
- Kaggle
Icelandic Irony Detector (RoBERTa, Icelandic)
Task: binary sequence classification → ["not_ironic", "ironic"]
Base model: mideind/IceBERT-igc (Icelandic RoBERTa)
Intended domain: Icelandic social-media style text (short, informal; emojis, punctuation variants).
TL;DR
A compact Icelandic RoBERTa fine-tuned to recognize ironic vs non-ironic sentences.
Useful as a filter to reduce misunderstandings in online communication.
How to use
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "ambj24/icelandic-irony"
tok = AutoTokenizer.from_pretrained(model_id)
mod = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "Já, frábær þjónusta… 😑"
inputs = tok(text, return_tensors="pt")
logits = mod(**inputs).logits
probs = logits.softmax(-1).tolist()[0]
labels = ["not_ironic", "ironic"]
pred = labels[probs.index(max(probs))]
print(pred, dict(zip(labels, probs)))
Input length: works well for short posts; we trained with a max length around 128 tokens.
Mix: Icelandic social-media style text.
- Downloads last month
- 2