界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

training

training

【数据与研究】Use ChatterBot trainers, corpus utilities, CSV/TSV/JSON field maps, Ubuntu corpus handling, progress controls, and training-data export workflows.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: training description: "Use ChatterBot trainers, corpus utilities, CSV/TSV/JSON field maps, Ubuntu corpus handling, progress controls, and training-data export workflows." disable-model-invocation: true metadata: disco-role: operating license: BSD 3-Clause

ChatterBot Training

Use this sub-skill when a task asks how to teach a ChatterBot bot responses, load chatterbot-corpus, train from list/CSV/TSV/JSON files, export learned conversations, control training progress, or debug trainer data-format errors.

Quick route

  1. Read references/training-api.md for trainer signatures, input shapes, and data formats.
  2. Read references/workflows.md for minimal list, corpus, CSV/TSV, JSON, Ubuntu corpus, and export recipes.
  3. Read references/troubleshooting.md for field-map, corpus, optional dependency, and large download failures.
  4. Use scripts/list_training_demo.py for a tiny list-training smoke test.
  5. Use scripts/file_training_demo.py to generate and train tiny CSV or JSON fixtures.
  6. Use scripts/export_training_data.py to train a tiny bot and write export JSON.

Trainer selection

TaskTrainer
A single ordered conversation in PythonListTrainer
Installed chatterbot-corpus data by dotted pathChatterBotCorpusTrainer
CSV or TSV rowsCsvFileTrainer
JSON files with a root conversation arrayJsonFileTrainer
Legacy Ubuntu dialog corpus tar/TSV layoutUbuntuCorpusTrainer
Custom source/formatsubclass Trainer and implement train()

Required setup

Most trainer paths instantiate a normal ChatBot, so the default SQL + PosLemmaTagger path needs a spaCy model such as en_core_web_sm.

Corpus training needs pyyaml and usually the separate chatterbot-corpus package. Unit conversion is not a training feature; route that to logic-adapters.

Data model

Training creates Statement rows. Each response statement normally stores:

  • its own text;
  • in_response_to pointing at the previous utterance or explicit response field;
  • search_text and search_in_response_to computed by the bot's tagger;
  • optional conversation, persona, tags, and created_at metadata.

Configure preprocessors and tagger before training because trainers apply the bot's preprocessors and tagger while building statements.

Boundaries

  • For core ChatBot lifecycle and read-only inference after training, use core-chatbot.
  • For response selection after trained data exists, use logic-adapters.
  • For storage backend persistence and query filters, use storage-adapters.
  • For Django database migrations and web app training integration, use django-integration.
我的收藏