Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 2.02 KB

File metadata and controls

65 lines (41 loc) · 2.02 KB

SentimentChatbott

This is a command-line chatbot project with built-in sentiment analysis. It lets you chat naturally, analyzes each message to see if it’s positive, negative, or neutral, and summarizes the whole mood at the end.

How to run

  1. Clone the repository: git clone https://github.com/devv04/SentimentChatbott.git cd SentimentChatbott

  2. Set up a Python environment (recommended): python -m venv venv venv\Scripts\activate # (Windows)

Or for macOS/Linux: source venv/bin/activate

  1. Install dependencies: pip install vaderSentiment

  2. Start the chatbot: python chatbot.py

Technologies used:

Python 3 — general scripting and user interface vaderSentiment — determines sentiment for each message Standard library modules: random, time (for realism and response selection)

How sentiment logic works:

Every user message gets sent to VADER, which scores and labels sentiment (Positive, Negative, Neutral). The label appears instantly after you type. When you end the chat (“bye”), the chatbot reviews all your messages and counts the number of positives, negatives, and neutrals. The majority decides the overall mood.

Example: You: I’m really happy today! (Sentiment: Positive) Bot: That's wonderful!

You: But my laptop crashed again. (Sentiment: Negative) Bot: Oh no, I'm sorry. Can I help?

-- Ending -- Overall mood: Neutral (Positives: 1, Negatives: 1, Neutrals: 0)

Tier 2 status Fully implemented: The chatbot shows sentiment for each user message during the conversation in real time.

Tests Manual testing was done with both positive and negative conversations to verify sentiment classification and overall summary.

Highlights and enhancements Bot replies vary each time, picking from several humanlike responses for each mood.

There’s a simulated “Bot is typing...” delay to make it feel less instant.

Occasionally the bot asks friendly follow-ups.

Instructions for how to start/stop appear clearly at the beginning.

The code is organized and commented for easy understanding and future improvements.