Sentiment Analyzer for E-commerce
Sentiment Analyzer for E-commerce
AMINORPROJECTREPORT[INTE
RNSHIPREPORT]
Submittedby
( Assistant Professor)
BACHELOROFTECHNOLOGY
in
FACULTYOF ENGINEERINGANDTECHNOLOGY
S.R.M.Nagar,Kattankulathur,Chengalpattu District
May 2023
COLLEGE OF ENGINEERING & TECHNOLOGY
SRM INSTITUTE OF SCIENCE & TECHNOLOGY
S.R.M. NAGAR, KATTANKULATHUR – 603 203
BONAFIDE CERTIFICATE
Certified that this project report “Sentiment analysis in Ecommerce”is the bonafide
SemB.tech(CSE)who carried out the mini project work under my supervision for the course
18CSC303J- Artificial Intelligence in SRM Institute of Science and Technology during the academic
SIGNATURE SIGNATURE
Sentiment analysis, also known as opinion mining, is the process of identifying and
extracting subjective information from text data. It involves analyzing the polarity
(positive, negative, or neutral) of the expressed sentiments, emotions, attitudes, and
opinions within a given text. Sentiment analysis has become increasingly important in
the field of natural language processing due to the proliferation of social media and the
abundance of online reviews and feedback.
The primary goal of sentiment analysis is to automatically classify the sentiment of a
given text into one of the three categories mentioned above. This can be achieved
through various techniques such as rule-based methods, machine learning, and deep
learning. Rule-based methods rely on a set of predefined rules to identify sentiment,
whereas machine learning techniques use statistical models to learn from labeled data.
Deep learning approaches use neural networks to learn the underlying patterns in the data
and make predictions.
TABLEOFCONTENTS
Chapter No. Title PageNo.
ABSTRACT iii
TABLEOF CONTENTS iv
LIST OFFIGURES v
LISTOF TABLES vi
ABBREVIATIONS vii
1 INTRODUCTION 1
1.1 SoftwareRequirementsSpecification 2
2 LITERATURESURVEY 3
3 SYSTEMARCHITECTUREANDDESIGN 4
METHODOLOGY 9
4
5 CODINGANDTESTING 10
6 RESULTSANDDISCUSSIONS 12
7 CONCLUSIONANDFUTUREENHANCEMENT 15
REFERENCES 16
INTRODUCTION
Sentiment analysis is a powerful tool for understanding customer attitudes and opinions
towards products and services. In the realm of e-commerce, sentiment analysis can help
businesses gain insights into customer satisfaction levels, identify areas for
improvement, and make data-driven decisions to enhance the overall shopping
experience. By using natural language processing and machine learning techniques,
sentiment analysis can analyze text data from sources such as customer reviews, social
media posts, and customer support interactions to determine whether sentiment is
positive, negative, or neutral. With the help of sentiment analysis, businesses can better
understand customer needs and preferences, and take steps to improve their offerings to
meet those needs.
Software Requirements Specification
1. Programming languages: You may need to use programming languages such as Python,
2. Natural Language Processing (NLP) libraries: NLP libraries such as NLTK, spaCy, and
Stanford CoreNLP can help with tasks such as tokenization, part-of-speech tagging, and named
entity recognition.
3. Machine learning frameworks: Machine learning frameworks such as TensorFlow, Keras, and
PyTorch can be used for building and training machine learning models for sentiment analysis.
4. Web frameworks: If you plan on building a web application for your sentiment analyzer, you
may need to use web frameworks such as Flask or Django.
5. Database management systems: You may need to use a database management system such as
MySQL or MongoDB to store and retrieve data.
6. Cloud platforms: Cloud platforms such as Amazon Web Services (AWS), Microsoft Azure, or
Google Cloud Platform can provide scalable infrastructure for hosting and running your
sentiment analyzer.
7. APIs: APIs such as the Google Cloud Natural Language API or the IBM Watson Natural
Language Understanding API can provide pre-trained models and functionalities for sentiment
analysis.
LITERATURESURVEY
In 2019, Saad and Yang [1] have aimed for giving a complete tweet sentiment analysis on the basis
of ordinal regression with machine learning algorithms. The suggested model included pre-processing
tweets as first step and with the feature extraction model, an effective feature was generated. The
methods such as SVR, RF, Multinomial logistic regression (SoftMax), and DTs were employed for
classifying the sentiment analysis. Moreover, twitter dataset was used for experimenting the suggested
model. The test results have shown that the suggested model has attained the best accuracy, and also
DTs were performed well when compared over other methods.
In 2019, Feizollah et al. [4] have concentrated on tweets related to two halal products such as halal
cosmetics and halal tourism. By utilizing Twitter search function, Twitter information was extracted,
and a new model was employed for data filtering. Later, with the help of deep learning models, a test
was performed for computing and evaluating the tweets. Moreover, for enhancing the accuracy and
building prediction methods, RNN, CNN, and LSTM were employed. From the outcomes, it was
seemed that the combination of LSTM and CNN attained the best accuracy.
In 2018, Mukhtar et al. [5] have performed the sentiment analysis to the Urdu blogs attained from
several domain with Supervised Machine learning and Lexicon-based models. In Lexicon-based
models, a well-performing Urdu sentiment analyzer and an Urdu Sentiment Lexicons were employed,
whereas, in Supervised Machine learning algorithm, DT, KNN, and SVM were employed. The data
were combined from the two soruces for performing the best sentiment analysis. Based on the tests
conducted, the outcomes were shown that the Lexicon-based model was superior to the supervised
machine learning algorithm.
SYSTEMARCHITECTUREANDDESIGN
METHODOLOGY
Data Collection
The first step in this project is to collect data. We need to collect product reviews from various sources such as
e-commerce websites like Amazon, Flipkart, etc. We can use web scraping techniques to extract the data. Once
we have collected the data, we need to pre-process it by removing any unwanted characters, stop words, and
stemming the words to get the base form.
Data Analysis
After pre-processing the data, we need to perform exploratory data analysis to gain insights about the data. We
can use data visualization techniques like word clouds, bar charts, and histograms to get an idea of the most
frequently occurring words, the sentiment of the reviews, and the distribution of reviews.
Sentiment Analysis
The next step is to perform sentiment analysis on the reviews. There are various algorithms that can be used for
this purpose such as Naive Bayes, SVM, and neural networks. We can train a machine learning model using
these algorithms on the pre-processed data to predict the sentiment of the reviews. Once the model is trained,
we can test it on a test set to evaluate its accuracy.
Classification
The final step is to classify the reviews into positive, negative, or neutral categories based on their sentiment.
We can use a threshold value to determine whether a review is positive, negative, or neutral. For example, if
the predicted sentiment score is greater than 0.5, we can classify the review as positive. If it is less than 0.5, we
can classify it as negative. If it is equal to 0.5, we can classify it as neutral.
CODINGANDTESTING
RESULTSANDDISCUSSIONS
Conclusion: