Skip to content
此页面尚未提供您所选语言的版本,当前显示英文版本。

Guida Rapida

Inizia a usare Potato in meno di 5 minuti.

Guida Rapida

Avvia Potato in pochi semplici passi. Questa guida ti permetterà di annotare dati in meno di 5 minuti.

Prerequisiti

  • Python 3.7 o versione superiore
  • Gestore di pacchetti pip

Installazione

Installa Potato tramite pip:

bash
pip install potato-annotation

Crea il Tuo Primo Progetto

1. Crea una directory di progetto

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

2. Crea il tuo file di dati

Crea una cartella data e aggiungi un file chiamato data.json con i dati da annotare:

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. Crea la tua configurazione

Crea un file chiamato config.yaml nella directory del progetto:

Importante: Il file di configurazione deve trovarsi all'interno della directory del progetto. Questo è un requisito di sicurezza in 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. Avvia il server

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

Oppure usando la forma abbreviata:

bash
potato start config.yaml

5. Apri il browser

Naviga su http://localhost:8000 e inizia ad annotare!

Struttura del Progetto

Il tuo progetto dovrebbe avere questo aspetto:

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

Cosa c'è Dopo?

Strumenti e Utilità

Una volta acquisita familiarità con le basi, consulta questi strumenti utili: