0% found this document useful (0 votes)
12 views

Minor Project Reportaditya

The document presents a minor project report on the 'Social Media Comment Analyzer', developed by Ayushmaan Singh Shekhawat and Aadityavardhan Singh Rathore at Manipal University Jaipur. The project aims to analyze sentiments of comments from various social media platforms using Natural Language Processing, categorizing them into Positive, Negative, and Neutral sentiments, and providing visualizations like word clouds. Built with Python, Flask, and Streamlit, the application is designed for scalability and future enhancements, making it valuable for content creators and marketers.

Uploaded by

PREMIUM YT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Minor Project Reportaditya

The document presents a minor project report on the 'Social Media Comment Analyzer', developed by Ayushmaan Singh Shekhawat and Aadityavardhan Singh Rathore at Manipal University Jaipur. The project aims to analyze sentiments of comments from various social media platforms using Natural Language Processing, categorizing them into Positive, Negative, and Neutral sentiments, and providing visualizations like word clouds. Built with Python, Flask, and Streamlit, the application is designed for scalability and future enhancements, making it valuable for content creators and marketers.

Uploaded by

PREMIUM YT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

A Minor Project Report on

Social Media Comment Analyzer


Submitted to Manipal University Jaipur

Towards the partial fulfillment for the Award of the Degree of

BACHELORS OF TECHNOLOGY

In Computers Science and Engineering

(AIML) 2022-2026

By :-

Ayushmaan Singh Shekhawat (229310008)

Aadityavardhan Singh Rathore (229310037)

Under the guidance of

Mr. Surendra Solanki

Signature of Supervisor

Department of Artificial Intelligence and Machine Learning

School of Computer Science and Engineering

Manipal University Jaipur

Jaipur, Rajasthan
Acknowledgement

This project would not have been completed without the help, support,
comments, advice, cooperation and coordination of various people.
However, it is impossible to thank everyone individually; I am hereby
making a humble effort to thank some of them.

I acknowledge and express my deepest sense of gratitude to my


internal supervisor Mr. Surendra Solanki for his constant support,
guidance, and continuous engagement. I highly appreciate his technical
comments, suggestions, and criticism during the progress of this
project “Social Media Comment Analyser”.

Finally, I extend my heartfelt appreciation to my classmates for their


help and encouragement.

Ayushmaan Singh Shekhawat (229310008)

Aadityavardhan Singh Rathore (229310037)


Department of Artificial Intelligence and Machine Learning

School of Computer Science and Engineering

Date: 17 February, 2025

Certificate

This is to certify that the project entitled “Youtube Video Summarizer" is a bonafide
work carried

out as Minor Project Midterm Assessment (Course Code: CS3270) in partial fulfillment

for the award of the degree of Bachelor of Technology in Computer Science and

Engineering, by Aadityavardhan Singh Rathore

bearing registration number 229310037, during the academic semester VI of year 2024-
2025.

Place: Manipal University Jaipur, Jaipur

Name of the project guide: Mr. Surendra Solanki

Signature of the project guide:


Abstract

In today's digital age, social media has become a powerful platform for
communication, marketing, and public opinion. With millions of users
posting comments daily on platforms like YouTube, Instagram, X
(formerly Twitter), and Facebook, it becomes important to analyze and
understand the sentiment behind these comments. Our project, titled
"Social Media Comment Analyzer", aims to address this need by
providing a simple, user-friendly application that performs sentiment
analysis on comments from these platforms.

The application allows users to input a URL from any supported social
media post, and then uses Natural Language Processing (NLP)
techniques to categorize the comments into Positive, Negative, and
Neutral sentiments. It also generates word clouds to visualize the most
frequently used words, helping in better interpretation of public
opinion.

The project is built using Python as the core programming language.


Flask is used for the backend, Streamlit for the frontend interface, and
MySQL as the database to store user data and analysis records. For data
processing, libraries like NLTK, TextBlob, Selenium, and
BeautifulSoup are used. The system is designed to be scalable and can
be extended to perform deeper emotion analysis in the future.

