Skip to content

مخططات التوسيم

حدد ماذا وكيف سيوسّم الموسِّمون بياناتك.

تحدد مخططات التوسيم مهام التوسيم للموسِّمين. يدعم Potato أكثر من 30 نوعًا من التوسيم يمكن دمجها لإنشاء مهام توسيم معقدة.

تشريح مخطط التعليق — أربعة حقول تحدد كل أداة؛ كدّس المخططات لطرح عدة أسئلة لكل عنصرتشريح مخطط التعليق

الهيكل الأساسي

يتم تعريف كل مخطط في مصفوفة 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)

اختر خيارًا واحدًا بالضبط من قائمة:

yaml
- annotation_type: radio
  name: sentiment
  description: "What is the sentiment of this text?"
  labels:
    - Positive
    - Negative
    - Neutral
 
  # Optional features
  sequential_key_binding:
    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
 
  # Show numeric values

3. اختيار متعدد (Multiselect)

اختر خيارات متعددة من قائمة:

yaml
- annotation_type: multiselect
  name: topics
  description: "Select all relevant topics"
  labels:
    - Politics
    - Technology
    - Sports
    - Entertainment
    - Science
 
  # Selection constraints
 
  # Allow free text response
  has_free_response: true

4. توسيم النطاقات

تمييز وتوسيم أجزاء من النص:

yaml
- annotation_type: span
  name: entities
  description: "Highlight named entities in the text"
  labels:
    - PERSON
    - ORGANIZATION
    - LOCATION
    - DATE
 
  # Visual customization
 
  # Allow overlapping spans
  allow_discontinuous: 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_value: 0
  max_value: 100
  step: 1
 
  # Endpoint labels
 
  # Show current value

6. إدخال النص

ردود نصية حرة:

yaml
- annotation_type: text
  name: explanation
  description: "Explain your reasoning"
 
  # Multi-line input
  rows: 4
 
  # Character limits
 
  # Placeholder text
  placeholder: "Enter your explanation here..."
 
  # Disable paste (for transcription tasks)

7. إدخال رقمي

إدخال رقمي مع قيود:

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

8. تقييم متعدد (تقييم مصفوفي)

تقييم عناصر متعددة على نفس المقياس:

yaml
- annotation_type: multirate
  name: quality_aspects
  description: "Rate each aspect of the response"
 
  # Randomize item order
 
  # Layout options

الخيارات المشتركة

اختصارات لوحة المفاتيح

سرّع التوسيم بربط المفاتيح:

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
  label_requirement:
    required: true
  labels:
    - Positive
    - Negative

مخططات متعددة

ادمج أنواع توسيم متعددة لكل عنصر:

yaml
annotation_schemes:
  # Primary classification
  - annotation_type: radio
    name: sentiment
    description: "Overall sentiment"
    labels:
      - Positive
      - Negative
      - Neutral
    label_requirement:
      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
    has_free_response: true
 
  # Notes
  - annotation_type: text
    name: notes
    description: "Any additional observations?"
    rows: 4
    label_requirement:
      required: false

الميزات المتقدمة

المقارنة الزوجية

قارن عنصرين:

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

مقياس الأفضل-الأسوأ

رتّب العناصر باختيار الأفضل والأسوأ:

yaml
- annotation_type: bws
  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

مرجع صيغ البيانات

المدخلات

تعمل مخططات التوسيم مع صيغة بياناتك:

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 خيارًا
  • Likert: 5-7 نقاط

6. اختبر أولاً

وسِّم عدة أمثلة بنفسك قبل النشر لاكتشاف:

  • تسميات غامضة
  • فئات مفقودة
  • تعليمات غير واضحة