Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.46 KB

README.md

File metadata and controls

52 lines (36 loc) · 1.46 KB

sentibag

package version package downloads standard-readme compliant package license make a pull request

Simple sentiment analysis using bag of words model

Table of Contents

Install

This project uses node and npm.

$ npm install sentibag
$ # OR
$ yarn add sentibag

Usage

import analyze from 'sentibag'
import afinn111 from 'afinn111-lexicon'

analyze('I love you', afinn111)
// { score: 3,
//     comparative: 3,
//     positive: { score: 3, words: [ 'love' ] },
//     negative: { score: 0, words: [] } }

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT