评分
Rating标签为标注界面添加了一个评分选择功能。适用于涉及评分的标注任务。
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 label | |
| [maxRating] | number |
5 |
Maximum rating value |
| [defaultValue] | number |
0 |
Default rating value |
| [size] | small | medium | large |
medium |
Rating icon size |
| [icon] | star | heart | fire | smile |
star |
Rating icon |
| hotkey | string |
HotKey for changing rating value | |
| [required] | boolean |
false |
Whether rating validation is required |
| [requiredMessage] | string |
Message to show if validation fails | |
| [perRegion] | boolean |
Use this tag to rate regions instead of the whole object | |
| [perItem] | boolean |
Use this tag to rate items inside the object instead of the whole object |
示例
基础标注配置,用于评估文本段落的内容
<View>
<Text name="txt" value="$text" />
<Rating name="rating" toName="txt" maxRating="10" icon="star" size="medium" />
</View>