Skip to content

Commit

Permalink
Added NLP with JS - Sentiment Analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcharis authored Sep 15, 2018
1 parent 285012d commit dfe5135
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions NLP with JavaScript/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var Sentiment = require('sentiment');
var sentiment = new Sentiment();

var docx = sentiment.analyze("I like apples");
console.log(docx);

// Applying to An Array
var mydocx = ["I love apples","I don't eat pepper","the movie was very nice","this book is the best"]

mydocx.forEach(function(s){
console.log(sentiment.analyze(s));
})

0 comments on commit dfe5135

Please sign in to comment.