HaifaCLGroup/KnessetCorpus
Updated โข 2.04k โข 5
This repository contains three binomial regression models designed to predict VAD (Valence, Arousal, Dominance) scores for text inputs. Each model is stored as a separate pickle (.pkl) file:
All scores are normalized on a scale from 0 to 1.
Before making predictions, input text must be converted into embeddings using the Knesset-multi-e5-large model. The embeddings are then fed into the regression models.
The models were trained using a combination of datasets to ensure robust and generalizable predictions:
from sentence_transformers import SentenceTransformer
import pickle
sentence = "ืื ืืฉืคื ืืืืืื"
# Convert input text into embeddings using Knesset-multi-e5-large
model = SentenceTransformer('GiliGold/Knesset-multi-e5-large')
embedding_vector = model.encode(sentence)
# Load the valence model
#Option 1: Manually download files from https://huggingface.co/GiliGold/VAD_binomial_regression_models/tree/main)
with open("valence_model.pkl", "rb") as file:
valence_model = pickle.load(file)
#Option 2: Download using Hugging Face hub
from huggingface_hub import hf_hub_download
repo_id = "GiliGold/VAD_binomial_regression_models"
model_v_path = hf_hub_download(repo_id=repo_id, filename="valence_model.pkl")
with open(model_v_path, "rb") as f:
valence_model = pickle.load(f)
# Assume `embedding_vector` is the vector obtained from the Knesset-multi model
valence_score = valence_model.predict([embedding_vector])
print(f"Predicted Valence Score: {valence_score[0]}")
Cite:
@article{10.1162/COLI.a.600,
author = {Goldin, Gili and Rabinovich, Ella and Wintner, Shuly},
title = {Unveiling Affective Polarization Trends in Parliamentary Proceedings},
journal = {Computational Linguistics},
pages = {1-33},
year = {2026},
month = {01},
abstract = {Recent years have seen an increase in polarized discourse worldwide, on various platforms. We propose a novel method for quantifying polarization, based on the emotional style of the discourse rather than on differences in ideological stands. Using measures of Valence, Arousal and Dominance, we detect signals of emotional discourse and use them to operationalize the concept of affective polarization. Applying this method to a recently released corpus of proceedings of the Knesset, the Israeli parliament (in Hebrew), we find that the emotional style of members of government differs from that of opposition members; and that the level of affective polarization, as reflected by this style, is significantly increasing with time.},
issn = {0891-2017},
doi = {10.1162/COLI.a.600},
url = {https://doi.org/10.1162/COLI.a.600},
eprint = {https://direct.mit.edu/coli/article-pdf/doi/10.1162/COLI.a.600/2573634/coli.a.600.pdf},
}