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.
The model was trained to identify "Villain" rhetoric based on a codebook containing two primary components: Illegitimacy and Immorality.
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.
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4model_name = "Politics/turkey-chp-villain" # Replace with your actual repo name
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForSequenceClassification.from_pretrained(model_name)
7
8text = "CHP, terör örgütleriyle kol kola yürüyerek ülkeye ihanet ediyor."
9
10inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
11with torch.no_grad():
12 logits = model(**inputs).logits
13
14predicted_class_id = logits.argmax().item()
15print(f"Prediction: {predicted_class_id}")
16# 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.