This project not only demonstrates the real-world application of


machine learning and web technologies, but also contributes towards
better digital engagement analysis, making it useful for content creators,
marketers, and researchers.
Contents
 Cover Page
 Acknowledgement
 Certificate
 Table of Contents

1. Introduction
1.1 Objective of the Project
1.2 Brief Description
1.3 Technology Used
1.3.1 Hardware Requirements
1.3.2 Software Requirements

2. Design Description
2.1 Flow Chart

3. Project Description
3.1 Database
3.2 Table Design
3.3 Table Description

4. Input/Output Form Design


4.1 Input Design
4.2 Output Design

5. Testing & Tools Used


5.1 Testing Performed
5.2 Tools and Libraries Used

6. Implementation
6.1 Technologies Used

7. Conclusion and Future Scope


8. Outcome
9. Bibliography
1. INTRODUCTION

1.1 Objective of the Project

The objective of this project is to develop a Social Media Comment Analyzer, a tool that
can scrape comments from social media platforms like YouTube, Instagram, Facebook,
and Twitter. Once the comments are scraped, the tool performs sentiment analysis on
the comments to categorize them as positive, negative, or neutral. The goal is to help
users understand how people feel about a specific post or video by analyzing the
comments, which can be very helpful for social media managers and content creators

1.2 Brief Description

The Social Media Comment Analyzer is a sentiment analysis tool comments from social
media platforms. By leveraging Natural Language Processing (NLP) and machine
learning, the application identifies the sentiment expressed in user comments and
classifies them as positive, negative, or neutral. This is particularly useful for businesses,
influencers, and researchers who wish to understand public perception and user
engagement.

The application’s main feature is its sentiment classification system, which is powered by
a trained machine learning model. It processes input text in real-time and presents
results on an interactive dashboard. It includes a secure login and signup feature that
stores user sessions and comment history in a database for future reference.
Additionally, the system can support bulk comment input for batch processing and
sentiment breakdowns.

The frontend is built using Streamlit, offering a responsive, user-friendly interface for input
and visualization. The backend is handled via Flask, where APIs process data and
interface with the sentiment model. The system also includes multilingual support and
can be extended in the future to include emotion detection, sarcasm handling, and
sentiment trend visualization.
1.3 Technology Used

1.3.1 Hardware Requirements

 Processor: 1.6 GHz or higher (Dual-core or Quad-core processor)


 RAM: 4 GB (Recommended: 8 GB for better performance)
 Storage: 100 MB of free space for storing the application and dependencies.
 Other: An internet connection to scrape data from social media platforms.

1.3.2 Software Requirements

 Operating System: Windows, Linux, or MacOS.


 Web Browser: Google Chrome (latest version) for scraping the social media
platforms.
 Python: Version 3.7 or higher to run the application.
 Libraries:
o Flask: For creating the web application.
o Selenium: For scraping comments from social media websites.
o TextBlob: For performing sentiment analysis on the scraped comments.
o Other Libraries: Logging, WebDriver for Chrome, and other utility
libraries.

Development Tools:

 VS Code / PyCharm – IDEs for Python development

Browser Compatibility:

 Google Chrome, Firefox, Microsoft Edge (latest versions)


2. Design Description

2.1 Flow Chart


3. Project Description

3.1 Database

The Social Media Comment Analyzer is an AI-powered web application designed to


extract, process, and evaluate comments from social media platforms such as YouTube,
Instagram, X (formerly Twitter), and Facebook. The main objective of the system is to
analyze user comments using Natural Language Processing (NLP) techniques and classify
them into three sentiment categories: Positive, Negative, and Neutral. This
classification helps users understand public opinion and engagement on various posts,
videos, or pages.

The system is built with a Streamlit frontend for user interaction and a Flask backend
for handling business logic, NLP processing, and API integrations. It integrates web
scraping via Selenium and leverages libraries such as NLTK, TextBlob, and WordCloud
for sentiment analysis and data visualization.

