🎈 A Node.js AFINN-111 based sentiment analysis module
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2ddea1f Dec 30, 2017



Build Status Dependency Status devDependency Status Code Climate

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.


npm test

See unit test, integration testing results on Travis CI


  • Run npm run dev to watch for file changes and rebuild the project
  • Run npm run build to just text, lint, compile and minify the project
  • Run npm run test to execute unit tests, and test for code coverage
  • Run npm run example to run the example script

See the gulpfile.js for full documentation of build process.


MIT � Alicia Sykes