How to use the azure-cognitiveservices-language-textanalytics.azure.cognitiveservices.language.textanalytics.models.MultiLanguageBatchInput function in azure-cognitiveservices-language-textanalytics

To help you get started, we’ve selected a few azure-cognitiveservices-language-textanalytics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-cognitiveservices-language-textanalytics / azure / cognitiveservices / language / textanalytics / text_analytics_api.py View on Github external
:param documents:
        :type documents:
         list[~azure.cognitiveservices.language.textanalytics.models.MultiLanguageInput]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: SentimentBatchResult or ClientRawResponse if raw=true
        :rtype:
         ~azure.cognitiveservices.language.textanalytics.models.SentimentBatchResult
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException`
        """
        input = models.MultiLanguageBatchInput(documents=documents)

        # Construct URL
        url = '/v2.0/sentiment'
        path_format_arguments = {
            'AzureRegion': self._serialize.url("self.config.azure_region", self.config.azure_region, 'AzureRegions', skip_quote=True)
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if custom_headers:
            header_parameters.update(custom_headers)

azure-cognitiveservices-language-textanalytics

Microsoft Azure Cognitive Services Text Analytics Client Library for Python

MIT
Latest version published 7 months ago

Package Health Score

76 / 100
Full package analysis

Popular azure-cognitiveservices-language-textanalytics functions

Similar packages