Skip to content

Instantly share code, notes, and snippets.

@Prakhar0409
Last active September 30, 2017 12:52
Show Gist options
  • Save Prakhar0409/215f2b107d053b198cf4fd4f44e69087 to your computer and use it in GitHub Desktop.
Save Prakhar0409/215f2b107d053b198cf4fd4f44e69087 to your computer and use it in GitHub Desktop.
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