SlideShare a Scribd company logo
1 of 11
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 1
Twitter Sentiment
Analysis
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 2
ABSTRACT
This project addresses the problem of sentiment analysis in twitter; that is classifying tweets
according to the sentiment expressed in them: positive, negative or neutral. Twitter is an
online micro-blogging and social-networking platform which allows users to write short
status updates of maximum length 280 characters. It is a rapidly expanding service with over
200 million registered users - out of which 100 million are active users and half of them log
on twitter on a daily basis - generating nearly 250 million tweets per day . Due to this large
amount of usage we hope to achieve a reflection of public sentiment by analysing the
sentiments expressed in the tweets. Analysing the public sentiment is important for many
applications such as firms trying to find out the response of their products in the market,
predicting political elections and predicting socioeconomic phenomena like stock exchange.
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 3
Introduction
In the past years, the young generation people are moving towards the social media like
Google Plus, WhatsApp, Facebook, Twitter, etc. The social media is also revolving with
those people to get them involved by making current trending insights concepts that is
trending within a second. In the recent years, the people are exposing their social related
issues through several social media by comments, reviews, posts, hashtags, emoji’s, etc.
which was followed by many people and those tweets become popular soon. Moreover, the
social media is also bringing tremendous opportunity platform for businesses to connect with
the consumers so easily. People rest on mostly user produced content like, comments, over
online for making the decision. Example: if anyone has to buy a product or make a decision,
they initiallysearch its reviews online, converse about it on social media. The content that is
displayed for that product is mainly taken into the point as well as the discussion in the social
media is also noticed and these made the way to make our business a success. To automate
our analysis based on the reviews or comments in the social media by the people, for a
sentimental analysis. Sentimental Analysis (SA) is introduced to the world to tell us the
information is correct or wrong in each scenario using the social media tags. Thus, we can
know about how world or people are reacting to every aspect currently going in the world.
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 4
What is sentiment analysis?
Sentiment Analysis is the process of ‘computationally’ determining whether a piece of
writing is positive, negative or neutral. It’s also known as opinion mining, deriving the
opinion or attitude of a speaker.
Why sentiment analysis?
Business: In marketing field companies use it to develop their strategies, to understand
customers’ feelings towards products or brand, how people respond to their campaigns or
product launches and why consumers don’t buy some
products.
Politics: In political field, it is used to keep track of political view, to detect consistency and
inconsistency between statements and actions at the government level. It can be used to
predict election results as well!
Public Actions: Sentiment analysis also is used to monitor and analyse social phenomena,
for the spotting of potentially dangerous situations and determining the general mood of the
blogosphere.
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 5
Prerequisites
Basic programming knowledge
Although Python is highly involved in this mini-project, it is not required to have a deep
knowledge in the language, as long as you have basic programming knowledge.
Installed tools
For this program, we will need Python to be installed on the computer. We will be using the
libraries twitter, nltk, re, csv, time, and json. You are likely to have to install the first two
libraries. The rest already come with the Python interpreter. It doesn’t hurt to check that
they’re up-to-date though.
Data setsplitting concept
This is critical to fully understand the process pipeline. You only need to know the difference
between Training and Test data sets, and in what context each one is used.
Basic RESTfulAPI knowledge
This is not crucial, but it could help. We will be using the Twitter API here and there in the
code, making normal calls to the API and dealing with the JSON objects it returns.
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 6
How to perform twitter sentiment Analysis:
Twitter Sentiment Analysis Python:
Analysis of Twitter Sentiment using Python can be done through popular Python libraries
like Tweepy and TextBlob.
Tweepy:
Tweepy, the Python client for the official Twitter API supports accessing Twitter via Basic
Authentication and the newer method, OAuth. Twitter has stopped accepting Basic
Authentication so OAuth is now the only way to use the Twitter API.
Tweety gives access to the well documented Twitter API. Tweepy makes it possible to get an
object and use any method that the official Twitter API offers. The main Model classes in the
Twitter API are Tweets, Users, Entities, and Places. Access to each returns a JSON-formatted
response and traversing through information is very easy in Python.
TextBlob:
TextBlob, one of the popular Python libraries for processing textual data, stands on the
NLTK. It works as a framework for almost all necessary tasks, we need in Basic NLP
(Natural Language Processing). TextBlob has some advanced features like –
Sentiment Extraction
Spelling Correction
TextBlob is useful for Twitter Sentiment Analysis Python in the following ways:
Tokenization:
TextBlob can tokenize the text blocks into different sentences and words. This makes reading
between the lines much easier.
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 7
Noun Phrases Extractionusing TextBlob:
The noun is mostly used as an Entity in sentences. It is also one the most important NLP
utility in Dependency Parsing. This is how different nouns are extracted from a sentence
using TextBlob –
Part-of-SpeechTagging using TextBlob:
TextBlob is also used for tagging parts of speech with your sentences. For example –
N-Grams with TextBlob:
Here N is basically a number. N-Gram is basically a chunk of words in the group. For a deep
understanding of N-Gram, we may consider the following example-
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 8
Classifying Sentiments :
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 9
Working Process:
In this project, first I have collected the data and stored them in a file then read the data from
the file and word tokenized them using python’s Natural Language Toolkit Library(nltk).
There is a list available of positive and negative words on internet that will have all the
negative or positive words, stored the words in the dataframe and then compared words of my
tweets with the respective words in positive and negative dataframes and generated net
positive score and negative score for each( I have collected 200 tweets(as twitter maximum
limit is 200 tweets at a time) about ‘Narendra Modi’ and ‘Arvind Kejriwal’ and then
analyzing them and displaying the final result in a pie chart to determine whether people are
speaking about whom Narendra Modi or Arvind Kejriwal ).
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 10
Expected output:
CE350 DWDM 17CE026,17CE029,17CE041
C.S.P.I.T.(C.E.) 11
References:
https://www.geeksforgeeks.org/twitter-sentiment-analysis-using-python/
https://www.digitalvidya.com/blog/twitter-sentiment-analysis-introduction-and-techniques/
https://realpython.com/twitter-sentiment-python-docker-elasticsearch-kibana/

