EmotionDetection_AI is a simple AI-powered sentiment and emotion detection system built using Python and Natural Language Processing (NLP).
The project analyzes user text input, detects emotional tone, and predicts emotions such as:
- Very Happy
- Happy
- Neutral
- Sad
- Very Sad
using sentiment polarity analysis.
- Real-time emotion detection
- Sentiment analysis using NLP
- Confidence score calculation
- Continuous user interaction loop
- Lightweight and beginner-friendly AI project
- Python
- TextBlob
- Natural Language Processing (NLP)
TextBlob is a Python NLP library used for:
- sentiment analysis
- text processing
- polarity detection
- language analysis
The library analyzes the emotional tone of text and returns a polarity score between:
-1 → Very Negative
0 → Neutral
+1 → Very Positive
EmotionDetection_AI/
│
├── emotion_detectect.py
└── README.md
git clone https://github.com/ayaan-2008/EmotionDetection_AI.gitcd EmotionDetection_AIpip install textblobpython emotion_detectect.py=== Emotion Detection AI ===
Enter text (or type 'exit'): I am feeling amazing today!
Detected Emotion: Very Happy
Confidence Score: 80.0 %
The system follows these steps:
- Takes user text input
- Processes text using TextBlob
- Calculates sentiment polarity
- Maps polarity to an emotion category
- Displays emotion with confidence score
| Polarity Score | Emotion |
|---|---|
| > 0.5 | Very Happy |
| > 0 | Happy |
| = 0 | Neutral |
| > -0.5 | Sad |
| <= -0.5 | Very Sad |
- Sentiment Analysis
- Natural Language Processing
- Text Classification
- Emotion Detection
- Polarity Scoring
- GUI Interface
- Voice-based emotion detection
- Emoji prediction
- Multi-language support
- Deep Learning emotion analysis
- Facial emotion recognition
AYAAN Developed as a Python AI/NLP project for real-time emotion detection using sentiment analysis.