Overview: Make a rule-based chatbot without deep learning.
Use Case: Educational bots, form fillers, interactive guides.
Libraries Used:
chatterbot==1.0.5
chatterbot_corpus
Installation:
pip install chatterbot==1.0.5 chatterbot_corpus
Working Code:
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
bot = ChatBot('Assistant')
trainer = ChatterBotCorpusTrainer(bot)
trainer.train('chatterbot.corpus.english')
response = bot.get_response("Hello")
print(response)
Try Online: Try in Replit