Created
February 4, 2012 21:41
-
-
Save nhunzaker/1740327 to your computer and use it in GitHub Desktop.
Using Speakeasy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using Speakeasy | |
//--------------------------------------------------// | |
// Sentiment analysis | |
var mood = require("speakeasy-nlp").sentiment; | |
mood.analyze("I hate you"); //=> { score: -1, ..... } | |
// Classifying statements | |
var meaning = require("speakeasy-nlp").classify; | |
meaning.classify("What is the meaning of life?") //==> | |
/* | |
{ | |
action: 'what', | |
owner: 'life', | |
subject: 'meaning', | |
tokens: [ 'What','is', 'the', 'meaning', 'of', 'life','?' ] | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment