> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/textual/entity-types/mapping-form-labels-to-entity-types.md).

# Mapping form labels to entity types

{% hint style="info" %}
**Required global permission - either:**

* Create form label mappings
* Edit any form label mapping
  {% endhint %}

A dataset might contain a large number of forms, such as tax forms, that have an identical structure and fields.

By default, Textual runs its entity detection against the form values. To improve the accuracy of the detection, you can set up mappings of form labels to entity types. For example, you might indicate that every field that has the label **Government identifier** be mapped to the US SSN entity type.

You can link a single form label mapping to a dataset. Within the dataset, you can then adjust the label mappings.

## Viewing the list of form label mappings

To display the list of form label mappings, in the Textual navigation panel, click the form label mappings icon.

<figure><img src="/files/Gd5rhLougFHVUlLjMPHB" alt=""><figcaption><p>Form label mappings page</p></figcaption></figure>

### Information on the form label mappings list

For each mapping, the **Form label mappings** page includes:

* The name of the mapping
* The number of mapped labels in the mapping
* The number of datasets that use the mapping

### Filtering the list

To filter the list, in the search field, type text in the mapping name.

As you type, Textual filters the list to only include matching mappings.

### Sorting the list

You can sort the list by the mapping name.

To sort the list, click the **Name** column heading.

To reverse the sort order, click the heading again.

## Adding, editing and removing form label mappings

### Adding a mapping

To add a mapping:

1. Either:
   * To create a completely new mapping, click **New form label mapping**.
   * To start with an existing mapping, click the copy icon for the mapping to copy.
2. On the **New mapping** panel, in the **Mapping name** field, provide a name for the mapping.

<figure><img src="/files/LpJUWsP44GHRoANebBF1" alt=""><figcaption><p>New mapping panel for creating a new form label mapping</p></figcaption></figure>

4. Click **Next**.

You can then configure the individual label mappings.

### Changing the mapping name

From the mapping details, you can change the mapping name.

To change the name of an existing mapping:

1. In the mappings list, click the mapping.
2. On the mapping details, in the **Name** field, provide the new name for the mapping.

### Deleting a form label mapping

Deleting a form label mapping does not affect the datasets that link to the mapping.

To delete a form label mapping, in the mappings list, click the delete icon for the mapping.

## Identifying and mapping individual labels

To create the mappings of individual form labels to entity types, you upload example form PDF files to the mapping configuration.

In each uploaded file, Textual identifies labels that you can map to entity types. A field label might be a simple label in front of a value or it might be a table heading.

<figure><img src="/files/Q7yFy31Iz29k4L5qOkwi" alt=""><figcaption><p>Form label mapping details with mapped fields</p></figcaption></figure>

Textual automatically saves the changes to the individual label mappings.

### Adding and removing example files

On the file details page, the list of example form files displays at the left.

The files must be PDF files.

For the first file, either:

* Drag and drop the file to the empty file display.
* Click Upload a sample form, then search for and select a file.

To add additional files:

1. In the list of files, click **Add file**.
2. Search for and select the file.

To remove a file from the configuration, in the file list, click its delete icon.

When you remove a file, Textual also removes the mapped labels from the list. Textual does not remove labels that are still present in other mapping files.

### Displaying the file details

To display the content of a file, in the file list, click the file name.

### Mapping a detected label to an entity type

In each file, Textual identifies and highlights the labels that you can map.

To map a label:

1. Click the label.

<figure><img src="/files/bshr2hpdQei0ebegFH0p" alt=""><figcaption><p>Mapping a detected label to an entity type</p></figcaption></figure>

2. From the entity type dropdown list, select the entity type to map the label to.
3. Click **Apply**.

Textual adds the label and its mapped entity type to the **Mapped form labels** list at the right. Textual automatically maps the same label elsewhere in the form label mapping. You cannot map the same label to different entity types.

### Removing the mapped entity type for a label

To remove the mapped entity type, either:

* In the **Mapped form labels** list, click the delete icon for the label.
* In the file content, click the mapped label, then click **Clear Tag**.

### Adding and removing manual redaction areas

You can add manual redactions to a form. A manual redaction can either:

* Redact whatever text falls within the area that is covered by the box.
* Place a solid colored box over that location in the file.

#### Adding a manual redaction area

To add a manual redaction area to the file:

1. Click **Draw manual redaction area**.
2. Use the mouse to draw a box around the content to redact.

<figure><img src="/files/9knsJmzYWnZy4VROBkVj" alt=""><figcaption><p>Manual redaction area panel to configure the redaction of the selected area</p></figcaption></figure>

3. On the **Manual redaction area** panel, in the **Name** field, provide a name for the added redaction.
4. From the entity type dropdown list, select the entity type to map the manual redaction to.
5. Under **Redaction**, by default, the manual redaction uses the Detected words option. With this option, Textual redacts whatever text falls within that area.\
   \
   To instead draw a filled rectangle at that location, click **Filled rectangle**.

<figure><img src="/files/mIH6MwfJZzdYCiWMzNTZ" alt=""><figcaption><p>Filled rectangle option for a manual redaction area</p></figcaption></figure>

6. To save the manual redaction area, click **Apply**.

#### Removing a manual redaction area

To remove a manual redaction area:

1. Click the manual redaction area.
2. Click **Remove**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.tonic.ai/textual/entity-types/mapping-form-labels-to-entity-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
