Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emotions-multilang

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emotions-multilang

Multilanguage emotion detection with sentiment analysis

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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 module
var emotions = require('emotions-multilang');

// Use the module to get emotions from texts.
var r1 = emotions('Cats are stupid.','en');
console.dir(r1);        // Vote: 'negative'

var r2 = emotions('Cats are totally amazing!','en');
console.dir(r2);        // Vote: 'positive'

var r3 = emotions('I gatti sono stupidi.','it');
console.dir(r3);        // Vote: 'negative'

var r4 = emotions('I gatti sono totalmente stupendi!','it');
console.dir(r4);        // Vote: 'positive'

Test

mocha test

Keywords

FAQs

Package last updated on 20 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc