هذه الصفحة غير متوفرة بلغتك بعد. يتم عرض النسخة الإنجليزية.
Konfigurationsgrundlagen
Lernen Sie die Grundlagen der Potato-Konfigurationsdateien.
Konfigurationsgrundlagen
Potato verwendet YAML-Konfigurationsdateien zur Definition von Annotationsaufgaben. Diese Anleitung behandelt die wesentlichen Konfigurationsoptionen.
Struktur der Konfigurationsdatei
Eine grundlegende Potato-Konfiguration enthält diese Hauptabschnitte:
yaml
# Task settings
annotation_task_name: "My Annotation Task"
port: 8000
# Data configuration
data_files:
- data.json
item_properties:
id_key: id
text_key: text
# Output settings
output_annotation_dir: "annotation_output/"
output_annotation_format: "json"
# Annotation schemes
annotation_schemes:
- annotation_type: radio
name: my_annotation
labels:
- Label 1
- Label 2
# User settings
allow_all_users: trueWesentliche Einstellungen
Aufgaben- und Serverkonfiguration
yaml
annotation_task_name: "My Task" # Display name for your task
port: 8000 # Port to run the server onDatenkonfiguration
yaml
data_files:
- data.json # Path to your data file(s)
- more_data.json # You can specify multiple files
item_properties:
id_key: id # Field containing unique ID
text_key: text # Field containing text to annotateUnterstützte Datenformate:
- JSON (
.json) - JSON Lines (
.jsonl) - CSV (
.csv) - TSV (
.tsv)
Ausgabekonfiguration
yaml
output_annotation_dir: "annotation_output/" # Directory for annotation files
output_annotation_format: "json" # Format: json, jsonl, csv, tsvAnnotationsschemata
Definieren Sie ein oder mehrere Annotationsschemata:
yaml
annotation_schemes:
- annotation_type: radio # Type of annotation
name: sentiment # Internal name
description: "Select the sentiment" # Instructions
labels: # Options for annotators
- Positive
- Negative
- NeutralVerfügbare Annotationstypen
| Typ | Beschreibung |
|---|---|
radio | Einfachauswahl |
multiselect | Mehrfachauswahl |
likert | Bewertung auf einer Skala |
text | Freitexteingabe |
number | Numerische Eingabe |
span | Textbereich-Markierung |
slider | Kontinuierliche Bereichsauswahl |
multirate | Bewertung mehrerer Elemente |
Benutzerkonfiguration
Alle Benutzer zulassen
yaml
allow_all_users: trueAuf bestimmte Benutzer beschränken
yaml
allow_all_users: false
authorized_users:
- user1@example.com
- user2@example.comAufgabenverzeichnis
Die Einstellung task_dir definiert das Stammverzeichnis für relative Pfade:
yaml
task_dir: ./my-task/
data_files:
- data/input.json # Resolves to ./my-task/data/input.jsonVollständiges Beispiel
Hier ist eine vollständige Konfiguration für eine Sentiment-Analyse-Aufgabe:
yaml
# config.yaml
annotation_task_name: "Sentiment Analysis"
port: 8000
task_dir: ./
# Data
data_files:
- data/tweets.json
item_properties:
id_key: id
text_key: text
context_key: metadata
# Output
output_annotation_dir: "annotation_output/"
output_annotation_format: "json"
# Annotation
annotation_schemes:
- annotation_type: radio
name: sentiment
description: "What is the sentiment expressed in this tweet?"
labels:
- name: Positive
key_value: "1"
- name: Negative
key_value: "2"
- name: Neutral
key_value: "3"
sequential_key_binding: true
# Users
allow_all_users: true
# Assignment
instances_per_annotator: 100
annotation_per_instance: 2Nächste Schritte
- Erkunden Sie Datenformate im Detail
- Erfahren Sie mehr über Annotationsschemata
- Passen Sie die Oberfläche mit der UI-Konfiguration an
- Verwenden Sie die Preview CLI, um Ihre Konfiguration zu validieren