Condividi tramite


TextAnalyticsClient.ExtractKeyPhrasesBatchAsync Method

Definition

Overloads

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

Runs a model to identify a collection of significant phrases found in the passed-in documents.

For example, for the document "The food was delicious and there were wonderful staff", the API returns the main talking points: "food" and "wonderful staff".

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.

ExtractKeyPhrasesBatchAsync(IEnumerable<TextDocumentInput>, TextAnalyticsRequestOptions, CancellationToken)

Runs a model to identify a collection of significant phrases found in the passed-in documents.

For example, for the document "The food was delicious and there were wonderful staff", the API returns the main talking points: "food" and "wonderful staff".

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.

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

Source:
TextAnalyticsClient.cs

Runs a model to identify a collection of significant phrases found in the passed-in documents.

For example, for the document "The food was delicious and there were wonderful staff", the API returns the main talking points: "food" and "wonderful staff".

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 System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection>> ExtractKeyPhrasesBatchAsync (System.Collections.Generic.IEnumerable<string> documents, string language = default, Azure.AI.TextAnalytics.TextAnalyticsRequestOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ExtractKeyPhrasesBatchAsync : seq<string> * string * Azure.AI.TextAnalytics.TextAnalyticsRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection>>
override this.ExtractKeyPhrasesBatchAsync : seq<string> * string * Azure.AI.TextAnalytics.TextAnalyticsRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection>>
Public Overridable Function ExtractKeyPhrasesBatchAsync (documents As IEnumerable(Of String), Optional language As String = Nothing, Optional options As TextAnalyticsRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ExtractKeyPhrasesResultCollection))

Parameters

documents
IEnumerable<String>

The documents to analyze.

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
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 collection of key phrases identified in each of the documents.

Exceptions

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

Service returned a non-success status code.

Applies to

ExtractKeyPhrasesBatchAsync(IEnumerable<TextDocumentInput>, TextAnalyticsRequestOptions, CancellationToken)

Source:
TextAnalyticsClient.cs

Runs a model to identify a collection of significant phrases found in the passed-in documents.

For example, for the document "The food was delicious and there were wonderful staff", the API returns the main talking points: "food" and "wonderful staff".

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 System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection>> ExtractKeyPhrasesBatchAsync (System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.TextDocumentInput> documents, Azure.AI.TextAnalytics.TextAnalyticsRequestOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ExtractKeyPhrasesBatchAsync : seq<Azure.AI.TextAnalytics.TextDocumentInput> * Azure.AI.TextAnalytics.TextAnalyticsRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection>>
override this.ExtractKeyPhrasesBatchAsync : seq<Azure.AI.TextAnalytics.TextDocumentInput> * Azure.AI.TextAnalytics.TextAnalyticsRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection>>
Public Overridable Function ExtractKeyPhrasesBatchAsync (documents As IEnumerable(Of TextDocumentInput), Optional options As TextAnalyticsRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ExtractKeyPhrasesResultCollection))

Parameters

documents
IEnumerable<TextDocumentInput>

The 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 collection of key phrases identified in each of the documents.

Exceptions

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

Service returned a non-success status code.

Applies to