TextAnalyticsClient.RecognizePiiEntitiesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Runs a predictive model to identify a collection of entities containing Personally Identifiable Information found in the passed-in document, and categorize those entities into types such as US social security number, drivers license number, or credit card number.
For more information on available categories, see https://aka.ms/azsdk/language/pii.
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.PiiEntityCollection>> RecognizePiiEntitiesAsync (string document, string language = default, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizePiiEntitiesAsync : string * string * Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.PiiEntityCollection>>
override this.RecognizePiiEntitiesAsync : string * string * Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.PiiEntityCollection>>
Public Overridable Function RecognizePiiEntitiesAsync (document As String, Optional language As String = Nothing, Optional options As RecognizePiiEntitiesOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PiiEntityCollection))
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".
- options
- RecognizePiiEntitiesOptions
The additional configurable RecognizePiiEntitiesOptions that may be passed when recognizing PII entities. Options include entity domain filters, model version, and more.
- 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
This method is only supported in service API version v3.1 and newer.
Service returned a non-success status code.
Remarks
This method is only available for V3_1, V2022_05_01, and newer.
Applies to
Azure SDK for .NET