The first expression in noPunctuations takes out hyphens, wheres some words with hyphens exist in the AFINN database.
For example, "self-deluded" is mapped to -3, whereas "self" and "deluded" don’t exist in the AFINN database (thus result in a score of 0).
This can be fixed by allowing the hyphen in tokens.
Note: I haven’t tested if other punctuation exists in AFINN words.
The first expression in
noPunctuations takes out hyphens, wheres some words with hyphens exist in the AFINN database.For example,
"self-deluded"is mapped to-3, whereas"self"and"deluded"don’t exist in the AFINN database (thus result in a score of0).This can be fixed by allowing the hyphen in tokens.
Note: I haven’t tested if other punctuation exists in AFINN words.