Skip to content

Schémas d'annotation

Définissez quoi et comment les annotateurs étiquetteront vos données.

Schémas d'annotation

Les schémas d'annotation définissent les tâches d'étiquetage pour vos annotateurs. Potato 2.0 prend en charge quatorze types d'annotation qui peuvent être combinés pour créer des tâches d'annotation complexes.

Structure de base

Chaque schéma est défini dans le tableau annotation_schemes :

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

Champs obligatoires

ChampDescription
annotation_typeType d'annotation (radio, multiselect, likert, span, text, number, slider, multirate)
nameIdentifiant interne (sans espaces, utilisé dans la sortie)
descriptionInstructions affichées aux annotateurs

Types d'annotation supportés

1. Radio (choix unique)

Sélectionnez exactement une option dans une liste :

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. Échelle de Likert

Échelles d'évaluation avec des extrémités étiquetées :

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. Sélection multiple (choix multiples)

Sélectionnez plusieurs options dans une liste :

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. Annotation de segments

Surlignez et étiquetez des segments de texte :

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. Curseur

Plage numérique continue :

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. Saisie de texte

Réponses textuelles libres :

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. Saisie numérique

Entrée numérique avec contraintes :

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

8. Évaluation multiple (évaluation matricielle)

Évaluez plusieurs éléments sur la même échelle :

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

Options communes

Raccourcis clavier

Accélérez l'annotation avec des raccourcis clavier :

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

Info-bulles

Fournissez des indices au survol pour les étiquettes :

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

Couleurs des étiquettes

Couleurs personnalisées pour la distinction visuelle :

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

Champs obligatoires

Rendez un schéma obligatoire avant la soumission :

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

Schémas multiples

Combinez plusieurs types d'annotation par instance :

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

Fonctionnalités avancées

Comparaison par paires

Comparez deux éléments :

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

Classement Best-Worst

Classez les éléments en sélectionnant le meilleur et le pire :

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

Sélection par menu déroulant

Sélection unique économe en espace :

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"

Référence du format de données

Entrée

Les schémas d'annotation fonctionnent avec votre format de données :

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

Sortie

Les annotations sont sauvegardées avec les noms de schémas comme clés :

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."
  }
}

Bonnes pratiques

1. Étiquettes claires

Utilisez des étiquettes non ambiguës et distinctes :

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

2. Info-bulles utiles

Ajoutez des info-bulles pour les étiquettes nuancées :

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

3. Raccourcis clavier

Activez les raccourcis pour les tâches à grand volume :

yaml
sequential_key_binding: true

4. Ordre logique

Ordonnez les étiquettes de manière cohérente :

  • Les plus courantes en premier
  • Alphabétiquement
  • Par intensité (faible à élevée)

5. Limiter les options

Trop de choix ralentit l'annotation :

  • Radio : 2 à 7 options
  • Sélection multiple : 5 à 15 options
  • Likert : 5 à 7 points

6. Tester d'abord

Annotez plusieurs exemples vous-même avant le déploiement pour détecter :

  • Les étiquettes ambiguës
  • Les catégories manquantes
  • Les instructions peu claires