您的足迹:首页 > Linux&Python >chatterbot AttributeError: “ 'ChatBot' object has no attribute 'trains' ”

chatterbot AttributeError: “ 'ChatBot' object has no attribute 'trains' ”



from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Ron Obvious')

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

# Train the chatbot based on the english corpus
trainer.train("chatterbot.corpus.english")

本博客所有文章如无特别注明均为原创。作者:cc复制或转载请以超链接形式注明转自 .NET程序员之路
原文地址《chatterbot AttributeError: “ 'ChatBot' object has no attribute 'trains' ”

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(0)