Skip to main content

<Taxonomy>

Category: Control tag

The Taxonomy tag is used to create one or more hierarchical classifications, storing both choice selections and their ancestors in the results. Use for nested classification tasks with the Choice tag.

You can define nested classifications using the Choice tag, or retrieve external classifications using the apiUrl parameter. For more information on these options, see the templates gallery.

Use with the following data types: audio, image, HTML, paragraphs, text, time series, video.

Attributes​

AttributeTypeRequiredDefaultDescription
namestringyes—Name of the element
toNamestringyes—Name of the element that you want to classify
apiUrlstringno—Beta -- Retrieve the taxonomy from a remote source. This can be a JSON-formatted file or a hierarchical data source read as an API. For more information, see the templates gallery
leafsOnlytrue,falsenofalseAllow annotators to select only leaf nodes of taxonomy
showFullPathtrue,falsenofalseWhether to show the full path of selected items
pathSeparatorstringno/Separator to show in the full path (default is " / "). To avoid errors, ensure that your data does not include this separator
maxUsagesnumberno—Maximum number of times a choice can be selected per task or per region
maxWidthnumberno—Maximum width for dropdown with units (eg: "500px")
minWidthnumberno—Minimum width for dropdown with units (eg: "300px")
requiredtrue,falsenofalseWhether it is required to have selected at least one option
requiredMessagestringno—Message to show if validation fails
placeholder=stringno—What to display as prompt on the input
perRegiontrue,falseno—Use this tag to classify specific regions instead of the whole object
perItemtrue,falseno—Use this tag to classify specific items inside the object instead of the whole object
labelingtrue,falseno—Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags.
legacytrue,falseno—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.

Examples​

Labeling configuration for providing a taxonomy of choices in response to a passage of text​

<View>
<Taxonomy name="media" toName="text">
<Choice value="Online">
<Choice value="UGC" />
<Choice value="Free" />
<Choice value="Paywall">
<Choice value="NY Times" />
<Choice value="The Wall Street Journal" />
</Choice>
</Choice>
<Choice value="Offline" />
</Taxonomy>
<Text name="text" value="You'd never believe what he did to the country" />
</View>