Downloads · 30 days
8
6% of all-time downloads
Politics/turkey-chp-villain
turkey-chp-villain is a text classification model from Politics. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
This model is a fine-tuned version of dbmdz/convbert-base-turkish-mc4-cased designed to detect "Villain" rhetoric targeting the Republican People's Party (CHP) in Turkish political media.
Downloads · 30 days
8
6% of all-time downloads
All-time downloads
130
Public
Parameters
107M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt860 MB · 67%
From the Hugging Face model README
This model is a fine-tuned version of dbmdz/convbert-base-turkish-mc4-cased designed to detect "Villain" rhetoric targeting the Republican People's Party (CHP) in Turkish political media.
dbmdz/convbert-base-turkish-mc4-casedThe model was trained to identify "Villain" rhetoric based on a codebook containing two primary components: Illegitimacy and Immorality.
Sentences that portray CHP as an illegitimate political actor, specifically:
Sentences that portray CHP as an immoral political actor, specifically:
The model was trained on Politics/turkey-chp-finetune, a dataset of Turkish news sentences.
The model was evaluated on a held-out dataset: Politics/turkey-chp-heldout.
Performance of Checkpoint 1782:
| Metric | Score | Note |
|---|---|---|
| Positive Precision | 0.802 | When model predicts "Villain", it is correct 80.2% of the time. |
| Positive Recall | 0.701 | The model catches 70.1% of all actual "Villain" sentences. |
| Positive F1 | 0.748 | Harmonic mean of precision and recall for the target class. |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "Politics/turkey-chp-villain" # Replace with your actual repo name
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "CHP, terör örgütleriyle kol kola yürüyerek ülkeye ihanet ediyor."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
print(f"Prediction: {predicted_class_id}")
# Output: 1 (Villain) or 0 (Neutral)
I am deeply grateful to the University of Chicago Forum for Free Inquiry and Expression for their generous funding of this research.