Skip to content

Project that allows students to review CPSC courses at UBC and view comprehensive summary results and visualizations

Notifications You must be signed in to change notification settings

AdwaitKulkarni58/sentiment-analysis-436c

Repository files navigation

Sentiment Analysis Rate UBC Courses

This project is an end-to-end solution designed for UBC Computer Science students. It collects user reviews, analyzes their sentiments, and summarizes each course's feedback using visualizations and modern machine learning models. The application provides an intuitive interface for real-time sentiment visualization, detailed analytics, and summary generation.


Deployed URL: https://sentiment-analysis-436c.onrender.com


Table of Contents:

Team Members
Features
Architecture
Setup
Usage
Technologies
Future Enhancements
Contributing
License

Jump to Bottom ↓


Team-Members:

  • Adwait Kulkarni
  • Rebecca Lee
  • Dominic Lo
  • Sana Al-Jumaily
  • Zackarya Hamza

Features:

Sentiment Analysis:

AWS Comprehend, a cloud-based sentiment analysis service, classifies reviews into Positive, Negative, Neutral, or Mixed sentiments.

Summarization:

Generates concise, accurate summaries of all reviews for each course using a fine-tuned Hugging Face summarization model hosted on AWS SageMaker.

Data Visualization:

  • Overall sentiment score out of 5 for each course, with 5 being positive and 1 being negative.
  • Word cloud representation of common terms used in reviews.
  • Pie chart showing the count distributions of each sentiment label.
  • Bar chart showing the confidence level of sentiment labels.
  • Real-time updates of sentiment metrics.

Architecture:

436c_architecture_diagram

Frontend:

  • Developed using React, using Recharts for visualization and user interaction.

Backend:

  • A serverless architecture using AWS Lambda functions to handle requests, trigger actions that include sending visualization data from the API Gateway to the front end, and perform database operations.

Database:

  • Amazon RDS for structured storage of sentiment data, review data, and analysis results.

Sentiment:

  • AWS Comprehend to analyze sentiment according to 4 sentiment labels and get the confidence level for each label.

Machine Learning:

  • Review summarization models hosted on AWS SageMaker using text-generation models like Google Pegasus XSUM on platforms like Hugging-Face.

Setup:

Prerequisites:

  • Node.js (v16 or higher)
  • AWS account with access to S3, Lambda, RDS, Comprehend, and SageMaker
  • Python (v3.9 or higher)

Steps to follow (for external users only):

  1. Clone the repository
    git clone https://github.com/AdwaitKulkarni58/sentiment-analysis-436c  
    cd sentiment-analysis-436c  
    
  2. Install the dependencies
    npm install .
    
  3. Set up AWS services
    • Set up an S3 bucket and RDS database.
    • Deploy the summarization model to SageMaker.
    • Create necessary IAM roles for Lambda functions.
  4. Run the application
    npm run dev
    

Usage:

  1. Submit Reviews:
  • Navigate to the web application and submit reviews for a course.
  • (For course staff) To generate good summaries, input longer reviews so the model can be trained on more input data and create better results.
  1. View Analytics:
  • Access sentiment distribution charts and word clouds for comprehensive feedback on a course.
  1. Generate Summaries:
  • Summarized reviews appear on the course details page, providing concise insights into user feedback.

Technologies:

Front-end:

  • React.js, D3.js, React Bootstrap, Recharts

Back-end:

  • AWS Lambda, S3 Bucket Storage

Database:

  • AWS Relational Database Service (RDS)

Machine Learning:

  • AWS SageMaker, Hugging-Face

Cloud Services:

  • AWS Comprehend, AWS Internet Gateway, Virtual Private Cloud (VPC), AWS Key Management Service (KMS), AWS Secrets Manager, AWS Identity and Access Management (IAM)

Future-Enhancements:

  • Integration of additional complex machine learning models for better summary results of individual courses.
  • Provide a more holistic overview of the entire department by looking at all courses and creating a combined faculty result.
  • Ability to register for courses directly from the dashboard, eliminating the need to go to Workday, search for courses separately, and register individually.
  • Use AWS Aurora for auto-scaling of the relational database.
  • Create an authentication system and use UBC CWL for student authentication.

Contributing:

To contribute a new feature to the project or submit a bug:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature-name).
  3. Commit your changes (git commit -m "Add feature-name").
  4. Push to the branch (git push origin feature-name).
  5. Submit a Pull Request (PR).

License:

This project is licensed under the MIT License.

Go to Top ↑