2021/03/11 - Amazon Comprehend - 1 new api methods
Changes ContainsPiiEntities API analyzes the input text for the presence of personally identifiable information(PII) and returns the labels of identified PII entity types such as name, address etc.
Analyzes input text for the presence of personally identifiable information (PII) and returns the labels of identified PII entity types such as name, address, bank account number, or phone number.
See also: AWS API Documentation
Request Syntax
client.contains_pii_entities( Text='string', LanguageCode='en'|'es'|'fr'|'de'|'it'|'pt'|'ar'|'hi'|'ja'|'ko'|'zh'|'zh-TW' )
string
[REQUIRED]
Creates a new document classification request to analyze a single document in real-time, returning personally identifiable information (PII) entity labels.
string
[REQUIRED]
The language of the input documents.
dict
Response Syntax
{ 'Labels': [ { 'Name': 'BANK_ACCOUNT_NUMBER'|'BANK_ROUTING'|'CREDIT_DEBIT_NUMBER'|'CREDIT_DEBIT_CVV'|'CREDIT_DEBIT_EXPIRY'|'PIN'|'EMAIL'|'ADDRESS'|'NAME'|'PHONE'|'SSN'|'DATE_TIME'|'PASSPORT_NUMBER'|'DRIVER_ID'|'URL'|'AGE'|'USERNAME'|'PASSWORD'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'IP_ADDRESS'|'MAC_ADDRESS'|'ALL', 'Score': ... }, ] }
Response Structure
(dict) --
Labels (list) --
The labels used in the document being analyzed. Individual labels represent personally identifiable information (PII) entity types.
(dict) --
Specifies one of the label or labels that categorize the personally identifiable information (PII) entity being analyzed.
Name (string) --
The name of the label.
Score (float) --
The level of confidence that Amazon Comprehend has in the accuracy of the detection.