Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

watson-developer-cloud

Package Overview
Dependencies
Maintainers
2
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watson-developer-cloud - npm Package Compare versions

Comparing version 0.9.20 to 0.9.21

watson-developer-cloud-0.9.20.tgz

2

package.json
{
"name": "watson-developer-cloud",
"version": "0.9.20",
"version": "0.9.21",
"description": "Nodejs Client Wrapper to use the IBM Watson Services",

@@ -5,0 +5,0 @@ "main": "./lib/index",

@@ -32,3 +32,15 @@ /**

/**
* Main API call. Returns the different tone dimensions of a text.
*
* @param params: An object with a string 'text' element. This is the
* only field used. By this API call
*
* @return upon success, the callback function is called with an object
* containing the different tones (emotion, writing and social), traits
* and the evidence words found in the text.
*
* @see the API docs for a the full documentation.
*
*/
ToneAnalyzer.prototype.tone = function(params, callback) {

@@ -49,3 +61,3 @@ if (!params || !params.text){

'accept':'application/json',
'content-type': 'plain/text'
'content-type': 'text/plain'
}

@@ -58,2 +70,22 @@ })

/**
* Returns related words for a given word (or set of words).
*
* @param params: An object with an array of strings 'words'. These are
* the terms to look for and suggest synonyms. A 'limit' parameter is
* also accepted to limit the number of related words suggested.
*
* @return upon success, the callback function is called with an object
* containing related words to the ones given. Each word comes with
* the semantic type and the meaning and sense of the root word, and
* a weight associated to a trait. Positive weights would 'level up'
* that particular tone, while negative weights would level it down.
*
* For example, if one wants to sound less "angry" on a message, the
* suggestions with negative correlation with "Anger" (Emotion Tone)
* could be replaced in the txt.
*
* @see the API docs for a the full documentation.
*
*/
ToneAnalyzer.prototype.synonym = function(params, callback) {

@@ -68,3 +100,8 @@ var parameters = {

requiredParams: ['words', 'limit'],
defaultOptions: this._options
defaultOptions: extend(this._options, {
headers: {
'accept':'application/json',
'content-type': 'application/json'
}
})
};

@@ -75,2 +112,2 @@

module.exports = ToneAnalyzer;
module.exports = ToneAnalyzer;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc