Skip to content
Alex edited this page Mar 14, 2017 · 1 revision

Speech AI wiki

FAQ:

Why training on big sources with chatterbot is so slow?

By default chatterbot library uses JsonStorageAdapter, which mean that it uses .json file like database. DB vs flat files
chatterbot library also provides Mongo Database Adapter class, which uses Mongo DB. It should be much faster. Details Here

How can I train my bot on my own sources?

You can train you bot with several sources:

  • Courpus files
  • ListTrainer
  • Twitter API
  • Ubuntu Dialog Corpus
  • Write your own trainer class

To train with you sources you can use CorupusTrainer, which uses json files with dialogs.
chatter bot has own library of corpuses for some languages.

chatterbot.train(
    "chatterbot.corpus.english"
)

But you can also create your own corpus in the same format and use it like

# This will train you bot with corpus files, which are in directory ./data/my_corpus/
chatterbot.train(
    "./data/my_corpus/"
)

# This will train you bot with two specific JSON files
chatterbot.train(
    "./data/greetings.corpus.json",
    "./data/life_meaning.corpus.json",
)

How to get training results of current session?

You can export results of current session with
chatbot.trainer.export_for_training('./my_export.json')

Also note that bot.get_response trains your bot that the user's input was a valid response to the chat bot's previous output.
There are some other methods to work with bot. Details