Skip to content

Commit

Permalink
docs: DOC-272: Labeling param for Taxonomy (#6876)
Browse files Browse the repository at this point in the history
Co-authored-by: caitlinwheeless <[email protected]>
Co-authored-by: robot-ci-heartex <[email protected]>
Co-authored-by: caitlinwheeless <[email protected]>
  • Loading branch information
4 people authored Jan 9, 2025
1 parent 2eeba10 commit ebe101c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/tags/taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Use with the following data types: audio, image, HTML, paragraphs, text, time se
| [placeholder=] | <code>string</code> | | What to display as prompt on the input |
| [perRegion] | <code>boolean</code> | | Use this tag to classify specific regions instead of the whole object |
| [perItem] | <code>boolean</code> | | Use this tag to classify specific items inside the object instead of the whole object |
| [labeling] | <code>boolean</code> | | Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags. |
| [legacy] | <code>boolean</code> | | Use this tag to enable the legacy version of the Taxonomy tag. The legacy version supports the ability for annotators to add labels as needed. However, when true, the `apiUrl` parameter is not usable. |

### Example
Expand Down
11 changes: 11 additions & 0 deletions docs/source/templates/taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ In both options, the following tags are required:
<Taxonomy name="taxonomy" toName="text">
```

## Taxonomy as a labeling tool

Typically, the `<Taxonomy>` tag is used to perform classification tasks. However, if you set `labeling="true"`, you can apply your taxonomy choices to regions within text. This can be especially useful for NER projects.

Note that the `labeling` parameter is only supported when using `<Text> `or `<HyperText>` object tags.

![Screenshot of taxonomy as NER](/images/templates-misc/taxonomy_ner.png)

!!! info Tip
You can use the `color` parameter on your taxonomy [`<Choice>`](/tags/choice) to color-code selected regions within the text.

## Taxonomies defined using nested `Choice` tags

Use the [`Choice`](/tags/choice.html) tag to specify the taxonomy. Nest choices under [`Choice`](/tags/choice.html) tags to create layers in the taxonomy.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import { errorBuilder } from "../../../core/DataValidator/ConfigValidator";
* @param {string} [placeholder=] - What to display as prompt on the input
* @param {boolean} [perRegion] - Use this tag to classify specific regions instead of the whole object
* @param {boolean} [perItem] - Use this tag to classify specific items inside the object instead of the whole object
* @param {boolean} [labeling] - Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags.
* @param {boolean} [legacy] - Use this tag to enable the legacy version of the Taxonomy tag. The legacy version supports the ability for annotators to add labels as needed. However, when true, the `apiUrl` parameter is not usable.
*/
const TagAttrs = types.model({
Expand Down

0 comments on commit ebe101c

Please sign in to comment.