def AspectBasedSentiment(self, options): options = self._normalizeInput(options) if 'text' not in options and 'url' not in options: raise MissingParameterError('You must either provide url or text') if 'domain' not in options: raise MissingParameterError('You must specify the domain') response = self._executeRequest('absa/' + options.pop('domain'), options) return response
def ClassifyByTaxonomy(self, options): options = self._normalizeInput(options) if 'text' not in options and 'url' not in options: raise MissingParameterError('You must either provide url or text') if 'taxonomy' not in options: raise MissingParameterError('You must specify the taxonomy') response = self._executeRequest('classify/' + options.pop('taxonomy'), options) return response
def Combined(self, options): options = self._normalizeInput(options) if 'text' not in options and 'url' not in options: raise MissingParameterError('You must either provide url or text') response = self._executeRequest('combined', options) return response
def ImageTags(self, options): options = self._normalizeInput(options) if 'url' not in options: raise MissingParameterError('You must provide a url') response = self._executeRequest('image-tags', options) return response
def Extract(self, options): if isinstance(options, basestring): tmp = {} tmp['url'] = options options = tmp if 'url' not in options: raise MissingParameterError('You must provide a url') response = self._executeRequest('extract', options) return response
def Related(self, options): if isinstance(options, basestring): tmp = {} tmp['phrase'] = options options = tmp if 'phrase' not in options: raise MissingParameterError('You must provide a phrase') response = self._executeRequest('related', options) return response