Perl6 package for scoring the emotional content of a piece of text from its word use.
Currently the AFINN data set from Twitter usage is used to give base word scores for sentiment.
AFINN is a list of English words rated for valence with an integer between minus five (negative) and plus five (positive). The words have been manually labeled by Finn Årup Nielsen in 2009-2011. The file is tab-separated.
'emobot' included is an example IRC bot using Text::Emotion::Scorer and Net::IRC::Bot.
#Create a Scorer object and all of the sentiment data is loaded for your use
my $emotion = Text::Emotion::Scorer.new;
#Score a whole passage of positive sounding text
say $emotion.score("I really love Perl6. Hurrah!");
#Score a whole passage of negative sounding text
say $emotion.score("I hate Monday's they suck!");
#Just get the word scores the passage score is working with