Skip to content

Démarrage rapide

Soyez opérationnel avec Potato en moins de 5 minutes.

Démarrage rapide

Lancez Potato en quelques étapes. Ce guide vous permettra d'annoter des données en moins de 5 minutes.

Prérequis

  • Python 3.7 ou supérieur
  • Gestionnaire de paquets pip

Installation

Installez Potato avec pip :

bash
pip install potato-annotation

Créez votre premier projet

1. Créez un répertoire de projet

bash
mkdir my-annotation-task
cd my-annotation-task

2. Créez votre fichier de données

Créez un dossier data et ajoutez un fichier appelé data.json avec vos données à annoter :

bash
mkdir data
json
[
  {"id": "1", "text": "I love this product! It's amazing."},
  {"id": "2", "text": "This is the worst experience ever."},
  {"id": "3", "text": "It's okay, nothing special."}
]

3. Créez votre configuration

Créez un fichier appelé config.yaml dans votre répertoire de projet :

Important : Votre fichier de configuration doit se trouver dans le répertoire du projet. C'est une exigence de sécurité dans Potato 2.0.

yaml
port: 8000
server_name: localhost
task_name: "Sentiment Analysis"
 
# Task directory (current directory)
task_dir: "."
 
# Data configuration
data_files:
  - "data/data.json"
 
item_properties:
  id_key: id
  text_key: text
 
# Output configuration
output_annotation_dir: "output/"
output_annotation_format: "json"
 
# Annotation scheme
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    description: "What is the sentiment of this text?"
    labels:
      - Positive
      - Negative
      - Neutral
 
# Allow anyone to annotate
allow_all_users: true

4. Démarrez le serveur

bash
python -m potato start config.yaml -p 8000

Ou en utilisant le raccourci :

bash
potato start config.yaml

5. Ouvrez votre navigateur

Accédez à http://localhost:8000 et commencez à annoter !

Structure du projet

Votre projet devrait ressembler à ceci :

text
my-annotation-task/
├── config.yaml
├── data/
│   └── data.json
└── output/          # Created automatically
    └── annotations.json

Et ensuite ?

Outils et utilitaires

Une fois à l'aise avec les bases, consultez ces outils pratiques :