Skip to content

Commit ebe101c

Browse files
caitlinwheelesscaitlinwheelessrobot-ci-heartex
authored
docs: DOC-272: Labeling param for Taxonomy (#6876)
Co-authored-by: caitlinwheeless <[email protected]> Co-authored-by: robot-ci-heartex <[email protected]> Co-authored-by: caitlinwheeless <[email protected]>
1 parent 2eeba10 commit ebe101c

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

docs/source/tags/taxonomy.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Use with the following data types: audio, image, HTML, paragraphs, text, time se
3030
| [placeholder=] | <code>string</code> | | What to display as prompt on the input |
3131
| [perRegion] | <code>boolean</code> | | Use this tag to classify specific regions instead of the whole object |
3232
| [perItem] | <code>boolean</code> | | Use this tag to classify specific items inside the object instead of the whole object |
33+
| [labeling] | <code>boolean</code> | | Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags. |
3334
| [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. |
3435

3536
### Example

docs/source/templates/taxonomy.md

+11
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ In both options, the following tags are required:
3232
<Taxonomy name="taxonomy" toName="text">
3333
```
3434

35+
## Taxonomy as a labeling tool
36+
37+
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.
38+
39+
Note that the `labeling` parameter is only supported when using `<Text> `or `<HyperText>` object tags.
40+
41+
![Screenshot of taxonomy as NER](/images/templates-misc/taxonomy_ner.png)
42+
43+
!!! info Tip
44+
You can use the `color` parameter on your taxonomy [`<Choice>`](/tags/choice) to color-code selected regions within the text.
45+
3546
## Taxonomies defined using nested `Choice` tags
3647

3748
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.
Loading

web/libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ import { errorBuilder } from "../../../core/DataValidator/ConfigValidator";
8686
* @param {string} [placeholder=] - What to display as prompt on the input
8787
* @param {boolean} [perRegion] - Use this tag to classify specific regions instead of the whole object
8888
* @param {boolean} [perItem] - Use this tag to classify specific items inside the object instead of the whole object
89+
* @param {boolean} [labeling] - Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags.
8990
* @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.
9091
*/
9192
const TagAttrs = types.model({

0 commit comments

Comments
 (0)