A more-or-less CoffeeScript browser-compatible port of @thinkroth's Sentimental, which was originally written in Node.
After you install the package via Bower (with the command bower install sentimood) or just add it to your HTML document's <head>, you can initialize Sentimood like so:
sentiment=newSentimood();Then you can do cool things like this:
varanalyze=sentiment.analyze(),positivity=sentiment.positivity(),negativity=sentiment.negativity();analyze("Hey you worthless scumbag");//Score: -6, Comparative:-1.5positivity("This is so cool");//Score: 1, Comparative:.25negativity("Hey you worthless scumbag");//Score: 6, Comparative:1.5analyze("I am happy");//Score: 3, Comparative: 1analyze("I am so happy");//Score: 6, Comparative: 1.5analyze("I am extremely happy");//Score: 12, Comparative: 3analyze("I am really sad");//Score: -4, Comparative: -1The difference between this project and Sentimental is the browser compatibility: Sentimental is node.js specific, which means it can only be run on the server-side. I made some minimal changes, (e.g. changed array.forEach() to a for loop) which increased performance and allowed the file to run on the client-side.