Skip to content

アノテーションスキーム

アノテーターがデータにラベル付けする内容と方法を定義します。

アノテーションスキーム

アノテーションスキームは、アノテーターのラベリングタスクを定義します。Potato 2.0は、組み合わせて複雑なアノテーションタスクを作成できる14種類のアノテーションタイプをサポートしています。

基本構造

各スキームはannotation_schemes配列で定義されます:

yaml
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    description: "What is the sentiment?"
    labels:
      - Positive
      - Negative
      - Neutral

必須フィールド

フィールド説明
annotation_typeアノテーションのタイプ(radio、multiselect、likert、span、text、number、slider、multirate)
name内部識別子(スペースなし、出力で使用)
descriptionアノテーターに表示される指示

サポートされるアノテーションタイプ

1. Radio(単一選択)

リストから1つのオプションを選択:

yaml
- annotation_type: radio
  name: sentiment
  description: "What is the sentiment of this text?"
  labels:
    - Positive
    - Negative
    - Neutral
 
  # Optional features
  keyboard_shortcuts:
    Positive: "1"
    Negative: "2"
    Neutral: "3"
 
  # Or use sequential binding (1, 2, 3... automatically)
  sequential_key_binding: true
 
  # Horizontal layout instead of vertical
  horizontal: true

2. リッカートスケール

ラベル付きエンドポイントを持つ評価スケール:

yaml
- annotation_type: likert
  name: agreement
  description: "How much do you agree with this statement?"
  size: 5  # Number of scale points
  min_label: "Strongly Disagree"
  max_label: "Strongly Agree"
 
  # Optional mid-point label
  mid_label: "Neutral"
 
  # Show numeric values
  show_numbers: true

3. Multiselect(複数選択)

リストから複数のオプションを選択:

yaml
- annotation_type: multiselect
  name: topics
  description: "Select all relevant topics"
  labels:
    - Politics
    - Technology
    - Sports
    - Entertainment
    - Science
 
  # Selection constraints
  min_selections: 1
  max_selections: 3
 
  # Allow free text response
  free_response: true
  free_response_label: "Other (specify)"

4. スパンアノテーション

テキストセグメントをハイライトしてラベル付け:

yaml
- annotation_type: span
  name: entities
  description: "Highlight named entities in the text"
  labels:
    - PERSON
    - ORGANIZATION
    - LOCATION
    - DATE
 
  # Visual customization
  label_colors:
    PERSON: "#3b82f6"
    ORGANIZATION: "#10b981"
    LOCATION: "#f59e0b"
    DATE: "#8b5cf6"
 
  # Allow overlapping spans
  allow_overlapping: false
 
  # Keyboard shortcuts for labels
  sequential_key_binding: true

5. スライダー

連続的な数値範囲:

yaml
- annotation_type: slider
  name: confidence
  description: "How confident are you in your answer?"
  min: 0
  max: 100
  step: 1
  default: 50
 
  # Endpoint labels
  min_label: "Not confident"
  max_label: "Very confident"
 
  # Show current value
  show_value: true

6. テキスト入力

自由形式のテキスト回答:

yaml
- annotation_type: text
  name: explanation
  description: "Explain your reasoning"
 
  # Multi-line input
  textarea: true
 
  # Character limits
  min_length: 10
  max_length: 500
 
  # Placeholder text
  placeholder: "Enter your explanation here..."
 
  # Disable paste (for transcription tasks)
  disable_paste: true

7. 数値入力

制約付きの数値入力:

yaml
- annotation_type: number
  name: count
  description: "How many entities are mentioned?"
  min: 0
  max: 100
  step: 1
  default: 0

8. Multirate(マトリックス評価)

同じスケールで複数の項目を評価:

yaml
- annotation_type: multirate
  name: quality_aspects
  description: "Rate each aspect of the response"
  items:
    - Accuracy
    - Clarity
    - Completeness
    - Relevance
  size: 5  # Scale points
  min_label: "Poor"
  max_label: "Excellent"
 
  # Randomize item order
  randomize: true
 
  # Layout options
  compact: false

共通オプション

キーボードショートカット

キーバインドでアノテーションを高速化:

yaml
# Manual shortcuts
keyboard_shortcuts:
  Positive: "1"
  Negative: "2"
  Neutral: "3"
 
