Skip to content

Latest commit

ย 

History

History
68 lines (50 loc) ยท 1.71 KB

README.md

File metadata and controls

68 lines (50 loc) ยท 1.71 KB

๐Ÿค– Simple Python Chatbot

A basic rule-based chatbot built with Python that responds to predefined user inputs using keyword matching.

๐Ÿ“‹ Description

This is a beginner-level Python chatbot that uses a dictionary of hardcoded question-answer pairs to simulate conversation. It matches user input against known keywords and returns a corresponding response.

๐Ÿš€ Features

  • Responds to greetings and farewells
  • Answers basic general knowledge questions
  • Solves simple arithmetic expressions
  • Case-insensitive input handling
  • Fallback response for unrecognized inputs

๐Ÿ› ๏ธ Tech Stack

  • Language: Python 3.x
  • Libraries Used: random (built-in)

โ–ถ๏ธ How to Run

  1. Make sure Python is installed on your system.
  2. Clone or download this repository.
  3. Open a terminal and navigate to the project folder.
  4. Run the script:
python chatbot.py
  1. Start chatting! Type bye to exit.

๐Ÿ’ฌ Sample Conversation

Chatbot: Hello! I'm a simple chatbot. You can start a conversation, or type 'bye' to exit. You: hello Chatbot: Hello! How can I help you? You: tell me a joke Chatbot: Why did the scarecrow win an award? Because he was outstanding in his field! You: 2+2= Chatbot: 4 You: bye Chatbot: Goodbye!


๐Ÿ“ Project Structure

๐Ÿ“ฆ simple-chatbot โ”— ๐Ÿ“œ chatbot.py


โš ๏ธ Limitations

  • Only responds to predefined inputs โ€” no NLP or AI involved
  • Cannot handle complex or multi-turn conversations
  • Arithmetic is hardcoded, not computed dynamically

๐Ÿ”ฎ Future Improvements

  • Add NLP using nltk or transformers
  • Integrate a machine learning model for dynamic responses
  • Add more topic coverage
  • Build a simple GUI using tkinter

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Anushka Kendre