You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

simple-sentiment-lib

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-sentiment-lib

Very compact and simple to use sentiment analysis lib

1.0.9
npm
Version published
Weekly downloads
78
36.84%
Maintainers
1
Weekly downloads
 
Created
Source

simple-sentiment-lib

Ultra simple NodeJS Sentiment text analyzer based on afinn.

##Usage:

const analyse = require("simple-sentiment-lib");

const exampleData = "Lorem Ipsum dolor sit amet, consectetur adipiscing elit good great bad ";

var result = analyse(exampleData);

console.dir(result);

##Result:

{
  score: 3,
  comparative: 0.2727272727272727,
  positive: {
    score: 6,
    comparative: 0.5454545454545454,
    words: [ 'good', 'great' ]
  },
  negative: { score: 3, comparative: 0.2727272727272727, words: [ 'bad' ] }
}

Credits:

https://github.com/voidzero-development

https://github.com/marc0tjevp

FAQs

Package last updated on 29 Jun 2020

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