你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TextAnalyticsClient.RecognizeEntities Method

Definition

Runs a predictive model to identify a collection of named entities in the passed-in document, and categorize those entities into types such as person, location, or organization.

For more information on available categories, see https://docs.microsoft.com/azure/cognitive-services/language-service/named-entity-recognition/concepts/named-entity-categories.

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.Response<Azure.AI.TextAnalytics.CategorizedEntityCollection> RecognizeEntities(string document, string language = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeEntities : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.TextAnalytics.CategorizedEntityCollection>
override this.RecognizeEntities : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.TextAnalytics.CategorizedEntityCollection>
Public Overridable Function RecognizeEntities (document As String, Optional language As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of CategorizedEntityCollection)

Parameters

document
String

The document to analyze.

language
String

The language that the document is 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".

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A result containing the collection of entities identified in the document, as well as a score indicating the confidence that the entity correctly matches the identified substring.

Exceptions

Service returned a non-success status code.

Applies to