어노테이션 스키마
YAML로 어노테이션 스키마를 정의합니다 — radio, checkbox, span, likert, slider, text 및 25가지 이상의 유형. 레이블, 질문, 필수 항목, 표시 옵션을 구성합니다.
어노테이션 스키마는 어노테이터를 위한 레이블링 작업을 정의합니다. Potato는 복잡한 어노테이션 작업을 만들기 위해 조합할 수 있는 30가지가 넘는 어노테이션 유형을 지원합니다.
기본 구조
각 스키마는 annotation_schemes 배열에 정의됩니다:
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, select, pairwise, best_worst, soft_label, confidence_annotation, constant_sum, range_slider, semantic_differential, hierarchical_multiselect, card_sort, rubric_eval, extractive_qa, error_span, triage, coreference, span_link, entity_linking 등) |
name | 내부 식별자 (공백 없음, 출력에 사용됨) |
description | 어노테이터에게 표시되는 지침 |
지원되는 어노테이션 유형
1. Radio (단일 선택)
목록에서 정확히 하나의 옵션을 선택합니다:
- 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: true2. 리커트 척도
끝점에 레이블이 있는 평가 척도입니다:
- 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: true3. Multiselect (다중 선택)
목록에서 여러 옵션을 선택합니다:
- 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. Span 어노테이션
텍스트 구간을 강조 표시하고 레이블을 지정합니다:
- 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: true5. Slider
연속적인 숫자 범위입니다:
- 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: true6. 텍스트 입력
자유 형식의 텍스트 응답입니다:
- 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: true7. 숫자 입력
제약 조건이 있는 숫자 입력입니다:
- annotation_type: number
name: count
description: "How many entities are mentioned?"
min: 0
max: 100
step: 1
default: 08. Multirate (행렬 평가)
여러 항목을 동일한 척도로 평가합니다:
- 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공통 옵션
키보드 단축키
키보드 바인딩으로 어노테이션 속도를 높입니다:
# Manual shortcuts
keyboard_shortcuts:
Positive: "1"
Negative: "2"
Neutral: "3"
# Or automatic sequential binding
sequential_key_binding: true # Assigns 1, 2, 3...툴팁
레이블에 마우스를 올렸을 때 표시되는 힌트를 제공합니다:
tooltips:
Positive: "Expresses happiness, approval, or satisfaction"
Negative: "Expresses sadness, anger, or disappointment"
Neutral: "No clear emotional content"레이블 색상
시각적 구분을 위한 사용자 지정 색상입니다:
label_colors:
PERSON: "#3b82f6"
LOCATION: "#10b981"
ORGANIZATION: "#f59e0b"필수 항목
제출 전에 스키마를 필수로 만듭니다:
- annotation_type: radio
name: sentiment
required: true
labels:
- Positive
- Negative여러 스키마
인스턴스마다 여러 어노테이션 유형을 조합합니다:
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고급 기능
쌍대 비교
두 항목을 비교합니다:
- 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: trueBest-Worst 척도화
가장 좋은 항목과 가장 나쁜 항목을 선택하여 순위를 매깁니다:
- annotation_type: best_worst
name: ranking
description: "Select the best and worst items"
# Items come from the data file드롭다운 선택
공간을 절약하는 단일 선택입니다:
- 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"데이터 형식 참조
입력
어노테이션 스키마는 사용 중인 데이터 형식과 함께 작동합니다:
{
"id": "doc_1",
"text": "This is the text to annotate."
}출력
어노테이션은 스키마 이름을 키로 하여 저장됩니다:
{
"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. 명확한 레이블
모호하지 않고 구분되는 레이블을 사용합니다:
# Good
labels:
- Strongly Positive
- Somewhat Positive
- Neutral
- Somewhat Negative
- Strongly Negative
# Avoid
labels:
- Good
- OK
- Fine
- Acceptable2. 도움이 되는 툴팁
미묘한 차이가 있는 레이블에는 툴팁을 추가합니다:
tooltips:
Sarcasm: "The text says the opposite of what it means"
Irony: "A mismatch between expectation and reality"3. 키보드 단축키
대량 작업에는 단축키를 활성화합니다:
sequential_key_binding: true4. 논리적인 순서
레이블을 일관되게 정렬합니다:
- 가장 흔한 것을 먼저
- 알파벳 순서로
- 강도순으로 (낮음에서 높음으로)
5. 옵션 제한
선택지가 너무 많으면 어노테이션이 느려집니다:
- Radio: 2-7개 옵션
- Multiselect: 5-15개 옵션
- Likert: 5-7개 지점
6. 먼저 테스트하기
배포하기 전에 직접 여러 예시를 어노테이션하여 다음을 발견합니다:
- 모호한 레이블
- 누락된 카테고리
- 불명확한 지침