I came across Chatterbot Library while exploring Python with AI! This library has a variety of impressive concepts, including Machine Learning and implementation of the Spacy library for Natural Language Processing. It features a Trainer class that can be trained with industry-specific initial questions and answers. Additionally, it can utilise the Ubuntu dialog corpus, although it is heavy in size.
During my exploration, I noticed that the library has not been updated for quite some time on the master branch on GitHub. But that should not be reason to not work on this library as it still has impressive concepts implemented in it. If you’re keen to explore, note that I was using Ubuntu24, which comes with a default Python version that is not compatible with this library. It worked smoothly for me on Python version 3.7.9, which is currently deprecated. To make it work, I had to download Python 3.7.9 from the source, compile it, and install it on my Ubuntu24. After that, I pulled the Chatterbot library with pip for version 1.0.7. And after that everything worked as expected.
To summarise below are details of software and their versions used:
OS: Ubuntu 24.04.1 LTS
Python Version: 3.7.9
Chatterbot Version: 1.0.7
Steps:
Ubuntu 24 version does not come by default with Python 3.7.9 so we will have to compile it and install it on our local system by using below commands, and also we need to install libsqlite3-dev before we start compilation process.
$ sudo apt install libsqlite3-dev
Please download Python source code for version 3.7.9 from the official link and enter into the root directory of it after extracting it. Assuming that you are now in the root directory we are going to execute below simple commands:
$ ./configure
$ make
$ make install
$ python3.7 -m pip install chatterbot==1.0.7
Ta Da!!! we are ready with a working installation.
Complete functionality of this library can be refered on it’s official link: https://chatterbot.readthedocs.io/