aylien_textapi
Advanced tools
Comparing version 0.5.0 to 0.6.0
/** | ||
* Copyright 2015 Aylien, Inc. All Rights Reserved. | ||
* Copyright 2016 Aylien, Inc. All Rights Reserved. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
/** | ||
* Copyright 2015 Aylien, Inc. All Rights Reserved. | ||
* Copyright 2016 Aylien, Inc. All Rights Reserved. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
{ | ||
"name": "aylien_textapi", | ||
"description": "AYLIEN Text API Client Library for Node.js", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"author": "AYLIEN Inc.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
/** | ||
* Copyright 2015 Aylien, Inc. All Rights Reserved. | ||
* Copyright 2016 Aylien, Inc. All Rights Reserved. | ||
* | ||
@@ -76,2 +76,29 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
/** | ||
* textapi.aspectBasedSentiment | ||
* | ||
* @desc Given a review for a product or service, analyzes the sentiment of | ||
* the review towards each of the aspects of the product or review that | ||
* are mentioned in it. | ||
* | ||
* @memberof! aylien_textapi(v1) | ||
* @instance | ||
* | ||
* @param {object} params - Parameters for request | ||
* @param {string} params.text - Text | ||
* @param {string} params.url - URL | ||
* @param {string} params.domain - Domain review belongs to. | ||
* @param {callback} callback - The callback that handles the response | ||
*/ | ||
this.aspectBasedSentiment = function(params, callback) { | ||
if (!params.domain) { | ||
callback(new Error('You must specify a domain')); | ||
} else { | ||
var domain = params.domain; | ||
delete params.domain; | ||
params = util.extend({endpointPath: 'absa/' + domain}, this.normalizeParams(params)); | ||
createAPIRequest(params, [['text', 'url']], callback); | ||
} | ||
}; | ||
/** | ||
* textapi.extract | ||
@@ -78,0 +105,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
172543
576