# Labels

## Overview

The **Labels** extensions are available for span, span + line, span + line + document, and conversational labeling projects. Both extensions display the pre-configured label set up during project creation, allowing users to label related to each span.

<figure><img src="/files/uJ4nSjySZFmqzGXwPLKM" alt=""><figcaption></figcaption></figure>

## **Label Set Modification**

You can manage and update label sets either from the **Label management** page in your workspace or directly within a project. This includes adding new label sets, editing existing ones or removing them. Learn more about [label set management](https://datasaurai.gitbook.io/datasaur/workspace-management/label-management/label-set-management).

Within a project, label sets can be modified through the menu by right-clicking the three-dot menu in the extension.

<figure><img src="/files/qyYSHPEY0SNpkQ3kgFTF" alt=""><figcaption></figcaption></figure>

### **Add a new label set**

A label set can be added in three ways:

1. Upload a label set with a `.csv` or `.tsv` format
2. Choose from a library of label sets

   The library has three label sets loaded by default: `INACL`, `Stanford`, and `Default NER`. If you have created a project before, previous label sets will be automatically added to the library.

   *Note: Uploading or choosing a new label set will delete all existing labels in the document.*

   <figure><img src="/files/uJ4nSjySZFmqzGXwPLKM" alt=""><figcaption></figcaption></figure>
3. Type the labels in manually

### **Replace existing label set**

This option allows you to choose between upload/create manually or select one of the pre-stored label sets from the library. Doing so will replace the current label set in use and remove any existing labels associated with it.

<figure><img src="/files/LVae0NjXzme4pByhh8zc" alt=""><figcaption></figcaption></figure>

### **Edit label set**

This option allows you to adjust the label set even after a project has started. You can add new label, edit existing ones, or remove them. Here are the [label set properties](/workspace-management/label-management/label-set-management.md#label-set-management-page) you can edit.

{% hint style="info" %}
Editing the label set in the project will not automatically apply changes to the corresponding label set in **Label management** page.
{% endhint %}

#### **Adding Labels**

You can directly add label items in the provided section, as shown below.

<figure><img src="/files/2mHKzgsCKqh3dib7IFFd" alt=""><figcaption></figcaption></figure>

You can also move a label by clicking the dots and dragging the label up and down.

{% hint style="info" %}

* Some users find that colors can help them memorize labels and reduce human error while labeling.
* We now support label hierarchies up to 10 levels!
  {% endhint %}

#### **Editing Labels**

Select the label you want to modify and make the necessary changes. You can update both UI-related properties, such as: label set name, label class, label color, label class clarification, and label position.

<figure><img src="/files/VAvufmT8WRQqljJT4gnk" alt=""><figcaption></figcaption></figure>

### **Delete label set**

Delete the current label set to switch to a different one whenever you need.

### **Save to library**

Save the current label set to your library (**Label management** page) so it can be reused in other projects.

## **Show instances by labels**

As you can see in the screenshot below, Datasaur count all labels applied to spans and arrows. If you click on the counter, you can see the instances.

<figure><img src="/files/wWDBW9Rod7idfo9ACXQc" alt=""><figcaption></figcaption></figure>

Clicking one of the instances will directly navigate to the instance's location in the text viewer.

![](/files/vLTBHOsdWUI1ljrQxBz4)

## Marking Unapplied Label as Not Applicable

While labeling, users may find that certain labels do not apply to a document. For example, if a label set includes a 'Signature' label but it is not applicable to a particular document, users lack a straightforward method to indicate the absence of certain label classes.

The introduction of this capability allows users to mark labels that are not applied to a document as <mark style="color:red;">`N/A`</mark> (not applicable).

### How to: Enable Marking Unapplied Label as Not Applicable

This can be enabled either during the project creation or from the project settings within a project.

1. To enable it during project creation, proceed to step 5.

   ![](/files/Dh1Tc6F1heiw5ZmsWHrr)
2. To enable it through project settings, navigate to the **File >** **Settings** menu and open the **Administrator** tab. Then, enable the **Allow marking unapplied label classes as N/A** option.

   ![](/files/R7tlXFZNrbUjQTGrSAPX)

### Marking a Label Class as Not Applicable

Once enabled, you can mark a label class as <mark style="color:red;">`N/A`</mark> (not applicable) within the extension. A label eligible for being marked as <mark style="color:red;">`N/A`</mark> is one that has not yet been applied to the document, indicated by an instance counter of <mark style="color:red;">`0`</mark> displayed in the extension.

To mark the label class as <mark style="color:red;">`N/A`</mark>, click on the instance counter.

<figure><img src="/files/TaMfHtLU3keseFlO3pGq" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note:\
• If you apply a label class that was previously marked as <mark style="color:red;">`N/A`</mark> to a span in the document, the <mark style="color:red;">`N/A`</mark> mark will be automatically removed, as it becomes applicable to the document.\
• The <mark style="color:red;">`N/A`</mark> mark will only be visible to the user who marks the label class as <mark style="color:red;">`N/A`</mark>. It will not affect other users.
{% endhint %}

To remove the <mark style="color:red;">`N/A`</mark> mark, click again on the label class you previously marked as <mark style="color:red;">`N/A`</mark>.

<figure><img src="/files/rGma6tbVWO0fbUIFH98t" alt=""><figcaption></figcaption></figure>

## Review The Unapplied Label Classes

When you mark a document as complete and there are label classes that have not been applied, a dialog box will appear displaying a list of these unapplied label classes. This list excludes any label classes that have already been marked as <mark style="color:red;">`N/A`</mark>, enabling you to review and take appropriate action.

If you wish to mark all unapplied label classes as <mark style="color:red;">`N/A`</mark>, check the **Mark all unapplied label classes as N/A** option and then click **Mark as complete**.

<figure><img src="/files/WRTfehnE6vN7xknaz5Ph" alt=""><figcaption></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.datasaur.ai/advanced/extensions/labels.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.
