aylien_textapi
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -24,3 +24,3 @@ /** | ||
var VERSION = "0.4.0"; | ||
var VERSION = "0.5.0"; | ||
@@ -27,0 +27,0 @@ function getMissingParams(params, required) { |
{ | ||
"name": "aylien_textapi", | ||
"description": "AYLIEN Text API Client Library for Node.js", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"author": "AYLIEN Inc.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -137,2 +137,28 @@ /** | ||
/** | ||
* textapi.classifyByTaxonomy | ||
* | ||
* @desc Classifies a body of text according to the specified taxonomy. | ||
* | ||
* @memberof! aylien_textapi(v1) | ||
* @instance | ||
* | ||
* @param {object} params - Parameters for request | ||
* @param {string} params.text - Text | ||
* @param {string} params.url - URL | ||
* @param {string} params.taxonomy - Taxonomy to classify according to | ||
* @param {string=} [params.language=en] - Language of text | ||
* @param {callback} callback - The callback that handles the response | ||
*/ | ||
this.classifyByTaxonomy = function(params, callback) { | ||
if (!params.taxonomy) { | ||
callback(new Error('You must specify a taxonomy')); | ||
} else { | ||
var taxonomy = params.taxonomy; | ||
delete params.taxonomy; | ||
params = util.extend({endpointPath: 'classify/' + taxonomy}, this.normalizeParams(params)); | ||
createAPIRequest(params, [['text', 'url']], callback); | ||
} | ||
}; | ||
/** | ||
* textapi.unsupervisedClassify | ||
@@ -139,0 +165,0 @@ * |
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
171566
550