Socket
Socket
Sign inDemoInstall

simple-sentiment-lib

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple-sentiment-lib

Very compact and simple to use sentiment analysis lib


Version published
Weekly downloads
52
Maintainers
1
Install size
47.0 kB
Created
Weekly downloads
 

Readme

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' ] }
}

##Github: https://github.com/voidzero-development/simple-sentiment-lib

More usage examples:

https://github.com/voidzero-development/NodeJS-Sentiment

Credits

https://github.com/voidzero-development Buy Me A Coffee

https://github.com/marc0tjevp Buy Me A Coffee

Keywords

FAQs

Last updated on 01 Jul 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc