How do I get the Alchemy API Text Combined Call (TextGetCombinedData) component to analyze snippets of text that are not stored anywhere as files, but that just may be passed from another application, such as a text response entered by a customer into Watson Dialog Service? If you know, would you please provide a complete and specific example(s), including the delimiters that might/should be used at the beginning and end of the text snippet? Does the answer include the use of curl -X POST? To the extent possible, please use the following, multi-line sample text snippet in your answer: That's rediculous!!! I've never in my life had an auto insurance policy that did not include roadside assistance coverage. I can't believe your company would do this to me. I'm going to be rethinking all of the policies that I have with your company...and talking with my friends about it.
Answer by @chughts (12979) | Apr 20, 2016 at 03:53 AM
Are you using one of the Watson Developer Cloud SDKs? If so then you can call the combined method, passing in text. For example if you are using the node.js SDK, you can pass in
var params = {
text: 'IBM Watson won the Jeopardy television show hosted by Alex Trebek'
};
I had not been using an SDK like node.js SDK. I had just been trying to call the Combined Call method using a URL. Could you post or send me an example of the complete, larger block of code (not just the var params statement as in your example above) that would need to be added to the basic node.js SDK code that would be generated if I created a BlueMix app that just included the node.js SDK?
Thanks in advance, Steven Cary/Colorado Springs/IBM
Documentation for TextGetCombinedData can be found here - http://www.alchemyapi.com/api/combined/textc.html
Examples of usage of the SDK, can be found in the home of the SDK. Please note the examples, are not complete documentation, just examples of how to use the SDK for each service.
https://github.com/watson-developer-cloud/node-sdk/blob/master/examples/alchemy_language.v1.js