diff --git a/docs/source/redact/redacting_text.rst b/docs/source/redact/redacting_text.rst index 21b9d35..0fa0525 100644 --- a/docs/source/redact/redacting_text.rst +++ b/docs/source/redact/redacting_text.rst @@ -67,52 +67,52 @@ This produces the following output: .. code-block:: console -[ORGANIZATION_5Ve7OH] was founded in [DATE_TIME_DnuC1] -{ - "start": 0, - "end": 5, - "new_start": 0, - "new_end": 21, - "label": "ORGANIZATION", - "text": "Tonic", - "score": 0.9, - "language": "en", - "new_text": "[ORGANIZATION_5Ve7OH]" -} -{ - "start": 21, - "end": 25, - "new_start": 37, - "new_end": 54, - "label": "DATE_TIME", - "text": "2018", - "score": 0.9, - "language": "en", - "new_text": "[DATE_TIME_DnuC1]" -} -[NAME_GIVEN_dySb5] [NAME_FAMILY_7w4Db3] is a person -{ - "start": 0, - "end": 4, - "new_start": 0, - "new_end": 18, - "label": "NAME_GIVEN", - "text": "John", - "score": 0.9, - "language": "en", - "new_text": "[NAME_GIVEN_dySb5]" -} -{ - "start": 5, - "end": 10, - "new_start": 19, - "new_end": 39, - "label": "NAME_FAMILY", - "text": "Smith", - "score": 0.9, - "language": "en", - "new_text": "[NAME_FAMILY_7w4Db3]" -} + [ORGANIZATION_5Ve7OH] was founded in [DATE_TIME_DnuC1] + { + "start": 0, + "end": 5, + "new_start": 0, + "new_end": 21, + "label": "ORGANIZATION", + "text": "Tonic", + "score": 0.9, + "language": "en", + "new_text": "[ORGANIZATION_5Ve7OH]" + } + { + "start": 21, + "end": 25, + "new_start": 37, + "new_end": 54, + "label": "DATE_TIME", + "text": "2018", + "score": 0.9, + "language": "en", + "new_text": "[DATE_TIME_DnuC1]" + } + [NAME_GIVEN_dySb5] [NAME_FAMILY_7w4Db3] is a person + { + "start": 0, + "end": 4, + "new_start": 0, + "new_end": 18, + "label": "NAME_GIVEN", + "text": "John", + "score": 0.9, + "language": "en", + "new_text": "[NAME_GIVEN_dySb5]" + } + { + "start": 5, + "end": 10, + "new_start": 19, + "new_end": 39, + "label": "NAME_FAMILY", + "text": "Smith", + "score": 0.9, + "language": "en", + "new_text": "[NAME_FAMILY_7w4Db3]" + } Redact JSON data ---------------- diff --git a/tonic_textual/redact_api.py b/tonic_textual/redact_api.py index 2333de2..7ff9ce1 100644 --- a/tonic_textual/redact_api.py +++ b/tonic_textual/redact_api.py @@ -303,7 +303,7 @@ def redact_bulk( random_seed: Optional[int] = None, label_block_lists: Optional[Dict[str, List[str]]] = None, label_allow_lists: Optional[Dict[str, List[str]]] = None, - ) -> RedactionResponse: + ) -> BulkRedactionResponse: """Redacts a string. Depending on the configured handling for each sensitive data type, values can be either redacted, synthesized, or ignored.