A modern web application that performs sentiment analysis on text input using TextBlob, featuring a beautiful UI built with Next.js and Flask.
-
Real-time Sentiment Analysis
- Polarity and subjectivity scoring
- Sentiment categorization (Positive, Negative, Neutral)
- Emoji representation of sentiment
- Language detection
-
Advanced Analytics Dashboard
- Sentiment distribution visualization
- Word frequency analysis
- Sentiment trend over time
- Key metrics display
-
Export Capabilities
- Export analysis results to JSON
- Export analysis results to CSV
- Automatic file naming with timestamps
-
Modern UI/UX
- Responsive design
- Dark/Light mode support
- Interactive charts and graphs
- Real-time updates
The main interface showing the text input area and analysis options
Detailed sentiment analysis results with polarity and subjectivity scores
Analytics dashboard showing sentiment distribution and key metrics
Word frequency visualization and detailed text analysis
Export functionality with JSON and CSV format options
-
Frontend:
- Next.js
- TypeScript
- Tailwind CSS
- Tremor (for charts)
- Framer Motion (for animations)
-
Backend:
- Flask
- TextBlob
- Flask-CORS
- Gunicorn
- Node.js 18+ and npm
- Python 3.8+
- Git
-
Clone the repository
git clone https://github.com/myselfAbdullah007/sentimental-analysis.git cd sentimental-analysis -
Set up the Backend
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt python app.py
-
Set up the Frontend
cd frontend npm install npm run dev -
Access the Application
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
-
POST /api/analyze- Analyzes text sentiment
- Request body:
{ "text": "Your text here" }
-
POST /api/export- Exports analysis results
- Request body:
{ "analysis": {...}, "format": "json" | "csv" }
The application is deployed using:
- Frontend: Vercel
- Backend: Render
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Abdullah - Initial work - myselfAbdullah007
- TextBlob for sentiment analysis
- Tremor for beautiful charts
- Next.js team for the amazing framework
- Flask team for the Python backend framework