This is an example looking at a smiple sentiment analysis.
It takes example quotes from people throughout time and uses a node sentiment library.
To get started run npm install
to install the needed dependency. After that you can run node index.js
. The terminal will print out the quote and it's scores.
-------------------------------------
A room without books is like a body without a soul.
--- Marcus Tullius Cicero
Sentiment....
score: 2 comparative: 0.18181818181818182
-------------------------------------
Be the change that you wish to see in the world.
--- Mahatma Gandhi
Sentiment....
score: 1 comparative: 0.09090909090909091
-------------------------------------
This examples relies fullying on the sentiment Node.js package. The top of their README provides links to its underlying word list.