Share via


TextAnalyticsClient.SingleLabelClassify Method

Definition

Overloads

SingleLabelClassify(WaitUntil, IEnumerable<TextDocumentInput>, String, String, SingleLabelClassifyOptions, CancellationToken)

Runs a predictive model to identify a classify each document with a single label in the passed-in documents.

For more information on available categories, see https://docs.microsoft.com/azure/cognitive-services/language-service/custom-text-classification/overview.

For a list of languages supported by this operation, see https://aka.ms/talangs.

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

SingleLabelClassify(WaitUntil, IEnumerable<String>, String, String, String, SingleLabelClassifyOptions, CancellationToken)

Runs a predictive model to identify a classify each document with a single label in the passed-in documents.

For more information on available categories, see https://docs.microsoft.com/azure/cognitive-services/language-service/custom-text-classification/overview.

For a list of languages supported by this operation, see https://aka.ms/talangs.

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

SingleLabelClassify(WaitUntil, IEnumerable<TextDocumentInput>, String, String, SingleLabelClassifyOptions, CancellationToken)

Source:
TextAnalyticsClient.cs

Runs a predictive model to identify a classify each document with a single label in the passed-in documents.

For more information on available categories, see https://docs.microsoft.com/azure/cognitive-services/language-service/custom-text-classification/overview.

For a list of languages supported by this operation, see https://aka.ms/talangs.

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

public virtual Azure.AI.TextAnalytics.ClassifyDocumentOperation SingleLabelClassify (Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.TextDocumentInput> documents, string projectName, string deploymentName, Azure.AI.TextAnalytics.SingleLabelClassifyOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SingleLabelClassify : Azure.WaitUntil * seq<Azure.AI.TextAnalytics.TextDocumentInput> * string * string * Azure.AI.TextAnalytics.SingleLabelClassifyOptions * System.Threading.CancellationToken -> Azure.AI.TextAnalytics.ClassifyDocumentOperation
override this.SingleLabelClassify : Azure.WaitUntil * seq<Azure.AI.TextAnalytics.TextDocumentInput> * string * string * Azure.AI.TextAnalytics.SingleLabelClassifyOptions * System.Threading.CancellationToken -> Azure.AI.TextAnalytics.ClassifyDocumentOperation
Public Overridable Function SingleLabelClassify (waitUntil As WaitUntil, documents As IEnumerable(Of TextDocumentInput), projectName As String, deploymentName As String, Optional options As SingleLabelClassifyOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ClassifyDocumentOperation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation.

documents
IEnumerable<TextDocumentInput>

The documents to analyze.

projectName
String

The name of the project which owns the models being consumed.

deploymentName
String

The name of the deployment being consumed.

options
SingleLabelClassifyOptions

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 collection of entities identified for each of the documents, as well as scores indicating the confidence that a given entity correctly matches the identified substring.

Exceptions

Service returned a non-success status code.

This method is only supported in service API version 2022-05-01 and newer.

Remarks

This method is only available for V2022_05_01 and newer.

Applies to

SingleLabelClassify(WaitUntil, IEnumerable<String>, String, String, String, SingleLabelClassifyOptions, CancellationToken)

Source:
TextAnalyticsClient.cs

Runs a predictive model to identify a classify each document with a single label in the passed-in documents.

For more information on available categories, see https://docs.microsoft.com/azure/cognitive-services/language-service/custom-text-classification/overview.

For a list of languages supported by this operation, see https://aka.ms/talangs.

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

public virtual Azure.AI.TextAnalytics.ClassifyDocumentOperation SingleLabelClassify (Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable<string> documents, string projectName, string deploymentName, string language = default, Azure.AI.TextAnalytics.SingleLabelClassifyOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SingleLabelClassify : Azure.WaitUntil * seq<string> * string * string * string * Azure.AI.TextAnalytics.SingleLabelClassifyOptions * System.Threading.CancellationToken -> Azure.AI.TextAnalytics.ClassifyDocumentOperation
override this.SingleLabelClassify : Azure.WaitUntil * seq<string> * string * string * string * Azure.AI.TextAnalytics.SingleLabelClassifyOptions * System.Threading.CancellationToken -> Azure.AI.TextAnalytics.ClassifyDocumentOperation
Public Overridable Function SingleLabelClassify (waitUntil As WaitUntil, documents As IEnumerable(Of String), projectName As String, deploymentName As String, Optional language As String = Nothing, Optional options As SingleLabelClassifyOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ClassifyDocumentOperation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation.

documents
IEnumerable<String>

The documents to analyze.

projectName
String

The name of the project which owns the models being consumed.

deploymentName
String

The name of the deployment being consumed.

language
String

The language that all 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
SingleLabelClassifyOptions

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 collection of entities identified for each of the documents, as well as scores indicating the confidence that a given entity correctly matches the identified substring.

Exceptions

Service returned a non-success status code.

This method is only supported in service API version 2022-05-01 and newer.

Remarks

This method is only available for V2022_05_01 and newer.

Applies to