I created a very simple bot to learn how to use chatterbot. This library already comes with a training, but I wanted extra training with an import of a corpus in Portuguese that I found in github.

from chatterbot import ChatBot

bot = Futaba(


print("Type something to begin...")

while True:
        bot_input = bot.get_response(None)
    except (KeyboardInterrupt, EOFError, SystemExit):

That's all I have.

How can I import this corpus into my chatbot?

  • $\begingroup$ I'm voting to close this question as off-topic because it's not really about AI, but about an implementation detail with a particular software package, which happens to be on an AI-related topic. $\endgroup$ – Oliver Mason Nov 6 '18 at 11:23
  • $\begingroup$ Wow, but then I do not understand. If I ask questions about developing a chatbot in a programming forum the question is closed because it refers to AI. If I ask in an AI forum close for not being on IA. $\endgroup$ – Mariana Bayonetta Nov 6 '18 at 11:25
  • 1
    $\begingroup$ This seems to me to be about a specific piece of software. To answer that question you need no expertise in AI, so that's my reasoning. I have worked with/in AI for about 20+ years, and I have no clue how to answer your question. I don't even know what library you are talking about, so I cannot look up the documentation for it. $\endgroup$ – Oliver Mason Nov 6 '18 at 13:35
  • $\begingroup$ Chatterbot for python $\endgroup$ – Mariana Bayonetta Nov 6 '18 at 14:36

I'm not sure if this is the right one, but according to the documentation you need to create a trainer for it:

from chatterbot.trainers import ChatterBotCorpusTrainer

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

# Train based on the english corpus

Instead of "chatterbot.corpus.english" you obviously choose your own training data.

  • $\begingroup$ Basically, I just need to put my corpus, put in the chatbot folder and import on that page? $\endgroup$ – Mariana Bayonetta Nov 7 '18 at 10:42
  • $\begingroup$ That's how I understand it. Not sure what format the corpus needs to be in -- you might have to look at the other example data sets. $\endgroup$ – Oliver Mason Nov 7 '18 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.