A simple Python-based rule-driven chatbot designed to demonstrate fundamental concepts in natural language processing, pattern recognition, and command-based interaction.
This project showcases beginner-to-intermediate level chatbot architecture using conditional logic, keyword matching, and clean CLI formatting.
- Rule-based conversational engine
- Keyword detection for intelligent responses
- Multiple built-in commands:
- Greetings
- Weather-related questions
- Asking the chatbot's name
- Asking how the chatbot is feeling
- Help command
- Exit/Goodbye command
- Default fallback response for unknown inputs
- User-friendly terminal interface
- Python 3
- Conditional rule-based logic
- CLI interaction
The chatbot processes user input and checks for keywords using a structured rule-based engine:
- User types a message in the terminal
- Input is converted to lowercase
- Chatbot scans for known keywords
- Matching rule triggers the appropriate response
- If no rule is matched, the default fallback message is returned
Handles:
- Keyword matching
- Rule selection
- Response generation
The program runs in a loop until the user types "bye".
Simple Python Chatbot Type ‘bye’ to exit.
You: hello Chatbot: Hello! How can I assist you today?
You: what’s the weather Chatbot: I cannot check real-time weather, but it seems like a nice day to code!
You: your name? Chatbot: I am a simple Python chatbot created for learning purposes. You: bye Chatbot: Goodbye!
- Sentiment analysis support
- Regex-based intent detection
- NLP integration using NLTK or spaCy
- Live API-based weather responses
- GUI version using Tkinter
This project is released under the MIT License.