Skip to main content

sentiments

Creates, updates, deletes, gets or lists a sentiments resource.

Overview

Namesentiments
TypeResource
Idazure.ai_text_analytics.sentiments

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
sentimentexecendpoint, id, textmodel-version, showStats, loggingOptOut, opinionMining, stringIndexTypeSentiment. The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of granularity, start from the a document level, down to sentence and key terms (targets and assessments).

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
loggingOptOutboolean(Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language processing functions. Setting this parameter to true, disables input logging and may limit our ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI principles at https://www.microsoft.com/ai/responsible-ai. Default value is None.
model-versionstring(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. Default value is None.
opinionMiningboolean(Optional) if set to true, response will contain not only sentiment prediction but also opinion mining (aspect-based sentiment analysis) results. Default value is None.
showStatsboolean(Optional) if set to true, response will contain request and document level statistics. Default value is None.
stringIndexTypestring(Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. Known values are: "TextElement_v8", "UnicodeCodePoint", and "Utf16CodeUnit". Default value is None.

Lifecycle Methods

Sentiment. The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of granularity, start from the a document level, down to sentence and key terms (targets and assessments).

EXEC azure.ai_text_analytics.sentiments.sentiment 
@endpoint='{{ endpoint }}' --required,
@model-version='{{ model-version }}',
@showStats={{ showStats }},
@loggingOptOut={{ loggingOptOut }},
@opinionMining={{ opinionMining }},
@stringIndexType='{{ stringIndexType }}'
@@json=
'{
"id": "{{ id }}",
"text": "{{ text }}",
"language": "{{ language }}"
}'
;