Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatterbox 🤖

Python License Status

Chatterbox is a lightweight, rule-based conversational agent built entirely in Python. Designed as a foundational project to explore Natural Language Processing (NLP) concepts and interactive command-line applications, Chatterbox demonstrates how continuous loops and conditional logic can simulate human-like conversations.

🌟 Overview

This project showcases fundamental programming paradigms, including continuous while loops for session management and if-elif-else control flow for pattern matching and response generation. It serves as an excellent starting point for understanding how chatbots parse user inputs and trigger appropriate responses based on specific keywords.

✨ Features

  • 🗣️ Greetings & Salutations: Understands basic greetings like "hello", "hi", and "hey".
  • 👤 Identity Awareness: Can answer questions about its own identity (e.g., "who are you?", "your name").
  • ☕ Small Talk: Engages in simple conversational topics such as inquiring about well-being or the weather.
  • 😄 Humor: Equipped with a programming joke to lighten the mood.
  • 🚪 Graceful Exit: Detects exit commands ("bye", "quit", "exit") and politely terminates the session.
  • 🔠 Case-Insensitive Parsing: Input parsing is normalized to seamlessly handle different capitalizations (e.g., "HELLO" vs "hello").

🚀 Getting Started

Prerequisites

  • Python 3.6 or higher is required.

Installation

  1. Clone the repository:
    git clone https://github.com/abhranilsingharoy-cloud/Chatterbox.git
  2. Navigate to the project directory:
    cd Chatterbox

Usage

You can start the chatbot directly via Python, or use one of the provided run scripts based on your operating system.

Using Python directly:

python chatbot.py

Using the Shell Script (Linux/macOS):

./run_chatbot.sh

Using the Batch File (Windows):

run_chatbot.bat

🧪 Testing

The repository includes a suite of test cases to verify the chatbot's conversational capabilities. We use the standard unittest framework.

To run the tests, execute the following command in the project directory:

python -m unittest test_chatbot.py

You can also view the manual test inputs and expected outputs in test_cases.txt.

👨‍💻 Author

Abhranil Singha Roy


This project was built during the early stages of my software engineering career to explore Python and logic-based systems.

About

A simple, rule-based Python chatbot that uses conditional logic (if-else) to simulate basic conversation and respond to specific user keywords.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages