Skip to content
Cette page n'est pas encore disponible dans votre langue. La version anglaise est affichée.

Dialogue Annotation

विशेष प्रदर्शन विकल्पों के साथ वार्तालाप और बहु-आइटम टेक्स्ट को एनोटेट करें।

Dialogue और List Annotation

Potato बहु-आइटम डेटा के एनोटेशन का समर्थन करता है जहाँ प्रत्येक इंस्टेंस में टेक्स्ट तत्वों की एक सूची होती है। यह आमतौर पर इसके लिए उपयोग किया जाता है:

  • Dialogue एनोटेशन: कई मोड़ वाले वार्तालाप
  • Pairwise comparison: दो या अधिक टेक्स्ट वेरिएंट की तुलना
  • बहु-दस्तावेज़ कार्य: कई संबंधित टेक्स्ट को रेट करना या लेबल करना

डेटा फॉर्मेट

इनपुट डेटा

बहु-आइटम डेटा को text फ़ील्ड में स्ट्रिंग की सूची के रूप में दर्शाया जाता है:

json
{"id": "conv_001", "text": ["Tom: Isn't this awesome?!", "Sam: Yes! I like you!", "Tom: Great!", "Sam: Awesome! Let's party!"]}
{"id": "conv_002", "text": ["Tom: I am so sorry for that", "Sam: No worries", "Tom: Thanks for your understanding!"]}

सूची में प्रत्येक स्ट्रिंग एक आइटम का प्रतिनिधित्व करती है (जैसे, एक dialogue मोड़, एक दस्तावेज़ वेरिएंट)।

कॉन्फ़िगरेशन

बुनियादी सेटअप

yaml
# Data configuration
data_files:
  - data/dialogues.json
 
item_properties:
  id_key: id
  text_key: text
 
# Configure list display
list_as_text:
  text_list_prefix_type: none  # No prefix since speaker names are in text
  alternating_shading: true    # Shade every other turn for readability
 
# Annotation schemes
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    description: "What is the overall sentiment of this conversation?"
    labels:
      - positive
      - neutral
      - negative

प्रदर्शन विकल्प

list_as_text कॉन्फ़िगरेशन नियंत्रित करता है कि सूची आइटम कैसे प्रदर्शित होते हैं:

yaml
list_as_text:
  text_list_prefix_type: alphabet  # Prefix type for items
  horizontal: false                # Layout direction
  alternating_shading: false       # Shade alternate turns

उपसर्ग प्रकार

विकल्पउदाहरणसबसे उपयुक्त
alphabetA. B. C.Pairwise comparisons, विकल्प
number1. 2. 3.अनुक्रमिक मोड़, क्रमबद्ध सूचियाँ
bullet. . .अव्यवस्थित आइटम
none(कोई उपसर्ग नहीं)टेक्स्ट में स्पीकर नाम के साथ Dialogue

लेआउट विकल्प

विकल्पविवरण
horizontal: falseलंबवत लेआउट (डिफ़ॉल्ट) - आइटम स्टैक्ड
horizontal: trueसाइड-बाय-साइड लेआउट - pairwise comparison के लिए
alternating_shading: truedialogue के लिए हर दूसरे मोड़ को शेड करता है

उदाहरण कॉन्फ़िगरेशन

Dialogue Annotation

yaml
annotation_task_name: Dialogue Analysis
 
data_files:
  - data/dialogues.json
 
item_properties:
  id_key: id
  text_key: text
 
list_as_text:
  text_list_prefix_type: none
  alternating_shading: true
 
annotation_schemes:
  - annotation_type: span
    name: certainty
    description: Highlight phrases expressing certainty or uncertainty
    labels:
      - certain
      - uncertain
    sequential_key_binding: true
 
  - annotation_type: radio
    name: sentiment
    description: What sentiment does the conversation hold?
    labels:
      - positive
      - neutral
      - negative
    sequential_key_binding: true

Pairwise Text Comparison

yaml
annotation_task_name: Text Comparison
 
data_files:
  - data/pairs.json
 
item_properties:
  id_key: id
  text_key: text
 
list_as_text:
  text_list_prefix_type: alphabet
  horizontal: true
 
annotation_schemes:
  - annotation_type: radio
    name: preference
    description: Which text is better?
    labels:
      - A is better
      - B is better
      - Equal

कार्यशील उदाहरण

एक पूर्ण कार्यशील उदाहरण project-hub/dialogue_analysis/ पर उपलब्ध है:

bash
python potato/flask_server.py start project-hub/dialogue_analysis/configs/dialogue-analysis.yaml -p 8000

नमूना डेटा फॉर्मेट:

json
{"id":"1","text":["Tom: Isn't this awesome?!", "Sam: Yes! I like you!", "Tom: great!", "Sam: Awesome! Let's party!"]}
{"id":"2","text":["Tom: I am so sorry for that", "Sam: No worries", "Tom: thanks for your understanding!"]}

सुझाव

  1. स्पीकर नाम: text_list_prefix_type: none का उपयोग करते समय dialogue के लिए टेक्स्ट में स्पीकर नाम शामिल करें (जैसे, "Tom: Hello")

  2. Span एनोटेशन: Dialogue डेटा के साथ span एनोटेशन का उपयोग करते समय, एनोटेटर प्रदर्शित किसी भी मोड़ के भीतर टेक्स्ट हाइलाइट कर सकते हैं

  3. उपसर्ग चयन:

    • जब स्पीकर नाम टेक्स्ट में एम्बेडेड हों तो dialogue के लिए none का उपयोग करें
    • जब अनुक्रम क्रम महत्वपूर्ण हो तो number का उपयोग करें
    • pairwise/comparison कार्यों के लिए alphabet का उपयोग करें
  4. पठनीयता: लंबे dialogue के लिए alternating_shading सक्षम करें ताकि एनोटेटर्स को यह ट्रैक करने में मदद मिले कि वे किस मोड़ को पढ़ रहे हैं

  5. तुलना कार्य: साइड-बाय-साइड तुलना के लिए alphabet उपसर्ग के साथ horizontal: true का उपयोग करें

अधिक पढ़ें

  • Pairwise Comparison - साइड-बाय-साइड तुलना एनोटेशन
  • Span Annotation - Dialogue मोड़ में टेक्स्ट हाइलाइट करना
  • Radio & Multiselect - वार्तालाप का वर्गीकरण

कार्यान्वयन विवरण के लिए, स्रोत दस्तावेज़ीकरण देखें।