# Document and Row Labeling

## Overview

The **Document labeling** and **Row labeling** extensions are available for row and document labeling projects. Both extensions display the pre-configured questions set up during project creation, allowing users to answer questions related to each row or document.

{% tabs %}
{% tab title="Row Labeling" %}

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-3ce68d0b96e3f45eec245ea0cb90a1aa2bf1e2c7%2FExtension%20%20-%20row%20doc%20labeling%20-%20row%20-%20more%20menu.png?alt=media" alt=""><figcaption><p>Row labeling extension</p></figcaption></figure>
{% endtab %}

{% tab title="Document Labeling" %}

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-f8dda44ae3445783c4dae3a164c19ef0662197b7%2FExtension%20%20-%20row%20doc%20labeling%20-%20document%20-%20more%20menu.png?alt=media" alt=""><figcaption><p>Document labeling extension</p></figcaption></figure>
{% endtab %}
{% endtabs %}

## **Question Set Modification**

You can manage and update question sets either from the **Label management** page in your workspace or directly within a project. This includes adding new question 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, question sets can be modified through the menu by right-clicking the three-dot icon in the extension.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-3ce68d0b96e3f45eec245ea0cb90a1aa2bf1e2c7%2FExtension%20%20-%20row%20doc%20labeling%20-%20row%20-%20more%20menu.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Upload a new question set**

A question set can be added or updated in two ways: through the menu in the extension by clicking the three-dot icon, or via the drop zone. The drop zone appears only if no question set has been configured, allowing you to upload a new set by dragging and dropping the file or selecting it from local storage.

### **Use existing question set**

This option allows you to select one of the pre-stored question sets from the library. Doing so will replace the current question set in use and remove any existing answers associated with it.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-1537b94fc24d2378a4595da22f2b863591b748a0%2FExtension%20%20-%20row%20doc%20labeling%20-%20select%20question%20set%20from%20library.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Edit question set**

This option allows you to adjust the question set even after a project has started. You can add new questions, edit existing ones, or remove them.

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

#### **Adding Questions**

Click the add (+) button to add a new question. The new question will be appended to the current set.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-48470dfa6b136d39b075091cb8e7b76bada98f68%2FExtension%20%20-%20row%20doc%20labeling%20-%20Edit%20question%20set%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

#### **Editing Question**

Select the question you want to modify and make the necessary changes. You can update both **UI-related properties** and **functional settings**:

* **UI-related properties**: Question name, slider color, date/time format display, and other display attributes.
* **Question type**: Switch to a different question type.
  * Switching between **Text** and **Text area** keeps existing answers.
  * Any other type change removes previous answers.
* **Required or optional:** Decide whether a question must be answered or can be skipped. If changed, other users will be prompted to review older answers that no longer fit the new rule.
* **Single or multiple answers**: Change a question from allowing only one answer to allowing several (or the other way around). If existing answers don’t match, users will be notified to review them.
* **Options**: Add, rename, or delete options from options-based questions.
  * Adding provides labelers with more options.
  * Renaming only changes the wording, existing answers remain.
  * Deleting removes any answers that used that option, while other answers remain.
* **Regex validation**: Add or set regex rules to validate text input. If regex is changed, existing answers that fail the new pattern will prompt users to review them.
* **Slider range**: If you change the **min** or **max** value, answers outside the new range will show an automatic warning in the labeling extension.
* **Removing a question:** You can now remove both **existing** and **newly added** questions as needed.

However, there are some **limitations** on questions that were previously created and have already been submitted:

* They cannot be removed or rearranged.
* Dynamic question sets cannot be modified.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-48470dfa6b136d39b075091cb8e7b76bada98f68%2FExtension%20%20-%20row%20doc%20labeling%20-%20Edit%20question%20set%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Save to library**

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

## Disable keyboard shortcut

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2fbca061d6391c3c76ab9241f086c883a598ae7c%2FExtension%20%20-%20row%20doc%20labeling%20-%20more%20menu%20-%20Disable%20keyboard%20shortcut.png?alt=media" alt=""><figcaption></figcaption></figure>

This option disables the ability to select answers using numeric shortcuts.

If you disable keyboard shortcut, the **Match shortcuts to numeric label in dropdowns** option will also be disabled.

## Match shortcuts to numeric labels in dropdowns

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-e494afd53924813b71a4fe2f91eda57b31df4eb7%2FExtension%20%20-%20row%20doc%20labeling%20-%20more%20menu%20-%20Match%20shortcuts%20to%20numeric%20labels%20in%20dropdowns.png?alt=media" alt=""><figcaption></figcaption></figure>

This option allows the dropdown question shortcuts to display the same numeric values as the dropdown options. For example:

| **Dropdown Option** | **Default Shortcut** | **With Option Enabled** |
| ------------------- | -------------------- | ----------------------- |
| **0**               | Shortcut 1           | Shortcut 0              |
| **1**               | Shortcut 2           | Shortcut 1              |
| **4**               | Shortcut 3           | Shortcut 4              |

{% tabs %}
{% tab title="Disabled" %}

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-6fb31dab8fc268f469fb5c08c58f4d5568eaf572%2FExtension%20%20-%20row%20doc%20labeling%20-%20match%20shortcuts%20disabled.png?alt=media" alt=""><figcaption><p>Shortcuts don't match the numeric labels</p></figcaption></figure>
{% endtab %}

{% tab title="Enabled" %}

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-9bf3aa3b7aa6c81754d8d57ec6019c517968c561%2FExtension%20%20-%20row%20doc%20labeling%20-%20match%20shortcuts%20enabled.png?alt=media" alt=""><figcaption><p>Shortcuts match the numeric labels</p></figcaption></figure>
{% endtab %}
{% endtabs %}

Here are a **few things to note** for this option to apply:

1. **At least one dropdown question in the project** — If there are no questions with dropdown type in the project, this option will be hidden.
2. **Keyboard shortcut option must be enabled** — If keyboard shortcut is disabled, then this option will also be disabled.
3. **All dropdown options must be single-digit numeric values between 0 and 9** — If there is an option that is not a number between 0 and 9, then this capability will not apply.

## Discard draft from current document

This option allows you to discard any unsaved or incomplete changes made in the extension that haven't been submitted yet. This is useful if you wish to abandon your current changes and start over.
