sentiment / 1.0.6 last updated 2 months ago created on Oct 8th 2012
Install
npm install --save sentiment
Clone
git clone git@github.com:thisandagain/sentiment.git
dependencies
| main |
|
lodash.assign | 4.0.1 | MIT |
maintainers
diy
versions
12 total
| 1.0.6 | 2 months ago | diy |
| 1.0.5 | 3 months ago | diy |
| 1.0.4 | 3 months ago | diy |
| 1.0.3 | 4 months ago | diy |
| 1.0.2 | 2 years ago | diy |
| 1.0.1 | 2 years ago | diy |
| 1.0.0-alpha | 2 years ago | diy |
| 0.2.4 | 2 years ago | diy |
| 0.2.3 | 2 years ago | diy |
| 0.2.1 | 3 years ago | diy |
| 0.2.0 | 3 years ago | diy |
| 0.1.0 | 4 years ago | diy |
readme
sentiment
AFINN-based sentiment analysis for Node.js
Sentiment is a Node.js module that uses the AFINN-111 wordlist to perform sentiment analysis on arbitrary blocks of input text. Sentiment provides serveral things:
- Performance (see benchmarks below)
- The ability to append and overwrite word / value pairs from the AFINN wordlist
- A build process that makes updating sentiment to future versions of the AFINN word list trivial
Installation
Usage
Adding / overwriting words
You can append and/or overwrite values from AFINN by simply injecting key/value pairs into a sentiment method call:
Benchmarks
The primary motivation for designing sentiment was performance. As such, it includes a benchmark script within the test directory that compares it against the Sentimental module which provides a nearly equivalent interface and approach. Based on these benchmarks, running on a MacBook Pro with Node 0.12.7, sentiment is twice as fast as alternative implementations:
To run the benchmarks yourself, simply: