Professional Documents
Culture Documents
Sentiment Analysis of Twitter
Sentiment Analysis of Twitter
SENTIMENT
ANALYSIS FOR
TWITTER
Guided By: Presented By:
Prof. S.M.Bankar Nirmiti S. Pardhe
AGENDA
Introduction
Sentiment Analysis
Sentiment Analysis for Twitter
Approaches for Sentiment Analysis
Lexicon Based Approach
Machine learning Based Approach
Naive Bayes Classifier
Sentiment Analysis For Covid-19
Challenges
Benefits
Conclusion
INTRODUCTION
It’s
estimated that 90% of the world’s data is
unstructured, in other words it’s unorganized.
Pre-processing Tweets
Feature Extraction
Sentiment Classification
Experimental result
DATA COLLECTION
For performing SA we need Twitter Data consisting of tweets. For collecting
the data and tweets , Twitter public API is available for General public for free
time . It is a part of data collection.
The collected data is a raw data. So, in order to apply the classifiers, it’s really
essential to pre-process the raw data that are collected
PRE-PROCESSING
Good movie 1 1 0 0 …
Not a good movie 1 1 0 1 …
Did not like 0 0 1 0 …
Sentiment
SENTIMENT classification
CLASSIFICATION
TECHNIQUE
Machine
Lexicon Based
learning based
Approach
approach
LEXICON BASED Opinion or review
text
APPROACH Split into
Sentiment score
MACHINE LEARNING APPROACH
The main objective of the machine learning techniques is in developing the
Algorithm which optimizes the performance of a system using the training data.
This provides a solution of the sentiment classification in two Sequential steps:
A)Training
1 ML Model
Training Data Algorithm
B)Prediction
Trained
2 New Data Predictions
Model
Naïve Bayes Classifier, Support Vector Machine (SVM), and Random Forest are the
well-known methods for sentiment classification through Machine Learning.
NAIVE BAYES ALGORITHM
An algorithm that implements classification is known as classifier.
Naïve Bayes classifier uses the concept of Bayes Theorem in which it finds
the maximum aspect of the probability of any word matching to a particular or
predefined class.
Given a Hypothesis A and evidence B, Bayes’ Theorem states that the
relationship between the probability of Hypothesis before getting the evidence
P(A) and the probability of the hypothesis after getting the evidence P (A | B)
is :
NAIVE BAYES CLASSIFIER
So let us try to understand how Naïve Bayes classifier works with an
example:-
Positive Negative
Since, P(Negative)>P(Positive),
the above mentioned sentence is Negative.
IMPLEMENTATION
Source code for Twitter sentiment analysis on Covid-19:-
IMPLEMENTATION
Source code for Twitter sentiment analysis on Covid-19:-
IMPLEMENTATION
Result for Twitter Sentiment analysis on Covid-19 :-
CHALLEN
GES
This can help to know of what’s being said about your product or
service on social media and can help you detect the overall product
review.
REFERENCES
1. https://www.analyticsvidhya.com/blog/2020/02/quick-introduction-bag-of-words-
bow-tf-idf/
2. https://www.researchgate.net/publication/283201292_Approaches_Tools_and_Appli
cations_for_Sentiment_Analysis_Implementation
3. https://monkeylearn.com/blog/sentiment-classification/
4. https://towardsdatascience.com/twitter-sentiment-analysis-using-fasttext-
9ccd04465597
5. https://www.researchgate.net/publication/336225950_Comparison_of_Naive_Bayes
_Support_Vector_Machine_Decision_Trees_and_Random_Forest_on_Sentiment_A
nalysis
Thank You!,
Any
Questions…?