@@ -191,14 +191,11 @@ var watson = require('watson-developer-cloud');
191191var concept_insights = watson .concept_insights ({
192192 username: ' <username>' ,
193193 password: ' <password>' ,
194- version: ' v1 '
194+ version: ' v2 '
195195});
196196
197- /** * Annotate Text ***/
198-
199197var params = {
200- user: ' wikipedia' ,
201- graph: ' en-20120601' ,
198+ graph: ' /graphs/wikipedia/en20120601' ,
202199 text: ' IBM Watson won the Jeopardy television show hosted by Alex Trebek'
203200};
204201
@@ -207,32 +204,9 @@ concept_insights.annotateText(params, function(err, res) {
207204 if (err)
208205 console .log (err);
209206 else {
210- console .log (" \n *** Annotate Text ***\n " );
211207 console .log (JSON .stringify (res, null , 2 ));
212208 }
213209});
214-
215- /** * Semantic Search ***/
216-
217- var payload = {
218- func: ' semanticSearch' ,
219- ids: [
220- ' /graph/wikipedia/en-20120601/Software_development_process' ,
221- ' /graph/wikipedia/en-20120601/Programming_tool'
222- ],
223- corpus: ' ibmresearcher' ,
224- user: ' public' ,
225- limit: 5
226- };
227-
228- concept_insights .semanticSearch (payload, function (error , results ) {
229- if (error)
230- console .log (error);
231- else {
232- console .log (" \n *** Semantic Search ***\n " );
233- console .log (JSON .stringify (results, null , 2 ));
234- }
235- });
236210```
237211
238212### Dialog
@@ -327,7 +301,7 @@ var natural_language_classifier = watson.natural_language_classifier({
327301
328302natural_language_classifier .classify ({
329303 text: ' Is it sunny?' ,
330- classifier : ' <classifier-id>' },
304+ classifier_id : ' <classifier-id>' },
331305 function (err , response ) {
332306 if (err)
333307 console .log (' error:' , err);
0 commit comments