How VADER scores a sentence
VADER (Valence Aware Dictionary and sEntiment Reasoner) was published by C.J. Hutto and Eric Gilbert at ICWSM 2014. It has two parts: a word list and a handful of rules. Each of the 7,506 entries (words, slang such as "sux", emoticons such as ":)" and initialisms such as "lol") was rated by 10 people on a scale from -4 (extremely negative) to +4 (extremely positive), and the list keeps the average. "Okay" is 0.9, "good" 1.9, "great" 3.1, "horrible" -2.5.
- Negation. "not", "never", "isn't" and 50 other negators up to three words before a sentiment word multiply it by -0.74. "Not good" is -1.41, not -1.9: a negated word is weaker than its opposite.
- Boosters and dampeners. "very", "extremely" and "really" add 0.293 to the next word's strength; "kind of", "slightly" and "barely" take 0.293 away. The effect fades for words two and three places back.
- ALL CAPS. A sentiment word in capitals, in a sentence that is not all capitals, gains 0.733.
- "But". Words before the first "but" count half; words after it count 1.5 times.
- Punctuation. Each exclamation mark adds 0.292 (up to four). Two or three question marks add 0.18 each, four or more add 0.96.
- Normalising. The total x becomes the compound score x / sqrt(x² + 15), which always lands between -1 and +1.