Last active
September 30, 2017 12:52
-
-
Save Prakhar0409/215f2b107d053b198cf4fd4f44e69087 to your computer and use it in GitHub Desktop.
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
var watson = require('watson-developer-cloud'); | |
var NaturalLanguageUnderstandingV1 = require('watson-developer-cloud/natural-language-understanding/v1.js'); | |
var nlu = new NaturalLanguageUnderstandingV1(<API SECRET>); | |
function getConcepts(text,callback){ | |
nlu.analyze({ | |
'html': text, // Search concepts related to the text in the buffer/String | |
'features': { // Search concepts related to these keywords/concepts. | |
'concepts': {}, 'keywords': {},} | |
}, function(err, response) { | |
if (err) | |
console.log('error:', err); | |
else | |
callback(response); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment