emotions-multilang
Multilanguage emotions and AFINN-based sentiment analysis for Node.js
Emotions is a Node.js module that uses the AFINN-111 wordlist to perform sentiment analysis on arbitrary blocks of input text.
It supports the following languages: English, French, Spanish, and Italian. For languages other than english, it uses a locale transposition of AFINN-111 wordlist. The wordlist can be extended adding words too.
For emotion detection it supports only English. We are working to extend the support to other languages.
Installation
npm install emotions-multilang
Usage
// Require the emotions-multilang modulevar emotions = ; // Use the module to get emotions from texts.var r1 = ;consoledirr1; // Vote: 'negative' var r2 = ;consoledirr2; // Vote: 'positive' var r3 = ;consoledirr3; // Vote: 'negative' var r4 = ;consoledirr4; // Vote: 'positive'
Test
mocha test