Skip to content

Latest commit

 

History

History
142 lines (104 loc) · 3.26 KB

File metadata and controls

142 lines (104 loc) · 3.26 KB

Sentiment Analysis Web Application

A modern web application that performs sentiment analysis on text input using TextBlob, featuring a beautiful UI built with Next.js and Flask.

🌟 Features

  • 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

📸 Screenshots

1. Main Interface

Main Interface The main interface showing the text input area and analysis options

2. Analysis Results

Analysis Results Detailed sentiment analysis results with polarity and subjectivity scores

3. Dashboard Overview

Dashboard Overview Analytics dashboard showing sentiment distribution and key metrics

4. Dark Mode

Word Frequency Word frequency visualization and detailed text analysis

5. Export Options

Export Options Export functionality with JSON and CSV format options

🛠️ Tech Stack

  • Frontend:

    • Next.js
    • TypeScript
    • Tailwind CSS
    • Tremor (for charts)
    • Framer Motion (for animations)
  • Backend:

    • Flask
    • TextBlob
    • Flask-CORS
    • Gunicorn

🚀 Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Python 3.8+
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/myselfAbdullah007/sentimental-analysis.git
    cd sentimental-analysis
  2. 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
  3. Set up the Frontend

    cd frontend
    npm install
    npm run dev
  4. Access the Application

📝 API Endpoints

  • POST /api/analyze

    • Analyzes text sentiment
    • Request body: { "text": "Your text here" }
  • POST /api/export

    • Exports analysis results
    • Request body: { "analysis": {...}, "format": "json" | "csv" }

🚀 Deployment

The application is deployed using:

  • Frontend: Vercel
  • Backend: Render

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👥 Authors

🙏 Acknowledgments

  • TextBlob for sentiment analysis
  • Tremor for beautiful charts
  • Next.js team for the amazing framework
  • Flask team for the Python backend framework