AFINN-111 based Sentiment analysis module
npm install sentiment-analysis --save
var sentimentAnalysis = require('sentiment-analysis'); sentimentAnalysis('Dinosaurs are awesome!'); // +0.4 sentimentAnalysis('Everything is stupid'); // -0.2 sentimentAnalysis('Windows is very unstable'); // -0.2 sentimentAnalysis('London is gloomy today because of all the smog'); // -0.4 sentimentAnalysis('I am so grateful for all the presents, thank you!'); // +0.5 sentimentAnalysis('Really enjoying the warm weather'); // +0.3 sentimentAnalysis('It was a catastrophic disaster'); // -0.6
sentiment-analysis will return a score between -1 and +1, where negative numbers represent a negative overall sentiment.
For further examples of usage, see this Example Gist.
See unit test, integration testing results on Travis CI
npm run devto watch for file changes and rebuild the project
npm run buildto just text, lint, compile and minify the project
npm run testto execute unit tests, and test for code coverage
npm run exampleto run the example script
gulpfile.js for full documentation of build process.
MIT � Alicia Sykes