Skip to content

軟標籤

在 Potato 中配置軟標籤標註,用滑塊把固定總分分配到各個類別上,從而得到一個機率分佈。

軟標籤標註方案讓標註者在多個類別之間分配一個機率分佈,而不是做單一的硬分類決定。標註者用滑塊把固定的總量(例如 100 分)分配到各個標籤上,從而表達出不確定性或類別之間的重疊程度。

Potato 軟標籤介面,把 100 分分配到各個情感類別上Potato 中的軟標籤

概述

當一個條目可能部分屬於多個類別時,軟標籤很有用。這個方案不強迫標註者只選一個標籤,而是讓他們在所有選項上表達相對的把握程度。滑塊之間是聯動的,總和始終等於配置的總分,還可以開啟一張分佈圖提供直觀反饋。

快速上手

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: sentiment_distribution
    description: Distribute 100 points across sentiment categories based on how much each applies.
    labels: ["Positive", "Neutral", "Negative"]
    total: 100

配置項

欄位類型預設值說明
annotation_typestring必填必須是 "soft_label"
namestring必填該方案的唯一標識
descriptionstring必填展示給標註者的說明文字
labelsarray必填類別標籤列表(至少 2 個)
totalinteger100所有滑塊必須加總到的固定值
min_per_labelinteger0每個標籤至少要分到的值
show_distribution_chartbooleantrue顯示餅圖或柱狀圖展示當前分佈
label_requirement.requiredbooleanfalse是否必須完成該標註才能進入下一條

示例

情感分佈

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: sentiment_distribution
    description: How much does each sentiment apply to this text?
    labels: ["Positive", "Neutral", "Negative"]
    total: 100
    show_distribution_chart: true

情緒強度

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: emotion_mix
    description: Distribute points to reflect the mix of emotions in this utterance.
    labels: ["Joy", "Sadness", "Anger", "Fear", "Surprise", "Disgust"]
    total: 100
    min_per_label: 0
    show_distribution_chart: true

主題相關性

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: topic_relevance
    description: How relevant is this document to each topic?
    labels: ["Politics", "Sports", "Technology", "Entertainment"]
    total: 100

強制最低分配

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: genre_mix
    description: Allocate points across genres. Each genre must receive at least 5 points.
    labels: ["Rock", "Pop", "Jazz", "Classical", "Electronic"]
    total: 100
    min_per_label: 5

輸出格式

json
{
  "sentiment_distribution": {
    "labels": {
      "Positive": 45,
      "Neutral": 30,
      "Negative": 25
    }
  }
}

各項數值的總和始終等於配置的 total

實踐建議

  1. 類別有重疊時再用 —— 當條目確實以不同程度同時屬於多個類別時,軟標籤最合適
  2. 標籤數量別太多 —— 超過 6 到 7 個標籤,滑塊介面就不好用了
  3. 總分要選得有意義 —— 100 當作百分比最直觀,簡單任務用更小的總分也可以
  4. min_per_label 慎用 —— 某個標籤本來就不適用時,強制最低分配會讓結果產生偏差
  5. 開啟分佈圖 —— 直觀反饋能讓標註者一眼看清自己分配得怎麼樣

延伸閱讀

有關實現詳情,請參閱源文件