Synthesize Raw Text

Passing the same string to the redact method, with some categorites set to synthesize

from tonic_textual.api import TonicTextual

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

raw_synthesis = textual.redact("My name is John, and today I am demo-ing Textual, a software product created by Tonic", {"NAME_GIVEN":"Synthesis", "ORGANIZATION":"Synthesis"})
raw_synthesis.describe()

This produces the following output:

My name is Vada, and [DATE_TIME_9gaJAH] I am demo-ing [PRODUCT_gQUbYJKD], a software product created by New Terranova

{"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}