Skip to content

devv04/SentimentChatbott

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

SentimentChatbott is a chatbot based on sentiment analysis, it talks to user checks his\her sentiments and then give overall sentiment analysis of user's chat.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages