Downloads · 30 days
0
sofiagzzloz/political-persuasion-model
political-persuasion-model is a text classification model from sofiagzzloz. Use it when you need a label for a piece of text. It is set up for scikit-learn. The card lists the license as mit.
This repository contains a runnable hybrid multi-label classifier for rhetorical strategy detection in political speech segments.
Downloads · 30 days
0
Access
Public
Updated Apr 9, 2026
Repo size
4.8 MB
Likes
2
Public
Click a slice to open those files.
.joblib4.8 MB · 99%
From the Hugging Face model README
This repository contains a runnable hybrid multi-label classifier for rhetorical strategy detection in political speech segments.
It predicts six labels:
emotion_appealauthority_appealpolarizationpresumptionexaggerationrhetorical_framingThis is a hybrid architecture that combines:
1-2 grams), anddistilbert-base-uncased, mean pooled),then trains one RandomForest classifier per label with label-specific thresholds.
artifacts/tfidf_vectorizer.joblibartifacts/classifier_<label>.joblib (one per label)artifacts/thresholds.jsonartifacts/metadata.jsonhybrid_results.csvresults.jsontest_predictions.csvUse this model for research and analysis of rhetorical patterns in political language.
See:
results.json (summary + per-label metrics)hybrid_results.csv (per-label threshold/F1/precision/recall)Inference CLI lives in the project codebase:
python scripts/infer_hybrid_model.py \
--artifacts-dir results/hybrid_YYYYMMDD_HHMMSS/artifacts \
--text "We must act now to protect our families."
CSV batch mode:
python scripts/infer_hybrid_model.py \
--artifacts-dir results/hybrid_YYYYMMDD_HHMMSS/artifacts \
--input-csv dataset/dataset_for_annotation.csv \
--text-column text \
--output results/hybrid_predictions.csv
Related dataset repository:
sofiagzzloz/political-persuasion-datasetIf you use this model, please cite your project/report and reference this repository.