Tag: alchemyapi

使用Node.js发送AlchemyData新闻查询(watson-developer-cloud模块)

我目前正在使用watson-developer-cloud Node.js SDK来处理Node.js,并且在发送包含实体的查询时遇到问题。 这是我的代码: // require watson's node sdk and fs var watson = require('watson-developer-cloud'); var fs = require('fs'); // Define output file var outputJSONFile = '/home/vagrant/Desktop/node/dir/data.json'; // Create alchemy_data_news object using our api_key var alchemy_data_news = watson.alchemy_data_news({ api_key: '' }); // Define params for the query and what values to return // Accepted returne […]

炼金术语言+ WKS模型+ NodeJs

我正在尝试使用AlchemyLanguage API从URL中提取关键字。 我有一个自定义的Watson Knowledge Studio模型。 下面的代码不考虑我的自定义模型: var alchemyL = watson.alchemy_language({ api_key: 'mykey', model_id: '6311a194-0b12-4795-8edc-66ac0174868f' }); var params = { maxRetrieve: 1000, url: 'http://nsf701.mybluemix.net/', } alchemyL.keywords(params, function (err, resp) { if(err) { console.log('error:', err); } else { console.log(resp); } });