Report Final 5th Sem
Report Final 5th Sem
Report Final 5th Sem
USING PYTHON
A MINI PROJECT REPORT
Submitted by
MANTHU KAVYA(11152120232)
MARAM LASYA(111521202033)
NOVEMBER/DECEMBER 2023
1
1
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
2
CERTIFICATE OF EVALUATION
Semester 05
The report of the project work submitted by the above students in partial fulfillment for
the award of Bachelor of Technology Degree in Department of Computer Science and Business
Systems of R.M.D Engineering College was evaluated and confirmed to be the report of the
INTERNAL EXAMINER
3
ACKNOWLEDGEMENT
The success and outcome of this project required a lot of guidance, Support and kind co-
operation from many, for successful completion. We wish to express our sincere thanks to all
those who were involved in the completion of this project.
It is our immense pleasure to express our deep sense of gratitude to our respected chairman Thiru
R. S. Munirathinam, our vice chairman Thiru R. M. Kishore, and our director Thiru R. Jothi Naidu
for the facilities and support given by them in the college.
We are extremely thankful to our principal, Dr. N. Anbuchezhian, M.S, M.B.A, M.E, Ph.D., for
giving us an opportunity to serve the purpose of education.
We are indebted to Dr. G. Amudha, M.E, Ph.D., Professor, Head of the Department in
Computer Science and Business Systems for providing the necessary guidance and constant
encouragement for successful completion of this project on time.
We extend our sincere thanks and gratitude to our project guide MS.CH.SRILAKSHMI
B.E,M.E.,( Ph.D), Assistant Professor in the Department of Computer Science and Business
Systems, who guided us all along till the completion of our project work.
Last but not the least, I wish to thank all the teaching and non-teaching staff of CSBS department
for their help in the completion of the project.
4
CHAPTER TITLE PAGE NO
1. Abstract
2. Introduction
3. Process of sentiment
analysis and emotion detection
5. Pre-processing of text
6. Feature extraction
8. Confusion Matrix
10. Result
11. Conclusion
5
1.Abstract-
Social media is a popular way for people to share their feelings with
the world, using text, images, audio, and videos. However, handling all this text
on social networks can be tough. The internet constantly generates loads of
unstructured data on social media every second. To understand how people
think, we use something called sentiment analysis. It helps us figure out if
someone has a positive, negative, or neutral opinion about a product, service,
person, or place.
Sometimes, sentiment analysis isn't enough, and we need to know exactly how
someone is feeling. That's where emotion detection comes in. It helps us
understand a person's emotional or mental state more precisely. In this review
paper, we explore different levels of sentiment analysis, various models for
understanding emotions, and the processes used to analyze sentiments and
detect emotions from text. We also look at the challenges we face in studying
how people feel and think, delving into the complexities of this evolving field.
2.INTRODUCTION
In the world of language understanding and communication, there are two
essential components: understanding what people say and creating our own
messages. The first aspect, which is understanding, can be quite challenging
because human language is often ambiguous and can have various meanings
depending on the context and tone.
With the widespread use of the internet, social media has become a significant
platform for people to share their thoughts and feelings using text, pictures,
audio, and videos. Managing and making sense of this vast amount of textual
content on social media can be a daunting task, especially given the constant
influx of new content.
6
Although the terms "sentiment analysis" and "emotion detection" are sometimes
used interchangeably, they have distinct purposes. Sentiment analysis provides
an overall sentiment assessment, whereas emotion detection delves deeper into
the identification of specific emotions.
7
respondents completed after experiencing one of seven emotions: anger,
disgust, fear, happiness, sadness, surprise, or shame.
Many datasets also include data from social media sites such as Twitter,
YouTube, and Facebook. This data is often unstructured and needs to be
preprocessed before it can be used by machine learning models.
5.Pre-processing of text-
Inessential words, such as articles and certain prepositions that don't contribute
to emotion recognition or sentiment analysis, should be omitted. For example,
stop words like "is," "at," "an," and "the" are removed to streamline
computations . POS tagging is employed to identify the different parts of speech
in a sentence. This aids in extracting relevant aspects from a sentence, as
sentiments and emotions are often conveyed through adjectives .
*TF-IDF Vectorization*
3. *Decision Trees*: Decision trees are tree-like structures that recursively split
data into smaller subsets based on the most discriminative features. They are
interpretable and can be used for sentiment analysis tasks.
8.Confusion Matrix
A confusion matrix is a fundamental tool in the evaluation of
classification models, including those used for emotion detection with text in
Python. It provides a way to assess the performance of your model by
comparing the predicted labels to the actual labels. In the context of emotion
detection with text, this matrix can help you understand how well your model is
classifying emotions (e.g., happy, sad, angry, etc.) based on the text data.
Here's what each of these terms means in the context of emotion detection:
True Positive (TP): The model correctly predicted the positive class (e.g.,
correctly classified a text as "happy").
False Positive (FP): The model incorrectly predicted the positive class when it
should have been negative (e.g., incorrectly classifying a text as "happy" when
it's not).
False Negative (FN): The model incorrectly predicted the negative class when it
should have been positive (e.g., failing to classify a text as "happy" when it is).
True Negative (TN): The model correctly predicted the negative class (e.g.,
correctly classifying a text as "not happy").
Once you have your confusion matrix, you can calculate various evaluation
metrics to assess the performance of your emotion detection model, including:
10.Result
Emotion detection with text in Python is a valuable and versatile
application of natural language processing and machine learning. It allows for
the automated categorization of emotions in textual content, enabling
applications in sentiment analysis, customer feedback analysis, and emotionally
intelligent chatbots. Accurate emotion detection enhances user experiences,
provides valuable business insights, and aids psychological research.
Leveraging Python's libraries and tools, developers and data scientists can
create powerful systems that better understand and respond to human emotions
in written communication.
11.Conclusion
In conclusion, implementing emotion detection with text using
Python offers a powerful means to understand and categorize human emotions
in written content. By leveraging natural language processing techniques and
machine learning models, we can build systems that automatically recognize
and classify emotions, enabling applications such as sentiment analysis,
customer feedback analysis, and chatbots with emotional intelligence. Accurate
emotion detection enhances user experiences, business insights, and
psychological research, making it a valuable and versatile tool in the realm of
text analysis and human-computer interaction.