mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-21 15:52:28 +00:00
Clean up emotion-anew
This commit is contained in:
parent
d961d8ac5b
commit
5c98326acf
@ -26,7 +26,7 @@ from senpy.models import Results, EmotionSet, Entry, Emotion
|
||||
class ANEW(EmotionPlugin):
|
||||
description = "This plugin consists on an emotion classifier using ANEW lexicon dictionary to calculate VAD (valence-arousal-dominance) of the sentence and determinate which emotion is closer to this value. Each emotion has a centroid, calculated according to this article: http://www.aclweb.org/anthology/W10-0208. The plugin is going to look for the words in the sentence that appear in the ANEW dictionary and calculate the average VAD score for the sentence. Once this score is calculated, it is going to seek the emotion that is closest to this value."
|
||||
author = "@icorcuera"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
name = "emotion-anew"
|
||||
|
||||
extra_params = {
|
||||
@ -41,41 +41,6 @@ class ANEW(EmotionPlugin):
|
||||
|
||||
anew_path_es = "Dictionary/Redondo(2007).csv"
|
||||
anew_path_en = "Dictionary/ANEW2010All.txt"
|
||||
centroids = {
|
||||
"anger": {
|
||||
"A": 6.95,
|
||||
"D": 5.1,
|
||||
"V": 2.7
|
||||
},
|
||||
"disgust": {
|
||||
"A": 5.3,
|
||||
"D": 8.05,
|
||||
"V": 2.7
|
||||
},
|
||||
"fear": {
|
||||
"A": 6.5,
|
||||
"D": 3.6,
|
||||
"V": 3.2
|
||||
},
|
||||
"joy": {
|
||||
"A": 7.22,
|
||||
"D": 6.28,
|
||||
"V": 8.6
|
||||
},
|
||||
"sadness": {
|
||||
"A": 5.21,
|
||||
"D": 2.82,
|
||||
"V": 2.21
|
||||
}
|
||||
}
|
||||
emotions_ontology = {
|
||||
"anger": "http://gsi.dit.upm.es/ontologies/wnaffect/ns#anger",
|
||||
"disgust": "http://gsi.dit.upm.es/ontologies/wnaffect/ns#disgust",
|
||||
"fear": "http://gsi.dit.upm.es/ontologies/wnaffect/ns#negative-fear",
|
||||
"joy": "http://gsi.dit.upm.es/ontologies/wnaffect/ns#joy",
|
||||
"neutral": "http://gsi.dit.upm.es/ontologies/wnaffect/ns#neutral-emotion",
|
||||
"sadness": "http://gsi.dit.upm.es/ontologies/wnaffect/ns#sadness"
|
||||
}
|
||||
onyx__usesEmotionModel = "emoml:pad-dimensions"
|
||||
nltk_resources = ['stopwords']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user