单选与多选
单选和多选标注类型。
单选与多选
单选按钮和多选复选框是分类任务中最常见的标注类型。
单选按钮
当标注者应选择恰好一个选项时使用单选按钮。
基本配置
yaml
annotation_schemes:
- annotation_type: radio
name: sentiment
description: "Select the sentiment of this text"
labels:
- Positive
- Negative
- Neutral带键盘快捷键
添加键盘快捷键以加快标注速度:
yaml
annotation_schemes:
- annotation_type: radio
name: sentiment
description: "Select the sentiment"
labels:
- Positive
- Negative
- Neutral
keyboard_shortcuts:
Positive: "1"
Negative: "2"
Neutral: "3"带工具提示
为每个选项提供额外的上下文:
yaml
annotation_schemes:
- annotation_type: radio
name: sentiment
description: "Select the sentiment"
labels:
- Positive
- Negative
- Neutral
tooltips:
Positive: "The text expresses happiness, satisfaction, or approval"
Negative: "The text expresses sadness, anger, or disapproval"
Neutral: "The text does not express strong emotion"多选
当标注者可以选择多个选项时使用多选。
基本配置
yaml
annotation_schemes:
- annotation_type: multiselect
name: topics
description: "Select all topics that apply"
labels:
- Politics
- Sports
- Technology
- Entertainment
- Science带最少/最多选择限制
约束选择数量:
yaml
annotation_schemes:
- annotation_type: multiselect
name: topics
description: "Select 1-3 topics"
labels:
- Politics
- Sports
- Technology
min_selections: 1
max_selections: 3样式选项
水平布局
水平而非垂直显示选项:
yaml
annotation_schemes:
- annotation_type: radio
name: rating
labels:
- "1"
- "2"
- "3"
- "4"
- "5"
display: horizontal自定义颜色
为标签分配颜色:
yaml
annotation_schemes:
- annotation_type: radio
name: sentiment
labels:
- Positive
- Negative
- Neutral
label_colors:
Positive: "#22c55e"
Negative: "#ef4444"
Neutral: "#6b7280"最佳实践
- 保持标签简洁 - 使用简短、清晰的标签名称
- 使用键盘快捷键 - 显著加快标注速度
- 为含糊的标签添加工具提示 - 有助于确保一致性
- 限制选项数量 - 过多的选择会减慢标注者的速度
- 按逻辑排列 - 最常见的选项放在前面,或按字母顺序排列