Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

polarity-rate

autokent340MIT1.1.4

Text miner, polarity rater with results between -100% and +100%

text-miner, text-mining, miner, mining, polarity-rate, polarity-rater, polarity, text-analytics, document-term-matrix, dtm, text-analysis, natural, afinn, sentiment, subjective, subjectivity, polarity, opinion, emotion, unicode, retext, retext-sentiment, dracula-sentiment, array-polar

readme

polarity-rate

Text miner, polarity rater with results between -100% and +100%

Unicode Supported

logo

version downloads node status

Installation

npm install polarity-rate

Usage

Simple Usage

const PolarityRate = require('polarity-rate');

let text = "aaaa bbbb cccc dddd eeee";
let wordList = [
    ["aaaa",10],
    ["aaaa bbbb",50],
    ["aaaa bbbb cccc xxxx",60]
];
var result = PolarityRate(text,wordList);
console.log(result.rate);//50.1

Rules when building wordlist

Test

mocha or npm test

check test folder and QUICKSTART.js for extra usage.