More Related Content

What's hot

IRJET - Twitter Sentimental Analysis
IRJET -  	  Twitter Sentimental AnalysisIRJET -  	  Twitter Sentimental Analysis
IRJET - Twitter Sentimental AnalysisIRJET Journal
 
Tweet sentiment analysis
Tweet sentiment analysisTweet sentiment analysis
Tweet sentiment analysisAnil Shrestha
 
Sentiment Analysis Using Twitter
Sentiment Analysis Using TwitterSentiment Analysis Using Twitter
Sentiment Analysis Using Twitterpiya chauhan
 
OpenAI’s GPT 3 Language Model - guest Steve Omohundro
OpenAI’s GPT 3 Language Model - guest Steve OmohundroOpenAI’s GPT 3 Language Model - guest Steve Omohundro
OpenAI’s GPT 3 Language Model - guest Steve OmohundroNumenta
 
Strategize your World Cup Marketing Campaign using Tweets
Strategize your World Cup Marketing Campaign using TweetsStrategize your World Cup Marketing Campaign using Tweets
Strategize your World Cup Marketing Campaign using TweetsKeRoxiLi
 
Sentiment Analaysis on Twitter
Sentiment Analaysis on TwitterSentiment Analaysis on Twitter
Sentiment Analaysis on TwitterNitish J Prabhu
 
A brief primer on OpenAI's GPT-3
A brief primer on OpenAI's GPT-3A brief primer on OpenAI's GPT-3
A brief primer on OpenAI's GPT-3Ishan Jain
 
Sentiment Analysis via R Programming
Sentiment Analysis via R ProgrammingSentiment Analysis via R Programming
Sentiment Analysis via R ProgrammingSkillspeed
 
Tweet analyzer web applicaion
Tweet analyzer web applicaionTweet analyzer web applicaion
Tweet analyzer web applicaionPrathameshSankpal
 
