クイックスタート
5分以内にPotatoを導入して使い始めましょう。
クイックスタート
わずか数ステップでPotatoを起動できます。このガイドに従えば、5分以内にデータのアノテーションを開始できます。
前提条件
- Python 3.7以上
- pipパッケージマネージャー
インストール
pipを使用してPotatoをインストールします:
bash
pip install potato-annotation最初のプロジェクトを作成する
1. プロジェクトディレクトリを作成する
bash
mkdir my-annotation-task
cd my-annotation-task2. データファイルを作成する
dataフォルダを作成し、アノテーション対象のデータを含むdata.jsonファイルを追加します:
bash
mkdir datajson
[
{"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. 設定ファイルを作成する
プロジェクトディレクトリにconfig.yamlファイルを作成します:
重要: 設定ファイルはプロジェクトディレクトリ内に配置する必要があります。これは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: true4. サーバーを起動する
bash
python -m potato start config.yaml -p 8000または省略形を使用:
bash
potato start config.yaml5. ブラウザを開く
http://localhost:8000 にアクセスしてアノテーションを開始しましょう!
プロジェクト構成
プロジェクトは以下のような構成になります:
text
my-annotation-task/
├── config.yaml
├── data/
│ └── data.json
└── output/ # Created automatically
└── annotations.json
次のステップ
- 設定の基本でより多くのオプションを学ぶ
- さまざまなアノテーションタイプを探索する
- チーム向けにユーザー管理を設定する
- AIサポートやアクティブラーニングなど、v2の新機能を確認する
ツールとユーティリティ
基本に慣れたら、以下の便利なツールをチェックしましょう:
- プレビューCLI - サーバーを起動せずに設定を検証
- デバッグガイド - デバッグフラグとトラブルシューティングのヒント
- ユーザーシミュレーター - シミュレートされたアノテーターでテスト