标签
Label标签代表单个标注。与Labels标签配合使用,包括BrushLabels、EllipseLabels、HyperTextLabels、KeyPointLabels以及其他Labels标签,用于指定特定标注的值。
参数
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| value | string |
Value of the label | |
| [selected] | boolean |
false |
Whether to preselect this label |
| [maxUsages] | number |
Maximum number of times this label can be used per task | |
| [hint] | string |
Hint for label on hover | |
| [hotkey] | string |
Hotkey to use for the label. Automatically generated if not specified | |
| [alias] | string |
Label alias | |
| [showAlias] | boolean |
false |
Whether to show alias inside label text |
| [aliasStyle] | string |
"opacity:0.6" |
CSS style for the alias |
| [size] | string |
"medium" |
Size of text in the label |
| [background] | string |
"#36B37E" |
Background color of an active label in hexadecimal |
| [selectedColor] | string |
"#ffffff" |
Color of text in an active label in hexadecimal |
| [granularity] | symbol | word |
Set control based on symbol or word selection (only for Text) | |
| [html] | string |
HTML code is used to display label button instead of raw text provided by value (should be properly escaped) |
|
| [category] | int |
Category is used in the export (in label-studio-converter lib) to make an order of labels for YOLO and COCO |
示例
文本基础命名实体识别的标注配置
<View>
<Labels name="type" toName="txt-1">
<Label alias="B" value="Brand" />
<Label alias="P" value="Product" />
</Labels>
<Text name="txt-1" value="$text" />
</View>