The application offers multilingual support and additional features like word cloud
generation, language detection, and confidence scoring, making it useful for social
media managers, businesses, researchers, and individuals looking to analyze
engagement and sentiment.

3.2 Table Design

The backend is supported by a MySQL relational database, ensuring secure, scalable,


and efficient storage and retrieval of data. The design follows normalization principles to
reduce redundancy and improve query performance. It supports multiple users, stores
comment data, and links it to their analysis results.

Key Database Features:

 Secure and Encrypted Authentication using hashed passwords.

 Scalable Schema to allow future features like emotion tagging, spam detection,
or sentiment trends.

 Data Relationships ensuring traceability between users, comments, and


sentiment outcomes.

 Support for Multi-platform Input, storing metadata such as platform type and
post URL.
 Logging System to track user activity and previous analysis history.

3.3 Table Description

The database includes the following core tables:

1. User Table

Stores user login and authentication data.

 UserID (PK) – Unique identifier for each user.


 Name – Full name of the user.
 Email – User's email address.
 Password – Encrypted password for login.

2. Comment Table

Stores the text of comments entered by users and their metadata.

 CommentID (PK) – Unique identifier for each comment.


 UserID (FK) – Foreign key linking to the user who analyzed the comment.
 Content – The actual comment text.
 Timestamp – Date and time the comment was entered.

3. Sentiment Table

Stores sentiment analysis results for each comment.

 SentimentID (PK) – Unique ID for sentiment analysis result.


 CommentID (FK) – Foreign key linking to the associated comment.
 Sentiment – Result of sentiment analysis (Positive, Negative, Neutral).
 ConfidenceScore – The confidence level of the prediction (e.g., 0.89).
4. INPUT/OUTPUT FORM DESIGN

The Social Media Comment Analyzer provides a seamless, user-friendly interface for
analyzing sentiments of user-submitted comments. It allows users to input social media
comments and view sentiment-based classification outputs in real-time. The system’s
input/output forms are designed to ensure intuitive interactions and efficient processing
of user data, while offering flexible features like login/signup, comment history, and
export options.

4.1 Input Design

The input design focuses on simplicity, accessibility, and accuracy to ensure effective data
collection from users.

User Inputs:

1. User Authentication Details – Users must either sign up or log in to access the
analyzer.
o Email ID
o Password (stored securely using encryption)
2. Comment Input – Users can enter one or more comments from social media
platforms (e.g., YouTube, Twitter, Instagram) in a text field for sentiment
analysis.
3. Filter Options (Optional) – Users may apply filters such as:
o Language preference (for multilingual analysis in future versions)
o Analysis type (Single comment / Bulk comments)
4. Content Management Actions – Users can:
o View previously analyzed comments.
o Delete older entries.
o Download the analysis report.

System Inputs (Automated):

 Sentiment Analysis Engine – Utilizes NLP models to automatically analyze


submitted comments and classify them as Positive, Negative, or Neutral.
 Preprocessing Functions – The system performs tasks like tokenization,
stopword removal, and text normalization automatically before analysis.
 Database Retrieval – User history and sentiment results are fetched from the
database for logged-in users.

4.2 Output Design

The system generates real-time sentiment outputs in a clean, interactive dashboard


powered by Streamlit. The outputs offer users actionable insights into the emotional
tone of their submitted comments.

User Outputs:

1. Sentiment Label – Each comment is tagged with one of the following:


o Positive
o Negative
o Neutral
2. Confidence Score – A probability score (e.g., 0.93) showing how confident the
model is about the classification.
3. Visual Feedback – Results are color-coded or displayed via pie/bar charts for
intuitive understanding.
4. Downloadable Report – Users can export results in PDF or TXT format.
5. Comment History – Authenticated users can view past comment analyses stored
in the database.

Output Formats:

 On-Screen Display – Results are shown dynamically on the web app interface.
 Downloadable Files – Users can save reports as PDF, DOCX, or CSV files.
 Database Storage – Sentiment analysis results are stored and linked to the
