Twitter Sentiment Analysis Using Classifiers: Prepared By: Guide

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

TWITTER SENTIMENT ANALYSIS

USING CLASSIFIERS

PREPARED BY: GUIDE:


M. Sesha Sai Varun (179X1A0594) Mr. P. Penchala Prasad
N. Gurudatha Sai Sreekar (179X1A05B9) Assistant Professor
Abhinav Sai Bedhi (179X1A0503) CSE Department
ABSTRACT
Sentiment analysis deals with identifying and classifying opinions or sentiments
expressed in source text. Social media is generating a vast amount of sentiment rich
data in the form of tweets, status updates, blog posts etc. Sentiment analysis of this
user generated data is very useful in knowing the opinion of the crowd.
we are going to collect and classify the tweets which are tweeted by people about
the pandemic CORONA VIRUS. Tweets are imported from twitter by applying the
concept of data extraction using “tweepy” package. These imported tweets are
stored in text format. Data pre-processing is applied on the text files using
“tokenization” and by removing “stop words”. Sentiment analysis is performed by
using “VADER” (Variance Aware Dictionary for Sentiment Reasoner) package which
will be in NLTK (Natural Language Tool Kit).
Finally, we visualize with a bar graph representing the number of tokens for each key
worded emotion. We evaluate the percentage scores of tweets (public opinions) by
plotting a pie chart based on positive, negative and neutral results.
MOTIVATION
 The present pandemic of corona virus has changed the lifestyle of
Twitter
people all around the world. Everyone’s life has changed Sentiment
Analysis
according to the situation because of corona virus. Some people
got more advantages over it than disadvantages and vice versa.

 So to know the public opinion based on their thoughts and


feelings over corona virus made us to do this project.
OBJECTIVE
The aim is to find the opinionative data and classify it according
to its polarity, i.e. positive, negative or neutral feedback, known
as sentiment classification and then analyzing it which is known
as sentiment analysis. This allows us to get to know about the
public's mood or opinion about a particular topic.

 Domain  : Classification:- Natural Language Processing (NLP)


 Problem Statement: Twitter Sentiment Analysis : Understanding
patterns and emotions via Tweets.
TOOLS, ALGORITHMS AND PACKAGES

⮚Programming Language used:  Python 


⮚Packages/ Libraries Used :

Matplotlib: For Interactive


SVM : For Model Classification
Visualization

Naïve Bayes : For Model


NLTK : For Data Preprocessing
Classification

Tkinter : For User Interface


Vader : For Sentiment Analysis
(UI)

Tweepy : For Accessing Twitter


TfidfVectorizer : Vectorization
API
FLOW CHART
(VADER) 

STEP 1: STEP 2: STEP 3:


TWITTER API DATA EXTRACTION DATA PROCESSING

STEP 4:
STEP 6: STEP 5:
SENTIMENT ANALYSIS &
PUBLIC OPINION VISUALIZATION
DETECTION
FLOW CHART
(SVM) 

STEP 1: STEP 2: STEP 3:


IMPORTING DATA VECTORIZATION CLASSIFICATION

STEP 5: STEP 4:
VISUALIZATION OUTPUT SCORES
Natural Language Processing:
 Natural language processing involves the
reading and understanding of spoken or
written language through the medium of a
computer.

 For example, we can use NLP to create systems like speech


recognition, document summarization, machine translation, spam
detection, key named entity recognition, question answering,
autocomplete, predictive typing.
COLLECTING DATA FROM TWITTER

 Twitter allow access to parts of Twitter


services via API to allow people to build
software that integrates with Twitter. 

 API allows to read and write Twitter data.


DATA EXTRACTION:

•1.we can extract data on "Corona Virus"


from Twitter using "tweepy"  package using
stream and filter function.

•2.we can store tweets in text file


format(.txt)
DATA PREPROCESSING :
 Data preprocessing is a data mining technique which is used to transform the
raw data in a useful and efficient format.
 NLTK (Natural Language Tool Kit) package in Python  contains  functions to make
machines understand human language and reply it with appropriate responses. 

Removing
Tokenization  Punctuations Lemmatization
& stop words
SAMPLE COLLECTED TWEET

It is pertinent to mention that more than 30 employees of FBR


have died due to Corona Virus. https://t.co/UeTSWW1WVWRT
@silver_shades7: Corona Virus to those students who will get
out of their house to give exam

 To this collected tweet we perform data pre-processing and remove


outliers, noise, stop words and punctuations from that tweet.
Sentiment Analysis and Detection:
 Sentiment Analysis is the
process of determining whether
a piece of writing is positive,
negative or neutral. 

 VADER (Variance  Aware


Dictionary Sentiment Reasoner)
is a lexicon and rule- based
sentiment analysis tool that is
specifically designed for social
media.
 
VISUALIZATION USING BAR GRAPH:

 Bar graph
representing
the feelings of
people on pandemic
CORONA VIRUS as
expressed on
Twitter after
performing
Sentiment Analysis.
VISUALIZATION USING PIE CHART:

 pie chart representing


the Positive, negative &
neutral percentages
based on tweets.
IMPROVEMENTS
 Tkinter Interface for vader
SUPPORT VECTOR MACHINE (SVM)
  A support vector machine (SVM) is a supervised machine
learning model that solves classification as well as regression
problems.

 Training time
 Prediction time
 Positive score
 Negative Score
REFERENCES

WEBSITES REFEERED:
 https://towardsdatascience.com/twitter-sentiment-analysis-classification-using-nltk-pyth
on-fa912578614c

 https://monkeylearn.com/blog/sentiment-analysis-of-twitter/#:~:text=Performing%20sen
timent%20analysis%20on%20Twitter,of%20your%20Twitter%20sentiment%20analysis
THANK YOU
THANK YOU

You might also like