分类体系
Taxonomy标签用于创建一个或多个层级分类,在结果中存储选项选择及其祖先。与Choice标签配合使用,适用于嵌套分类任务。
您可以使用Choice标签定义嵌套分类,或通过apiUrl参数获取外部分类。有关这些选项的更多信息,请参阅分类法模板页面。
Use with the following data types: audio, image, HTML, paragraphs, text, time series, video.
参数
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| name | string |
Name of the element | |
| toName | string |
Name of the element that you want to classify | |
| [apiUrl] | string |
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 Taxonomy template page | |
| [leafsOnly] | boolean |
false |
Allow annotators to select only leaf nodes of taxonomy |
| [showFullPath] | boolean |
false |
Whether to show the full path of selected items |
| [pathSeparator] | string |
"/" |
Separator to show in the full path (default is “ / “). To avoid errors, ensure that your data does not include this separator |
| [maxUsages] | number |
Maximum number of times a choice can be selected per task or per region | |
| [maxWidth] | number |
Maximum width for dropdown | |
| [minWidth] | number |
Minimum width for dropdown | |
| [required] | boolean |
false |
Whether taxonomy validation is required |
| [requiredMessage] | string |
Message to show if validation fails | |
| [placeholder=] | string |
What to display as prompt on the input | |
| [perRegion] | boolean |
Use this tag to classify specific regions instead of the whole object | |
| [perItem] | boolean |
Use this tag to classify specific items inside the object instead of the whole object | |
| [labeling] | boolean |
Use taxonomy to label regions in text. Only supported with <Text> and <HyperText> object tags. |
|
| [legacy] | boolean |
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. |
示例
用于提供文本段落响应选项分类的标注配置
<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>