TextAnalyticsClient.AnalyzeSentimentBatchAsync Method

Definition

Overloads

AnalyzeSentimentBatchAsync(IEnumerable<String>, String, AnalyzeSentimentOptions, CancellationToken)

Runs a predictive model to identify the positive, negative or neutral sentiment contained in the documents, as well as scores indicating the model's confidence in each of the predicted sentiments.

For a list of languages supported by this operation, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support.

For document length limits, maximum batch size, and supported text encoding, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/concepts/data-limits?tabs=version-3.

AnalyzeSentimentBatchAsync(IEnumerable<TextDocumentInput>, AnalyzeSentimentOptions, CancellationToken)

Runs a predictive model to identify the positive, negative or neutral sentiment contained in the documents, as well as scores indicating the model's confidence in each of the predicted sentiments.

For a list of languages supported by this operation, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support.

For document length limits, maximum batch size, and supported text encoding, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/concepts/data-limits?tabs=version-3.

AnalyzeSentimentBatchAsync(IEnumerable<String>, String, AnalyzeSentimentOptions, CancellationToken)

Runs a predictive model to identify the positive, negative or neutral sentiment contained in the documents, as well as scores indicating the model's confidence in each of the predicted sentiments.

For a list of languages supported by this operation, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support.

For document length limits, maximum batch size, and supported text encoding, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/concepts/data-limits?tabs=version-3.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection>> AnalyzeSentimentBatchAsync (System.Collections.Generic.IEnumerable<string> documents, string language = default, Azure.AI.TextAnalytics.AnalyzeSentimentOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeSentimentBatchAsync : seq<string> * string * Azure.AI.TextAnalytics.AnalyzeSentimentOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection>>
override this.AnalyzeSentimentBatchAsync : seq<string> * string * Azure.AI.TextAnalytics.AnalyzeSentimentOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection>>
Public Overridable Function AnalyzeSentimentBatchAsync (documents As IEnumerable(Of String), Optional language As String = Nothing, Optional options As AnalyzeSentimentOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeSentimentResultCollection))

Parameters

documents
System.Collections.Generic.IEnumerable<System.String>

The documents to analyze.

language
System.String

The language that all of the documents are written in. If unspecified, this value will be set to the default language in DefaultLanguage in the request sent to the service. If set to an empty string, the service will apply a model where the language is explicitly set to "None".

options
AnalyzeSentimentOptions

The additional configurable AnalyzeSentimentOptions that may be passed when analyzing sentiments. Options include Opinion mining, model version, and more.

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken controlling the request lifetime.

Returns

System.Threading.Tasks.Task<Response<AnalyzeSentimentResultCollection>>

A result containing sentiment predictions for each of the documents and predictions for each of the sentences each document contains.

Exceptions

Service returned a non-success status code.

Applies to

AnalyzeSentimentBatchAsync(IEnumerable<TextDocumentInput>, AnalyzeSentimentOptions, CancellationToken)

Runs a predictive model to identify the positive, negative or neutral sentiment contained in the documents, as well as scores indicating the model's confidence in each of the predicted sentiments.

For a list of languages supported by this operation, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support.

For document length limits, maximum batch size, and supported text encoding, see https://docs.microsoft.com/azure/cognitive-services/text-analytics/concepts/data-limits?tabs=version-3.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection>> AnalyzeSentimentBatchAsync (System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.TextDocumentInput> documents, Azure.AI.TextAnalytics.AnalyzeSentimentOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeSentimentBatchAsync : seq<Azure.AI.TextAnalytics.TextDocumentInput> * Azure.AI.TextAnalytics.AnalyzeSentimentOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection>>
override this.AnalyzeSentimentBatchAsync : seq<Azure.AI.TextAnalytics.TextDocumentInput> * Azure.AI.TextAnalytics.AnalyzeSentimentOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection>>
Public Overridable Function AnalyzeSentimentBatchAsync (documents As IEnumerable(Of TextDocumentInput), Optional options As AnalyzeSentimentOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeSentimentResultCollection))

Parameters

documents
System.Collections.Generic.IEnumerable<TextDocumentInput>

The documents to analyze.

options
AnalyzeSentimentOptions

The additional configurable AnalyzeSentimentOptions that may be passed when analyzing sentiments. Options include Opinion mining, model version, and more.

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken controlling the request lifetime.

Returns

System.Threading.Tasks.Task<Response<AnalyzeSentimentResultCollection>>

A result containing sentiment predictions for each of the documents and predictions for each of the sentences each document contains.

Exceptions

Service returned a non-success status code.

Applies to