# Or automatic sequential binding
sequential_key_binding: true  # Assigns 1, 2, 3...

ツールチップ

ラベルにホバーヒントを提供:

yaml
tooltips:
  Positive: "Expresses happiness, approval, or satisfaction"
  Negative: "Expresses sadness, anger, or disappointment"
  Neutral: "No clear emotional content"

ラベルカラー

視覚的に区別するためのカスタムカラー:

yaml
label_colors:
  PERSON: "#3b82f6"
  LOCATION: "#10b981"
  ORGANIZATION: "#f59e0b"

必須フィールド

送信前にスキームを必須にする:

yaml
- annotation_type: radio
  name: sentiment
  required: true
  labels:
    - Positive
    - Negative

複数スキーム

インスタンスごとに複数のアノテーションタイプを組み合わせる:

yaml
annotation_schemes:
  # Primary classification
  - annotation_type: radio
    name: sentiment
    description: "Overall sentiment"
    labels:
      - Positive
      - Negative
      - Neutral
    required: true
    sequential_key_binding: true
 
  # Confidence rating
  - annotation_type: likert
    name: confidence
    description: "How confident are you?"
    size: 5
    min_label: "Guessing"
    max_label: "Certain"
 
  # Topic tags
  - annotation_type: multiselect
    name: topics
    description: "Select all relevant topics"
    labels:
      - Politics
      - Technology
      - Sports
      - Entertainment
    free_response: true
 
  # Notes
  - annotation_type: text
    name: notes
    description: "Any additional observations?"
    textarea: true
    required: false

高度な機能

ペアワイズ比較

2つのアイテムを比較:

yaml
- annotation_type: pairwise
  name: preference
  description: "Which response is better?"
  options:
    - label: "Response A"
      value: "A"
    - label: "Response B"
      value: "B"
    - label: "Equal"
      value: "tie"
 
  # Allow tie selection
  allow_tie: true

ベスト・ワーストスケーリング

最良と最悪を選択してアイテムをランク付け:

yaml
- annotation_type: best_worst
  name: ranking
  description: "Select the best and worst items"
  # Items come from the data file

ドロップダウン選択

省スペースの単一選択:

yaml
- annotation_type: select
  name: category
  description: "Select a category"
  labels:
    - Category A
    - Category B
    - Category C
    - Category D
    - Category E
 
  # Default selection
  default: "Category A"

データ形式リファレンス

入力

アノテーションスキームはデータ形式と連携します:

json
{
  "id": "doc_1",
  "text": "This is the text to annotate."
}

出力

アノテーションはスキーム名をキーとして保存されます:

json
{
  "id": "doc_1",
  "annotations": {
    "sentiment": "Positive",
    "confidence": 4,
    "topics": ["Technology", "Science"],
    "entities": [
      {"start": 0, "end": 4, "label": "ORGANIZATION", "text": "This"}
    ],
    "notes": "Clear positive sentiment about technology."
  }
}

ベストプラクティス

1. 明確なラベル

曖昧さのない、区別しやすいラベルを使用:

yaml
# Good
labels:
  - Strongly Positive
  - Somewhat Positive
  - Neutral
  - Somewhat Negative
  - Strongly Negative
 
# Avoid
labels:
  - Good
  - OK
  - Fine
  - Acceptable

2. 有用なツールチップ

ニュアンスのあるラベルにツールチップを追加:

yaml
tooltips:
  Sarcasm: "The text says the opposite of what it means"
  Irony: "A mismatch between expectation and reality"

3. キーボードショートカット

大量のタスクにはショートカットを有効に:

yaml
sequential_key_binding: true

4. 論理的な順序

ラベルを一貫した順序で並べる:

  • 最もよく使うものを先に
  • アルファベット順
  • 強度順(低から高へ)

5. オプション数の制限

選択肢が多すぎるとアノテーションが遅くなります:

  • Radio:2-7オプション
  • Multiselect:5-15オプション
  • リッカート:5-7ポイント

6. 事前テスト

デプロイ前に自分でいくつかの例をアノテーションして以下を確認:

  • 曖昧なラベル
  • 不足しているカテゴリ
  • 不明確な指示