Skip to content

A simple naive Bayes classifier for textual sentiment analysis in nodejs

Notifications You must be signed in to change notification settings

martinrue/node-sentiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-sentiment

A simple naive Bayes classifier for textual sentiment analysis in node.js.

Install

npm install https://github.com/martinrue/node-sentiment/tarball/master

Usage

var SentimentClassifier = require('node-sentiment');
var classifier = new SentimentClassifier;

classifier.classify('it is very sunny today');
// { sentiment: 'positive', probability: 0.8101596181696481 }

Data

node-sentiment contains a default set of positive and negative data enough to seed the algorithm and produce decent results. The constructor function can optionally be passed custom paths to directories containing files with your own data. See main.js if you need more details.

About

A simple naive Bayes classifier for textual sentiment analysis in nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published