生產力功能
鍵盤快捷鍵、工具提示、關鍵詞高亮和標籤建議。
Potato 包含多項功能幫助標註者更快、更準確地工作,包括鍵盤快捷鍵、工具提示、關鍵詞高亮和標籤建議。
鍵盤快捷鍵
順序按鍵繫結
對於最多 10 個選項的標註模式,可以預設按順序分配按鍵繫結:
yaml
annotation_schemes:
- annotation_type: radio
name: sentiment
labels: [positive, neutral, negative]
sequential_key_binding: true第一個選項對應"1"鍵,第二個對應"2",以此類推。
自定義按鍵繫結
需要更多控制時,為每個標籤配置自定義按鍵繫結:
yaml
annotation_schemes:
- annotation_type: multiselect
labels:
- name: "Option 1"
key_value: "1"
- name: "Option 2"
key_value: "2"
- name: "Skip"
key_value: "s"管理員關鍵詞高亮
使用彩色高亮幫助標註者識別相關詞彙和短語。
配置
yaml
keyword_highlights_file: data/keywords.tsvTSV 檔案格式
關鍵詞檔案應為製表符分隔,包含三列:
text
Word Label Schema
love positive sentiment
hate negative sentiment
excel* positive sentiment
disappoint* negative sentiment
| 列 | 描述 |
|---|---|
| Word | 要高亮的關鍵詞或短語(支援 * 萬用字元) |
| Label | 與此關鍵詞關聯的標註標籤 |
| Schema | 標註模式名稱 |
匹配行為
- 不區分大小寫:"Love"匹配"love"、"LOVE"、"Love"
- 詞邊界:"love"匹配"love"但不匹配"lovely"(除非使用萬用字元)
- 萬用字元:使用
*進行字首/字尾匹配:excel*匹配"excellent"、"excels"、"excel"*happy匹配"unhappy"、"happy"
配置顏色
顏色在 ui.spans.span_colors 部分配置:
yaml
ui:
spans:
span_colors:
sentiment:
positive: "(34, 197, 94)" # Green
negative: "(239, 68, 68)" # Red
neutral: "(156, 163, 175)" # Gray隨機化設定
出於研究目的,配置關鍵詞高亮隨機化以防止標註者僅依賴高亮:
yaml
keyword_highlights_file: data/keywords.tsv
keyword_highlight_settings:
keyword_probability: 1.0 # Show 100% of keywords (0.0-1.0)
random_word_probability: 0.05 # Highlight 5% random words as distractors
random_word_label: "distractor"
random_word_schema: "keyword"主要特性:
- 永續性:高亮詞按使用者+實例快取
- 確定性隨機化:使用使用者名稱 + 實例 ID 的雜湊作為種子
- 行為追蹤:記錄哪些詞被高亮
工具提示
為每個響應選項新增詳細說明:
純文本工具提示
yaml
annotation_schemes:
- annotation_type: multiselect
name: "Question"
labels:
- name: "Label 1"
tooltip: "This option means..."HTML 工具提示
需要格式化的工具提示時,指向 HTML 檔案:
yaml
annotation_schemes:
- annotation_type: multiselect
name: "Question"
labels:
- name: "Label 1"
tooltip_file: "config/tooltips/label1_tooltip.html"標籤建議
顯示建議以幫助標註者,有兩種模式:
highlight:用顏色高亮建議的標籤prefill:自動預選建議的標籤
配置
yaml
annotation_schemes:
- annotation_type: multiselect
name: "sentiment"
description: "What sentiment does the text express?"
labels: [positive, neutral, negative]
- annotation_type: text
name: "explanation"
description: "Why do you think so?"
rows: 4
rows: 2資料格式
在資料項中包含建議:
json
{
"id": "1",
"text": "Good Job!",
"label_suggestions": {
"sentiment": "positive",
"explanation": "Because I think "
}
}自動任務分配
輕鬆地將標註任務分配給不同的標註者:
yaml
automatic_assignment:
on: true
output_filename: "task_assignment.json"
sampling_strategy: "random"
labels_per_instance: 10
instance_per_annotator: 50
test_question_per_annotator: 2主動學習整合
生產力功能與主動學習整合,優先處理最有資訊價值的實例:
yaml
active_learning:
enabled: true
schema_names: ["sentiment"]
min_annotations_per_instance: 2
min_instances_for_training: 20
update_frequency: 10最佳實踐
- 為高量任務使用鍵盤快捷鍵 - 它們顯著加快標註速度
- 為複雜或模糊的標籤新增工具提示 - 減少不一致性
- 使用關鍵詞高亮引起對相關文本的注意,但考慮為研究有效性進行隨機化
- 謹慎使用預填充建議 - 過度使用可能使標註者產生偏見
延伸閱讀
有關實現細節,請參閱原始碼文件。