NRC Sentiment is a Node.js module that uses the NRC Word-Emotion Lexicon wordlist to perform sentiment analysis on arbitrary blocks of input text. Based on Sentiment module by Andrew Sliwinski. NRC Sentiment provides:
- A build process that makes updating sentiment to future versions of the word list trivial
npm install git://github.com/jeremylind/nrc-sentiment
var sentiment = require('nrc-sentiment');
var r1 = sentiment('Cats are stupid.');
console.dir(r1); // Score: -2, Comparative: -0.666
var r2 = sentiment('Cats are totally amazing!');
console.dir(r2); // Score: 4, Comparative: 1