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