Redact Raw Text

Pass a string to the redact method to redact sensitive information from the text

from tonic_textual.api import TonicTextual

textual = TonicTextual("<TONIC-TEXTUAL-URL>")

raw_redaction = textual.redact("My name is John, and today I am demo-ing Textual, a software product created by Tonic")
raw_redaction.describe()

This produces the following output:

My name is [NAME_GIVEN_WpFV4], and [DATE_TIME_9gaJAH] I am demo-ing [PRODUCT_gQUbYJKD], a software product created by [ORGANIZATION_nc31lH]

{"start": 11, "end": 15, "label": "NAME_GIVEN", "text": "John", "score": 0.9}
{"start": 21, "end": 26, "label": "DATE_TIME", "text": "today", "score": 0.85}
{"start": 41, "end": 48, "label": "PRODUCT", "text": "Textual", "score": 0.85}
{"start": 80, "end": 85, "label": "ORGANIZATION", "text": "Tonic", "score": 0.85}