-
-
Save LucasLeRay/db20c56e2fd9d0d8c59c0fb0524bf03a to your computer and use it in GitHub Desktop.
This file contains 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
const AWS = require("aws-sdk"); // import AWS SDK | |
const comprehend = new AWS.Comprehend({ | |
apiVersion: "2017-11-27", | |
region: "eu-west-1", | |
}); // setup Comprehend | |
comprehend.detectSentiment( | |
{ | |
Text: "I love apples", // The text to analyze | |
LanguageCode: "en", // The language of the text | |
}, | |
function (err, data) { | |
console.log(data); // the sentiments of the author! 🎉🎉🎉 | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment