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

TWITTER SENTIMENT

ANALYSIS:
(CORONA VIRUS)
PROJECT DOMAIN AND PROBLEM STATEMENT:

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

• Problem Statement: Twitter Sentiment Analysis : Understanding patterns


and emotions via Tweet related to Corona virus. 
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.
TOOLS ,ALGORITHMS AND PACKAGES

⮚Programming Languages used:  Python 


⮚Packages/ Libraries Used :

Matplotlib: For interactive visualization

NLTK : For data preprocessing

Vader : For Sentiment Analysis

Tweepy : For accessing Twitter API


FLOW CHART: 

STEP2: Defining required functions


STEP1 : STEP 3: 
for preprocessing , Sentiment
Collection of tweets using  Importing the tweets
analysis , Language Detection  and
Tweepy  library in text format  and storing in text file
Visualization

STEP 6 : Stating either it is STEP 5: Visualization of STEP 4 : Data Preprocessing and


Positive or Negative or sentiments by bar and pie Sentiment Analysis by calling
neutral Sentiment charts function defined in Step 2
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.
▪ So to obtain the Tweets from twitter we use “Tweepy”
package.
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 Punctuations and


Tokenization 
stop words in the tweets
 Sentiment Analysis is the
process of determining
whether a piece of
writing is positive,
negative or neutral. 
 Sentiment Analysis is
extremely used in social
media monitoring as it
allows us to gain an
overview of the wider
public opinion behind any
topic 

 
Sentiment Detection:

 VADER (Variance  Aware


Dictionary Sentiment Reasoner)
is a lexicon and rule- based
sentiment  analysis tool that is
specifically designed for social
media.
 Vader not only tells about the
positivity and negativity score
but also tells how positive or
how negative a sentiment is.
VISUALIZATION USING BAR GRAPH:

 Expected Bar graph  


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

 Expected pie chart  


representing the Positive,
negative & neutral
percentages based on
tweets.

You might also like