SentiCheNews - Sentiment Analysis on Newspapers and Tweets
SentiCheNews - Sentiment Analysis on Newspapers and TweetsSentiCheNews - Sentiment Analysis on Newspapers and Tweets
SentiCheNews - Sentiment Analysis on Newspapers and Tweets🧑‍💻 Manuel Coppotelli
 
IRJET- Fake News Detection using Logistic Regression
IRJET- Fake News Detection using Logistic RegressionIRJET- Fake News Detection using Logistic Regression
IRJET- Fake News Detection using Logistic RegressionIRJET Journal
 
Sentiment Analysis
Sentiment Analysis Sentiment Analysis
Sentiment Analysis prnk08
 
Sentiment analyzer and opinion mining
Sentiment analyzer and opinion miningSentiment analyzer and opinion mining
Sentiment analyzer and opinion miningAnkush Mehta
 
Fake News Detection using Machine Learning
Fake News Detection using Machine LearningFake News Detection using Machine Learning
Fake News Detection using Machine Learningijtsrd
 
sentiment analysis text extraction from social media
sentiment  analysis text extraction from social media sentiment  analysis text extraction from social media
sentiment analysis text extraction from social media Ravindra Chaudhary
 
Implications of GPT-3
Implications of GPT-3Implications of GPT-3
Implications of GPT-3Raven Jiang
 
Ontology based sentiment analysis
Ontology based sentiment analysisOntology based sentiment analysis
Ontology based sentiment analysisprathako
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSumit Raj
 

What's hot (19)

IRJET - Twitter Sentimental Analysis
IRJET -  	  Twitter Sentimental AnalysisIRJET -  	  Twitter Sentimental Analysis
IRJET - Twitter Sentimental Analysis
 
Tweet sentiment analysis
Tweet sentiment analysisTweet sentiment analysis
Tweet sentiment analysis
 
Sentiment Analysis Using Twitter
Sentiment Analysis Using TwitterSentiment Analysis Using Twitter
Sentiment Analysis Using Twitter
 
OpenAI’s GPT 3 Language Model - guest Steve Omohundro
OpenAI’s GPT 3 Language Model - guest Steve OmohundroOpenAI’s GPT 3 Language Model - guest Steve Omohundro
OpenAI’s GPT 3 Language Model - guest Steve Omohundro
 
Strategize your World Cup Marketing Campaign using Tweets
Strategize your World Cup Marketing Campaign using TweetsStrategize your World Cup Marketing Campaign using Tweets
Strategize your World Cup Marketing Campaign using Tweets
 
Sentiment Analaysis on Twitter
Sentiment Analaysis on TwitterSentiment Analaysis on Twitter
Sentiment Analaysis on Twitter
 
A brief primer on OpenAI's GPT-3
A brief primer on OpenAI's GPT-3A brief primer on OpenAI's GPT-3
A brief primer on OpenAI's GPT-3
 
Sentiment Analysis via R Programming
Sentiment Analysis via R ProgrammingSentiment Analysis via R Programming
Sentiment Analysis via R Programming
 
Tweet analyzer web applicaion
Tweet analyzer web applicaionTweet analyzer web applicaion
Tweet analyzer web applicaion
 
SentiCheNews - Sentiment Analysis on Newspapers and Tweets
SentiCheNews - Sentiment Analysis on Newspapers and TweetsSentiCheNews - Sentiment Analysis on Newspapers and Tweets
SentiCheNews - Sentiment Analysis on Newspapers and Tweets
 
IRJET- Fake News Detection using Logistic Regression
IRJET- Fake News Detection using Logistic RegressionIRJET- Fake News Detection using Logistic Regression
IRJET- Fake News Detection using Logistic Regression
 
Sentiment Analysis
Sentiment Analysis Sentiment Analysis
Sentiment Analysis
 
Sentiment analyzer and opinion mining
Sentiment analyzer and opinion miningSentiment analyzer and opinion mining
Sentiment analyzer and opinion mining
 
Fake News Detection using Machine Learning
Fake News Detection using Machine LearningFake News Detection using Machine Learning
Fake News Detection using Machine Learning
 
Evaluation Datasets for Twitter Sentiment Analysis: A survey and a new datase...
Evaluation Datasets for Twitter Sentiment Analysis: A survey and a new datase...Evaluation Datasets for Twitter Sentiment Analysis: A survey and a new datase...
Evaluation Datasets for Twitter Sentiment Analysis: A survey and a new datase...
 
sentiment analysis text extraction from social media
sentiment  analysis text extraction from social media sentiment  analysis text extraction from social media
sentiment analysis text extraction from social media
 
Implications of GPT-3
Implications of GPT-3Implications of GPT-3
Implications of GPT-3
 
Ontology based sentiment analysis
Ontology based sentiment analysisOntology based sentiment analysis
Ontology based sentiment analysis
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 

Similar to Twitter Data Analysis

Sentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningSentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningIRJET Journal
 
Sentiment analysis of Twitter data using python
Sentiment analysis of Twitter data using pythonSentiment analysis of Twitter data using python
Sentiment analysis of Twitter data using pythonHetu Bhavsar
 
Knime social media_white_paper
Knime social media_white_paperKnime social media_white_paper
Knime social media_white_paperFiras Husseini
 
Tik tok social listening
Tik tok social listeningTik tok social listening
Tik tok social listeningRepustate
 
UTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSIS
UTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSISUTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSIS
UTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSISIRJET Journal
 
Sentiment of Sentence in Tweets: A Review
Sentiment of Sentence in Tweets: A ReviewSentiment of Sentence in Tweets: A Review
Sentiment of Sentence in Tweets: A Reviewiosrjce
 
IRJET- Improved Real-Time Twitter Sentiment Analysis using ML & Word2Vec
IRJET-  	  Improved Real-Time Twitter Sentiment Analysis using ML & Word2VecIRJET-  	  Improved Real-Time Twitter Sentiment Analysis using ML & Word2Vec
IRJET- Improved Real-Time Twitter Sentiment Analysis using ML & Word2VecIRJET Journal
 
SENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATASENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATAanargha gangadharan
 
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATAREAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATAMary Lis Joseph
 
SENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATASENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATAParvathy Devaraj
 
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...csandit
 
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...cscpconf
 
IRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market InvestmentIRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market InvestmentIRJET Journal
 
IRJET- Review Analyser with Bot
IRJET- Review Analyser with BotIRJET- Review Analyser with Bot
IRJET- Review Analyser with BotIRJET Journal
 
Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...
Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...
Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...IRJET Journal
 
Final Presentation
Final PresentationFinal Presentation
Final PresentationLove Tyagi
 
IRJET - Twitter Sentiment Analysis using Machine Learning
IRJET -  	  Twitter Sentiment Analysis using Machine LearningIRJET -  	  Twitter Sentiment Analysis using Machine Learning
IRJET - Twitter Sentiment Analysis using Machine LearningIRJET Journal
 
TV Show Popularity Prediction using Sentiment Analysis in Social Network
TV Show Popularity Prediction using Sentiment Analysis in Social NetworkTV Show Popularity Prediction using Sentiment Analysis in Social Network
TV Show Popularity Prediction using Sentiment Analysis in Social NetworkIRJET Journal
 
Sentiment analysis on demonetisation
Sentiment analysis on demonetisationSentiment analysis on demonetisation
Sentiment analysis on demonetisationAbrarMohamed5
 

Similar to Twitter Data Analysis (20)

Sentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningSentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine Learning
 
Sentiment analysis of Twitter data using python
Sentiment analysis of Twitter data using pythonSentiment analysis of Twitter data using python
Sentiment analysis of Twitter data using python
 
Knime social media_white_paper
Knime social media_white_paperKnime social media_white_paper
Knime social media_white_paper
 
Tik tok social listening
Tik tok social listeningTik tok social listening
Tik tok social listening
 
UTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSIS
UTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSISUTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSIS
UTILIZING TWITTER TO PERFORM AUTONOMOUS SENTIMENT ANALYSIS
 
Sentiment of Sentence in Tweets: A Review
Sentiment of Sentence in Tweets: A ReviewSentiment of Sentence in Tweets: A Review
Sentiment of Sentence in Tweets: A Review
 
W01761157162
W01761157162W01761157162
W01761157162
 
IRJET- Improved Real-Time Twitter Sentiment Analysis using ML & Word2Vec
IRJET-  	  Improved Real-Time Twitter Sentiment Analysis using ML & Word2VecIRJET-  	  Improved Real-Time Twitter Sentiment Analysis using ML & Word2Vec
IRJET- Improved Real-Time Twitter Sentiment Analysis using ML & Word2Vec
 
SENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATASENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATA
 
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATAREAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
 
SENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATASENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATA
 
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
 
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
A MODEL BASED ON SENTIMENTS ANALYSIS FOR STOCK EXCHANGE PREDICTION - CASE STU...
 
IRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market InvestmentIRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market Investment
 
IRJET- Review Analyser with Bot
IRJET- Review Analyser with BotIRJET- Review Analyser with Bot
IRJET- Review Analyser with Bot
 
Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...
Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...
Combining Lexicon based and Machine Learning based Methods for Twitter Sentim...
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
IRJET - Twitter Sentiment Analysis using Machine Learning
IRJET -  	  Twitter Sentiment Analysis using Machine LearningIRJET -  	  Twitter Sentiment Analysis using Machine Learning
IRJET - Twitter Sentiment Analysis using Machine Learning
 
TV Show Popularity Prediction using Sentiment Analysis in Social Network
TV Show Popularity Prediction using Sentiment Analysis in Social NetworkTV Show Popularity Prediction using Sentiment Analysis in Social Network
TV Show Popularity Prediction using Sentiment Analysis in Social Network
 
