simple-sentiment-lib
Version:
Very compact and simple to use sentiment analysis lib
45 lines (31 loc) • 1.59 kB
Markdown
Ultra simple NodeJS Sentiment text analyzer based on afinn.
```javascript
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);
```
```javascript
{
score: 3,
comparative: 0.2727272727272727,
positive: {
score: 6,
comparative: 0.5454545454545454,
words: [ 'good', 'great' ]
},
negative: { score: 3, comparative: 0.2727272727272727, words: [ 'bad' ] }
}
```
https://github.com/voidzero-development/simple-sentiment-lib
More usage examples:
https://github.com/voidzero-development/NodeJS-Sentiment
https://github.com/voidzero-development
<a href="https://www.buymeacoffee.com/VoidZero1337" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
https://github.com/marc0tjevp
<a href="https://www.buymeacoffee.com/marc0tjevp" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>