# Redacted text files

## Format of a text file preview <a href="#text-preview-format" id="text-preview-format"></a>

Text files include .txt and .json files.

For a text file preview:

* On the left, the preview displays the original data. The detected entity values are highlighted.
* On the right, the preview displays the data with replacement values that are based on the dataset configuration for the detected entity types.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2F0hAinfmZLkZ2a203Fm71%2FDatasetFilePreview_Text.png?alt=media&#x26;token=b1204309-4ea5-4672-ab3a-72293040cb07" alt=""><figcaption><p>File preview with the original and redacted and synthesized text data</p></figcaption></figure>

## Selecting entity type handling options <a href="#text-preview-entity-type-handling" id="text-preview-entity-type-handling"></a>

From a text file preview, to select the [entity type handling option](https://docs.tonic.ai/textual/dataset-configure-redaction/textual-datasets-select-handling-type#handling-options-available) for an entity type:

1. In the results panel, click a detected value.
2. On the details panel, click the entity type handling option.\
   \
   Textual applies the same option to all entity values of that type.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FHV8YV3pq7VrbWqQYjEtm%2FDatasetPreviewEntityTypeHandling.png?alt=media&#x26;token=5ca223f2-a7f8-4b79-8003-376e133d37cb" alt=""><figcaption><p>Selecting an entity type handling option</p></figcaption></figure>

From the preview, you can only select the entity type handling option. For the **Synthesis** option, you cannot configure synthesis options for an entity type. You must configure those options from the dataset details page. For more information, go to [textual-datasets-synthesis-options](https://docs.tonic.ai/textual/dataset-configure-redaction/textual-datasets-synthesis-options "mention").

## Adding and removing manual redactions <a href="#text-preview-manual-redaction" id="text-preview-manual-redaction"></a>

From a text file preview, you can add manual redactions. When you add a manual redaction, you select the entity type to assign to it.

### **Adding a manual redaction** <a href="#manual-redaction-text-add" id="manual-redaction-text-add"></a>

To add a manual redaction to a text file:

1. In the source text panel on the left, select the text to redact.
2. On the redaction panel, from the dropdown list, select the entity type for the redaction.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2Fim272W9ThsFexvPSBMvV%2FDatasetFilePreviewTextNewRedaction.png?alt=media&#x26;token=62f18160-4947-4d85-acba-c45b5528277c" alt=""><figcaption><p>Redaction creation panel for a text file redaction</p></figcaption></figure>

### **Removing a manual redaction** <a href="#manual-redaction-text-remove" id="manual-redaction-text-remove"></a>

To remove a manual redaction from a text file:

1. Either:
   * In the source panel, select the redacted text.
   * In the output panel, click the redaction.
2. Click **Delete**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2F8W8PMuzPLJJkEM4sTxJy%2FDatasetFilePreviewTextExistingRedaction.png?alt=media&#x26;token=89c6dd55-60db-4f2b-86d5-96391a5e5ce2" alt=""><figcaption><p>Redaction details for an existing text file redaction</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/textual/datasets-preview-output/dataset-file-preview/file-preview-redacted-file/redacted-text-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
