📜  使用 yml 训练 chatterbot - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:03.431000             🧑  作者: Mango

代码示例1
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

bot = ChatBot(
    "Chat Bot",
    storage_adapter="chatterbot.storage.SQLStorageAdapter",
    database="botData.sqlite3"
)

trainer = ChatterBotCorpusTrainer(chatbot)

trainer.train("data/trainingdata.yml")