corresponding user for future access.
5. Testing & Tools Used

Testing plays a crucial role in ensuring that the Social Media Comment Analyzer functions
smoothly, delivers accurate results, and provides a user-friendly experience. This
section outlines the testing strategies and tools used during development.

5.1 Testing Performed

1. Functional Testing

 Checked whether users could input valid URLs, scrape comments, and
receive correct sentiment analysis.
 Verified login/signup flows, sentiment classification (Positive, Negative, Neutral),
and result display.

2. User Interface Testing

 Ensured that all UI elements such as input forms, buttons, and visual outputs
were intuitive and responsive.
 Validated error messages for invalid inputs or connectivity issues.

3. Performance Testing

 Analyzed system behavior when handling large volumes of comments.


 Tested how the backend and database handled multiple simultaneous user
sessions.

4. Security Testing

 Ensured password encryption and secure session handling.


 Checked for input sanitization to prevent common attacks like SQL injection.

5.2 Tools and Libraries Used

◆ Flask

 Lightweight Python web framework used to manage routes, forms, and


backend logic.
 Handles user authentication and serves sentiment analysis results.

◆ Streamlit
 Used for building an interactive and clean frontend interface.
 Displays user inputs, graphs, sentiment results, and login dashboard.

◆ Selenium

 Automates the browser to open social media pages and extract comments.
 Supports dynamic content scraping, especially from platforms like YouTube.

◆ TextBlob

 Provides simple and effective sentiment analysis.


 Used to classify scraped comments as positive, negative, or neutral.

◆ MySQL

 Manages persistent storage of users, comments, and sentiment analysis results.


 Supports efficient retrieval and relational mapping.

These tools together ensure the system is interactive, efficient, and capable of analyzing
social media sentiment accurately.
6. Implementation

The implementation phase of this project brings together several technologies and tools
to create a fully functional web-based application that can analyze social media
comments. The system follows a structured workflow that integrates web scraping,
natural language processing (NLP), sentiment analysis, and user interaction.

6.1 Technologies Used

 Flask (Python Framework):


Used to build the backend of the application. It manages routes, user
authentication, and interactions between the frontend and backend systems.
Flask provides a lightweight and flexible structure for developing web
applications efficiently.
 Streamlit (Frontend Framework):
Used for building the user interface. It allows users to log in, paste URLs, and
view the sentiment results in a clean, interactive format. It supports real-time
updates and integrates seamlessly with the backend.
 Selenium (Web Scraping Tool):
A powerful browser automation tool used to fetch comments from platforms like
YouTube. It mimics human browsing, loads the comment section dynamically,
and collects the data.
 TextBlob (NLP Library):
It performs sentiment analysis by classifying text into Positive, Negative, or
Neutral categories. It is based on rule-based models and is suitable for initial
analysis and quick prototyping.
 MySQL (Database):
Used to store user data, comment content, and sentiment results. It helps
maintain user history and session data in a structured and secure way.

6.2 Step-by-Step Implementation Workflow

1. User Login/Signup:
o Users begin by creating an account or logging in using their email and
password.
o Credentials are encrypted and stored securely in the User table in the
MySQL database.
2. Input Social Media URL:
o Once logged in, the user pastes a URL (such as a YouTube video link) into
the input field.
3. Comment Scraping Using Selenium:
o Selenium automatically launches a browser session and scrolls through
the post to collect all available comments.
o Extracted comments are sent to the backend for processing.
4. Preprocessing and Language Handling:
o Comments are cleaned by removing unnecessary symbols, URLs, emojis,
etc.
o If the comments are in a language other than English, they are translated
using available translation APIs or models.
5. Sentiment Analysis with TextBlob:
o Each cleaned comment is passed to the TextBlob sentiment analyzer.
o The sentiment is abelled as Positive, Negative, or Neutral.
o Confidence scores may be included to reflect the certainty of the
classification.
6. Result Display and Visualization:
o Sentiment analysis results are shown to the user as text output and
through visual elements such as:
 Pie chart for sentiment distribution
 Word cloud to show frequent words
 Tabular summary of comments and their sentiment labels
