watson-developer-cloud
Advanced tools
Comparing version 0.9.23 to 0.9.24
{ | ||
"name": "watson-developer-cloud", | ||
"version": "0.9.23", | ||
"version": "0.9.24", | ||
"description": "Nodejs Client Wrapper to use the IBM Watson Services", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
@@ -363,3 +363,3 @@ Watson Developer Cloud Node.js Client | ||
### Personality Insights | ||
Analyze text and get a personality profile by using the | ||
Analyze text in english and get a personality profile by using the | ||
[Personality Insights][personality_insights] service. | ||
@@ -377,3 +377,4 @@ | ||
personality_insights.profile({ | ||
text: 'Enter more than 100 unique words here...' }, | ||
text: 'Enter more than 100 unique words here...', | ||
language: 'es' }, | ||
function (err, response) { | ||
@@ -387,5 +388,3 @@ if (err) | ||
**Note:** Don't forget to update the `text` variable! Also, if you experience | ||
authentication errors, remember that the Personality Insights service is not | ||
a free service. | ||
**Note:** Don't forget to update the `text` variable! | ||
@@ -392,0 +391,0 @@ ### Question and Answer |
@@ -34,2 +34,13 @@ /** | ||
/** | ||
* @param params An Object representing the parameters for this service call. | ||
* The accepted parameters are: | ||
* - text: The text to analyze. | ||
* - contentItems: A JSON input (if 'text' not provided). | ||
* - include_raw: ? TODO | ||
* - acceptLanguage : The language expected for the output. | ||
* - language: The language of the input. | ||
* | ||
* @param callback The callback. | ||
*/ | ||
PersonalityInsights.prototype.profile = function(params, callback) { | ||
@@ -49,4 +60,5 @@ if (!params || (!params.text && !params.contentItems)) { | ||
headers: { | ||
'Content-type': params.text ? 'text/plain' : 'application/json', | ||
'Content-language': params.language ? params.language : 'en' | ||
'Content-type' : params.text ? 'text/plain' : 'application/json', | ||
'Content-language': params.language ? params.language : 'en', | ||
'Accept-language' : params.acceptLanguage ? params.acceptLanguage : 'en' | ||
} | ||
@@ -53,0 +65,0 @@ }, |
@@ -25,3 +25,3 @@ /** | ||
var defaultOptions = { | ||
url: 'https://gateway.watsonplatform.net/tone-analyzer-beta/api' | ||
url: 'https://gateway.watsonplatform.net/tone-analyzer-experimental/api' | ||
}; | ||
@@ -35,12 +35,12 @@ | ||
* Main API call. Returns the different tone dimensions of a text. | ||
* | ||
* @param params: An object with a string 'text' element. This is the | ||
* | ||
* @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. | ||
* | ||
* | ||
*/ | ||
@@ -72,19 +72,19 @@ ToneAnalyzer.prototype.tone = function(params, callback) { | ||
* 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' | ||
* 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. | ||
* | ||
* | ||
*/ | ||
@@ -91,0 +91,0 @@ ToneAnalyzer.prototype.synonym = function(params, callback) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140969
2805
625