hplisiecki commited on
Commit
c90d7f9
1 Parent(s): 5d26165

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -3
README.md CHANGED
@@ -1,3 +1,66 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - fr
5
+ ---
6
+ # Affective Norms Extrapolation Model for French Language
7
+
8
+ ## Model Description
9
+
10
+ This transformer-based model is designed to extrapolate affective norms for French words, including metrics such as valence, arousal, and imageability. It has been finetuned from the French Toxicity Classifier Plus Model ("EIStakovskii/french_toxicity_classifier_plus_v2"), 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."
11
+
12
+ ## Training Data
13
+
14
+ The model was trained on the French affective norms dataset by Syssau et al. (2021) (http://dx.doi.org/10.3758/s13428-020-01450-z), which includes 1031 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.
15
+
16
+ ## Performance
17
+
18
+ The model achieved the following Pearson correlations with human judgments on the test set:
19
+
20
+ - Valence: 0.80
21
+ - Arousal: 0.77
22
+
23
+
24
+ ## Usage
25
+
26
+ You can use the model and tokenizer as follows:
27
+
28
+ 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.
29
+
30
+ ```bash
31
+ git clone https://huggingface.co/hplisiecki/word2affect_french
32
+ ```
33
+
34
+ Proceed as follows:
35
+
36
+ ```python
37
+ from word2affect_polish.model_script import CustomModel # importing the custom model class
38
+ from transformers import AutoTokenizer
39
+
40
+ model_directory = "word2affect_french" # path to the cloned repository
41
+
42
+ model = CustomModel.from_pretrained(model_directory)
43
+ tokenizer = AutoTokenizer.from_pretrained(model_directory)
44
+
45
+ inputs = tokenizer("This is a test input.", return_tensors="pt")
46
+ outputs = model(inputs['input_ids'], inputs['attention_mask'])
47
+
48
+ # Print out the emotion ratings
49
+ for emotion, rating in zip(['Valence', 'Arousal'], outputs):
50
+ print(f"{emotion}: {rating.item()}")
51
+ ```
52
+
53
+ ## Citation
54
+
55
+ If you use this model please cite the following paper.
56
+
57
+ ```sql
58
+ @article{Plisiecki_Sobieszek_2023,
59
+ title={Extrapolation of affective norms using transformer-based neural networks and its application to experimental stimuli selection},
60
+ author={Plisiecki, Hubert and Sobieszek, Adam},
61
+ journal={Behavior Research Methods},
62
+ year={2023},
63
+ pages={1-16}
64
+ doi={https://doi.org/10.3758/s13428-023-02212-3}
65
+ }
66
+ ```