다음을 통해 공유


TextAnalyticsClient.DetectLanguageBatch Method

Definition

Overloads

DetectLanguageBatch(IEnumerable<DetectLanguageInput>, TextAnalyticsRequestOptions, CancellationToken)

Runs a predictive model to determine the language the passed-in documents are written in, and returns, for each one, the detected language as well as a score indicating the model's confidence that the inferred language is correct. Scores close to 1 indicate high certainty in the result.

For document length limits, maximum batch size, and supported text encoding, see https://aka.ms/azsdk/textanalytics/data-limits.

DetectLanguageBatch(IEnumerable<String>, String, TextAnalyticsRequestOptions, CancellationToken)

Runs a predictive model to determine the language the passed-in documents are written in, and returns, for each one, the detected language as well as a score indicating the model's confidence that the inferred language is correct. Scores close to 1 indicate high certainty in the result.

For document length limits, maximum batch size, and supported text encoding, see https://aka.ms/azsdk/textanalytics/data-limits.

DetectLanguageBatch(IEnumerable<DetectLanguageInput>, TextAnalyticsRequestOptions, CancellationToken)

Source:
TextAnalyticsClient.cs

Runs a predictive model to determine the language the passed-in documents are written in, and returns, for each one, the detected language as well as a score indicating the model's confidence that the inferred language is correct. Scores close to 1 indicate high certainty in the result.

For document length limits, maximum batch size, and supported text encoding, see https://aka.ms/azsdk/textanalytics/data-limits.

public virtual Azure.Response<Azure.AI.TextAnalytics.DetectLanguageResultCollection> DetectLanguageBatch (System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.DetectLanguageInput> documents, Azure.AI.TextAnalytics.TextAnalyticsRequestOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DetectLanguageBatch : seq<Azure.AI.TextAnalytics.DetectLanguageInput> * Azure.AI.TextAnalytics.TextAnalyticsRequestOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.TextAnalytics.DetectLanguageResultCollection>
override this.DetectLanguageBatch : seq<Azure.AI.TextAnalytics.DetectLanguageInput> * Azure.AI.TextAnalytics.TextAnalyticsRequestOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.TextAnalytics.DetectLanguageResultCollection>
Public Overridable Function DetectLanguageBatch (documents As IEnumerable(Of DetectLanguageInput), Optional options As TextAnalyticsRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of DetectLanguageResultCollection)

Parameters

documents
IEnumerable<DetectLanguageInput>

A collection of documents to analyze.

options
TextAnalyticsRequestOptions

TextAnalyticsRequestOptions used to select the version of the predictive model to run, and whether statistics are returned in the response.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A result containing the detected language or an error if the model could not analyze the document.

Exceptions

DisableServiceLogs is only supported in service API version v3.1 and newer.

Service returned a non-success status code.

Applies to

DetectLanguageBatch(IEnumerable<String>, String, TextAnalyticsRequestOptions, CancellationToken)

Source:
TextAnalyticsClient.cs

Runs a predictive model to determine the language the passed-in documents are written in, and returns, for each one, the detected language as well as a score indicating the model's confidence that the inferred language is correct. Scores close to 1 indicate high certainty in the result.

For document length limits, maximum batch size, and supported text encoding, see https://aka.ms/azsdk/textanalytics/data-limits.

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

Parameters

documents
IEnumerable<String>

A collection of documents to analyze.

countryHint
String

Indicates the country of origin of all of the documents to assist the model in predicting the language they are written in. If unspecified, this value will be set to the default country hint in DefaultCountryHint in the request sent to the service. To remove this behavior, set to None.

options
TextAnalyticsRequestOptions

TextAnalyticsRequestOptions used to select the version of the predictive model to run, and whether statistics are returned in the response.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A result containing the detected language or an error if the model could not analyze the documents.

Exceptions

DisableServiceLogs is only supported in service API version v3.1 and newer.

Service returned a non-success status code.

Applies to