7. Storing Results:
o The raw comments and their respective sentiment labels are stored in
the database.
o This allows users to access past analyses and track changes over time.
7. Conclusion and Future Work

7.1 Conclusion

The Social Media Comment Analyzer project successfully achieves its core goal: to provide
a platform for users to understand the general sentiment of public comments on
social media posts. The project integrates tools like Flask, Selenium, TextBlob, and
Streamlit to deliver a user-friendly and effective system for sentiment analysis.

This tool is especially useful for:

 Content creators who want feedback on their videos or posts.


 Businesses and marketers aiming to understand customer reactions.
 Researchers studying public opinion on various social topics.

Future Enhancements

Even though the current system performs well, there are many areas where it can be
enhanced:

1. Advanced Sentiment Models:


o Replace or supplement TextBlob with machine learning models such as
VADER, BERT, or custom-trained models using libraries like Scikit-learn or
TensorFlow.
o These models can offer better accuracy and support for complex
language patterns.
2. Multi-Platform Support:
o Currently focused on YouTube, the system can be extended to
support Instagram, Facebook, Twitter (X), Reddit, LinkedIn, etc.
3. User Preferences & Filters:
o Allow users to filter comments based on keywords, user tags, likes,
replies, or time period.
o Enable exporting results to CSV or PDF for offline analysis.
4. Emotion Detection:
o Go beyond simple sentiment (positive/negative/neutral) to detect
emotions such as joy, anger, sadness, fear, etc.
5. Feedback Loop:
o Allow users to give feedback on prediction accuracy, which can be used
to fine-tune models in the future.
6. Mobile App Version:
o A lightweight mobile version of the analyzer can help users perform
sentiment checks on the go.
8. Outcome
The final outcome of the project is a working and accessible web-based platform where
users can easily analyze public sentiment on social media. It offers a simple login
system, real-time sentiment prediction, and easy-to-understand results.

Benefits of the Project

 Time-saving: Users do not have to manually read hundreds of comments to get a


sense of public opinion.
 Data-backed Decision Making: Creators and marketers can improve their
content and strategy by understanding viewer sentiments.
 Educational: Students and researchers can use it as a practical example of web
scraping, NLP, and data visualization.

The tool serves as a practical application of modern technologies like Python, NLP, and
web development, and stands as a strong foundation for future AI-powered sentiment
platforms.

9. Bibliography
Journal References

[1] Cambria, E., Schuller, B., Xia, Y., & Havasi, C. (2013). “New avenues in opinion mining
and sentiment analysis.” IEEE Intelligent Systems, 28(2), 15–21.
[2] Liu, B. (2012). “Sentiment analysis and opinion mining.” Synthesis Lectures on Human
Language Technologies, 5(1), 1–167.
[3] Pang, B., & Lee, L. (2008). “Opinion mining and sentiment analysis.” Foundations and
Trends® in Information Retrieval, 2(1–2), 1–135.

Web Pages

[10] Flask Documentation. (2023). “Flask Web Framework.” Flask Pallets Project,
https://flask.palletsprojects.com/ (Accessed: Jan. 12, 2024).
[11] Selenium WebDriver Documentation. (2023). “Selenium Automation.” Selenium
HQ, https://www.selenium.dev/documentation/ (Accessed: Jan. 12, 2024).
[12] TextBlob Documentation. (2023). “Simple NLP with TextBlob.” TextBlob Docs,
https://textblob.readthedocs.io (Accessed: Jan. 15, 2024).
[13] YouTube API Documentation. (2023). “YouTube Data API v3.” Google Developers,
https://developers.google.com/youtube/registering_an_application (Accessed: Jan. 15,
2024).
[14] Streamlit Documentation. (2023). “Building Interactive Web Apps with Python.”
Streamlit, https://docs.streamlit.io (Accessed: Jan. 20, 2024).

You might also like