Sentiment analysis on demonetisation
Sentiment analysis on demonetisationSentiment analysis on demonetisation
Sentiment analysis on demonetisation
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Twitter Data Analysis

  • 2. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 2 ABSTRACT This project addresses the problem of sentiment analysis in twitter; that is classifying tweets according to the sentiment expressed in them: positive, negative or neutral. Twitter is an online micro-blogging and social-networking platform which allows users to write short status updates of maximum length 280 characters. It is a rapidly expanding service with over 200 million registered users - out of which 100 million are active users and half of them log on twitter on a daily basis - generating nearly 250 million tweets per day . Due to this large amount of usage we hope to achieve a reflection of public sentiment by analysing the sentiments expressed in the tweets. Analysing the public sentiment is important for many applications such as firms trying to find out the response of their products in the market, predicting political elections and predicting socioeconomic phenomena like stock exchange.
  • 3. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 3 Introduction In the past years, the young generation people are moving towards the social media like Google Plus, WhatsApp, Facebook, Twitter, etc. The social media is also revolving with those people to get them involved by making current trending insights concepts that is trending within a second. In the recent years, the people are exposing their social related issues through several social media by comments, reviews, posts, hashtags, emoji’s, etc. which was followed by many people and those tweets become popular soon. Moreover, the social media is also bringing tremendous opportunity platform for businesses to connect with the consumers so easily. People rest on mostly user produced content like, comments, over online for making the decision. Example: if anyone has to buy a product or make a decision, they initiallysearch its reviews online, converse about it on social media. The content that is displayed for that product is mainly taken into the point as well as the discussion in the social media is also noticed and these made the way to make our business a success. To automate our analysis based on the reviews or comments in the social media by the people, for a sentimental analysis. Sentimental Analysis (SA) is introduced to the world to tell us the information is correct or wrong in each scenario using the social media tags. Thus, we can know about how world or people are reacting to every aspect currently going in the world.
  • 4. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 4 What is sentiment analysis? Sentiment Analysis is the process of ‘computationally’ determining whether a piece of writing is positive, negative or neutral. It’s also known as opinion mining, deriving the opinion or attitude of a speaker. Why sentiment analysis? Business: In marketing field companies use it to develop their strategies, to understand customers’ feelings towards products or brand, how people respond to their campaigns or product launches and why consumers don’t buy some products. Politics: In political field, it is used to keep track of political view, to detect consistency and inconsistency between statements and actions at the government level. It can be used to predict election results as well! Public Actions: Sentiment analysis also is used to monitor and analyse social phenomena, for the spotting of potentially dangerous situations and determining the general mood of the blogosphere.
  • 5. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 5 Prerequisites Basic programming knowledge Although Python is highly involved in this mini-project, it is not required to have a deep knowledge in the language, as long as you have basic programming knowledge. Installed tools For this program, we will need Python to be installed on the computer. We will be using the libraries twitter, nltk, re, csv, time, and json. You are likely to have to install the first two libraries. The rest already come with the Python interpreter. It doesn’t hurt to check that they’re up-to-date though. Data setsplitting concept This is critical to fully understand the process pipeline. You only need to know the difference between Training and Test data sets, and in what context each one is used. Basic RESTfulAPI knowledge This is not crucial, but it could help. We will be using the Twitter API here and there in the code, making normal calls to the API and dealing with the JSON objects it returns.
  • 6. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 6 How to perform twitter sentiment Analysis: Twitter Sentiment Analysis Python: Analysis of Twitter Sentiment using Python can be done through popular Python libraries like Tweepy and TextBlob. Tweepy: Tweepy, the Python client for the official Twitter API supports accessing Twitter via Basic Authentication and the newer method, OAuth. Twitter has stopped accepting Basic Authentication so OAuth is now the only way to use the Twitter API. Tweety gives access to the well documented Twitter API. Tweepy makes it possible to get an object and use any method that the official Twitter API offers. The main Model classes in the Twitter API are Tweets, Users, Entities, and Places. Access to each returns a JSON-formatted response and traversing through information is very easy in Python. TextBlob: TextBlob, one of the popular Python libraries for processing textual data, stands on the NLTK. It works as a framework for almost all necessary tasks, we need in Basic NLP (Natural Language Processing). TextBlob has some advanced features like – Sentiment Extraction Spelling Correction TextBlob is useful for Twitter Sentiment Analysis Python in the following ways: Tokenization: TextBlob can tokenize the text blocks into different sentences and words. This makes reading between the lines much easier.
  • 7. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 7 Noun Phrases Extractionusing TextBlob: The noun is mostly used as an Entity in sentences. It is also one the most important NLP utility in Dependency Parsing. This is how different nouns are extracted from a sentence using TextBlob – Part-of-SpeechTagging using TextBlob: TextBlob is also used for tagging parts of speech with your sentences. For example – N-Grams with TextBlob: Here N is basically a number. N-Gram is basically a chunk of words in the group. For a deep understanding of N-Gram, we may consider the following example-
  • 9. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 9 Working Process: In this project, first I have collected the data and stored them in a file then read the data from the file and word tokenized them using python’s Natural Language Toolkit Library(nltk). There is a list available of positive and negative words on internet that will have all the negative or positive words, stored the words in the dataframe and then compared words of my tweets with the respective words in positive and negative dataframes and generated net positive score and negative score for each( I have collected 200 tweets(as twitter maximum limit is 200 tweets at a time) about ‘Narendra Modi’ and ‘Arvind Kejriwal’ and then analyzing them and displaying the final result in a pie chart to determine whether people are speaking about whom Narendra Modi or Arvind Kejriwal ).
  • 11. CE350 DWDM 17CE026,17CE029,17CE041 C.S.P.I.T.(C.E.) 11 References: https://www.geeksforgeeks.org/twitter-sentiment-analysis-using-python/ https://www.digitalvidya.com/blog/twitter-sentiment-analysis-introduction-and-techniques/ https://realpython.com/twitter-sentiment-python-docker-elasticsearch-kibana/