This model and other models from the word2affect line are finetuned to predict emotional load for singular words, not longer utterances.
Their accuracy on long-form text is unknown.
This transformer-based model is designed to extrapolate affective norms for Dutch words, including metrics such as valence, arousal, dominance, and age of acquisition. It has been finetuned from the Dutch BERT Model ('models/gronlp_ducth_base.pth'), enhanced with additional layers to predict the affective dimensions. This model was first released as a part of the publication: "Extrapolation of affective norms using transformer-based neural networks and its application to experimental stimuli selection." (Plisiecki, Sobieszek; 2023) [
https://doi.org/10.3758/s13428-023-02212-3 ]
The model was trained on the Dutch affective norms dataset by Moors et al. (2013) [
https://doi.org/10.3758/s13428-012-0243-8 ], which includes 4299 words rated by participants on various emotional and semantic dimensions. The dataset was split into training, validation, and test sets in an 8:1:1 ratio.
The model achieved the following Pearson correlations with human judgments on the test set:
First run the bash code below to clone the repository (this will take some time). Because of the custom model class, this model cannot be run with the usual huggingface Model setups.
1from word2affect_dutch.model_script import CustomModel # importing the custom model class
2from transformers import AutoTokenizer
3
4model_directory = "word2affect_dutch" # path to the cloned repository
5
6model = CustomModel.from_pretrained(model_directory)
7tokenizer = AutoTokenizer.from_pretrained(model_directory)
8
9inputs = tokenizer("test", return_tensors="pt")
10outputs = model(inputs['input_ids'], inputs['attention_mask'])
11
12# Print out the emotion ratings
13for emotion, rating in zip(['Valence', 'Arousal', 'Dominance', 'Acquisition'], outputs):
14 print(f"{emotion}: {rating.item()}")
If you use this model please cite the following paper.
1@article{Plisiecki_Sobieszek_2023,
2 title={Extrapolation of affective norms using transformer-based neural networks and its application to experimental stimuli selection},
3 author={Plisiecki, Hubert and Sobieszek, Adam},
4 journal={Behavior Research Methods},
5 year={2023},
6 pages={1-16}
7 doi={https://doi.org/10.3758/s13428-023-02212-3}
8}