SlideShare a Scribd company logo
2
Most read
16
Most read
Twitter Sentiment Analysis
Rachana priyadarshni samal
Overview : What Is Sentiment Analysis?
Sentiment analysis is the automated process of identifying and classifying
subjective information in text data. This might be an opinion, a judgment, or a
feeling about a particular topic or product feature.
The most common type of sentiment analysis is ‘polarity detection’ & ‘subjectivity
detection’ and involves classifying statements as Positive, Negative or Neutral.
● Polarity : -1 to 1
● Subjectivity : 0 to 1
Problem Statement
● In this project, we try to implement a Twitter sentiment analysis model that
helps to overcome the challenges of identifying the sentiments of the tweets
in all subject platforms like business, politics, public actions etc.
Current Scenario
Twitter is an innovative service aired in 2006 with currently more than 550 million
users. Surprisingly witnesses tweets covering everything under the world, ranging
from current political affairs to personal experiences. Movie reviews, travel
experiences , current events etc.
Our Objective
Social networks is a rich platform to learn about people’s opinion and sentiment
regarding different topics as they can communicate and share their opinion
actively on social media.
To implement an algorithm for automatic classification of data into positive,
negative or neutral.
Analyze people's sentiments, attitudes, opinions,emotions, etc. towards elements
such as, products, individuals, topics ,organizations, and services.
Determine the attitude of the mass is positive, negative or neutral towards the
subject of interest.
Why Twitter data?
Twitter is a gold mine of data. Unlike other social platforms, almost every user’s
tweets are completely public and pullable. This is a huge plus if you’re trying to get
a large amount of data to run analytics on. Twitter data is also pretty specific.
A simple application of this could be analyzing how your company is received in
the general public. You could collect the last 2,000 tweets that mention your
company (or any term you like), and run a sentiment analysis algorithm over it.
The Process at a Glance
Importing
libraries and
dataset
Exploring and
preprocessing
the dataset
Sentiment Analysis Visualization of
analyzed data
Methodology : How we are doing it?
1. Authenticate on twitter
2. Importing libraries and dataset
3. Pre-processing of the datasets
4. Extract candidate or take it as a user input
5. Calculate sentiment
6. Visualise the candidate data
Authenticate on Twitter
In order to fetch tweets through Twitter API, one needs to register an App through
their twitter account. Then
● Create a twitter developer account
● Create a app and get the ‘Keys and Access Tokens’.
● Use the OAuthHandler package from tweepy library to authenticate the
consumer keys and access tokens
Importing libraries and dataset
● Create a Twitter Client class using Tweepy library to interact with the Twitter
API
● Take a hashtag input from the user to pass as a query parameter
● After authenticating the client pass the query parameter in API search
function with the number of items you want in return
● Parse the results into a array for future processing
Pre-processing of the datasets
● Remove all URLs (e.g. www.xyz.com), hash tags
● Correct the spellings
● Replace all the emoticons with their sentiment.
● Remove all punctuations, symbols, numbers
● Remove Stop Words
● Expand Acronyms(we can use a acronym dictionary)
● Remove Non-English Tweets
Extract candidate or take it as a user input
● Either we take a reference array as input from user.
OR
● We can use feature extraction to get the vector keywords
Calculate sentiment
● Using TextBlob library to extract sentiment (i.e polarity and subjectivity) for
each tweet
● We can also do various type of statistical analysis on the tweets like
aggregate the results based on min, max, median, mean, etc using numpy
Visualising the candidate data
We can use matplotlib or other client side libraries to visualize the data on the
basis of
● Timestamp
● Polarity
● Subjectiveness
● Number of Reference
● Aggregate columns (min, max, median, mean, etc)
What visualization we are talking about?
References
● ‘’Twitter as a Corpus for Sentiment Analysis and Opinion Mining". In
Proceedings of the Seventh Conference on International Language Resources
and Evaluation, 2010, pp.1320-1326
● Sentiment140 dataset with 1.6 million tweets
● Twitter Datasets for Natural Language Processing and Machine Learning
● Sentiment Analysis of Twitter Data: A Survey of Techniques

More Related Content

PPTX
Twitter sentiment analysis ppt
PPTX
Sentiment Analaysis on Twitter
PPTX
Sentiment Analysis
PPTX
Sentiment Analysis Using Twitter
PPTX
Twitter sentiment analysis
PDF
Sentiment analysis of Twitter Data
PPTX
Sentiment Analysis using Twitter Data
PPTX
Sentiment Analysis on Twitter
Twitter sentiment analysis ppt
Sentiment Analaysis on Twitter
Sentiment Analysis
Sentiment Analysis Using Twitter
Twitter sentiment analysis
Sentiment analysis of Twitter Data
Sentiment Analysis using Twitter Data
Sentiment Analysis on Twitter

What's hot (20)

PPTX
Sentiment analysis of Twitter data using python
PPTX
Approaches to Sentiment Analysis
DOCX
Twitter sentiment analysis project report
PDF
Sentiment analysis - Our approach and use cases
PPTX
New sentiment analysis of tweets using python by Ravi kumar
PPTX
social network analysis project twitter sentimental analysis
PDF
Sentiment Analysis and Social Media: How and Why
PDF
Sentiment Analysis
PPT
Sentiment Analysis
PPTX
Sentiment Analysis
PPT
Sentiment Analysis in Twitter
PPTX
Sentiment Analysis in Twitter
PPTX
Twitter sentiment analysis ppt
PDF
Amazon sentimental analysis
PPTX
Sentiment analysis of twitter data
DOCX
Sentiment analysis in twitter using python
PPTX
Twitter sentiment analysis
PPTX
Sentimental Analysis - Naive Bayes Algorithm
PPTX
Sentimental Analysis of twitter data .
PPT
Twitter sentiment-analysis Jiit2013-14
Sentiment analysis of Twitter data using python
Approaches to Sentiment Analysis
Twitter sentiment analysis project report
Sentiment analysis - Our approach and use cases
New sentiment analysis of tweets using python by Ravi kumar
social network analysis project twitter sentimental analysis
Sentiment Analysis and Social Media: How and Why
Sentiment Analysis
Sentiment Analysis
Sentiment Analysis
Sentiment Analysis in Twitter
Sentiment Analysis in Twitter
Twitter sentiment analysis ppt
Amazon sentimental analysis
Sentiment analysis of twitter data
Sentiment analysis in twitter using python
Twitter sentiment analysis
Sentimental Analysis - Naive Bayes Algorithm
Sentimental Analysis of twitter data .
Twitter sentiment-analysis Jiit2013-14
Ad

Similar to Twitter Sentiment Analysis.pdf (20)

PDF
Sentiment Analysis of Twitter Data
PPTX
Sentiment analysis on demonetisation
PDF
IRJET - Implementation of Twitter Sentimental Analysis According to Hash Tag
PDF
IRJET - Twitter Sentimental Analysis
DOCX
Python report on twitter sentiment analysis
PPT
Sentiment analysis and classification of tweets using rapid miner tool
PDF
Sentiment Analysis of Twitter tweets using supervised classification technique
PDF
SENTIMENT ANALYSIS OF TWITTER DATA
PDF
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
PDF
SENTIMENT ANALYSIS OF TWITTER DATA
PDF
A Survey on Analysis of Twitter Opinion Mining using Sentiment Analysis
PDF
Twitter sentimentanalysis report
PDF
Sentiment Analysis on Twitter data using Machine Learning
DOCX
A credibility analysis system for assessing information on twitter
DOCX
Sentiment analysis using machine learning
PDF
Tweet analyzer web applicaion
PPTX
Chapter 6 Presentation
PDF
Chapter 6: Social Media Metrics and Analytics
PPTX
Chapter 6
PDF
sentimentanaly 2.pdf
Sentiment Analysis of Twitter Data
Sentiment analysis on demonetisation
IRJET - Implementation of Twitter Sentimental Analysis According to Hash Tag
IRJET - Twitter Sentimental Analysis
Python report on twitter sentiment analysis
Sentiment analysis and classification of tweets using rapid miner tool
Sentiment Analysis of Twitter tweets using supervised classification technique
SENTIMENT ANALYSIS OF TWITTER DATA
REAL TIME SENTIMENT ANALYSIS OF TWITTER DATA
SENTIMENT ANALYSIS OF TWITTER DATA
A Survey on Analysis of Twitter Opinion Mining using Sentiment Analysis
Twitter sentimentanalysis report
Sentiment Analysis on Twitter data using Machine Learning
A credibility analysis system for assessing information on twitter
Sentiment analysis using machine learning
Tweet analyzer web applicaion
Chapter 6 Presentation
Chapter 6: Social Media Metrics and Analytics
Chapter 6
sentimentanaly 2.pdf
Ad

Recently uploaded (20)

PDF
Abrasive, erosive and cavitation wear.pdf
PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
introduction to high performance computing
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
Software Engineering and software moduleing
PPTX
communication and presentation skills 01
PPT
Occupational Health and Safety Management System
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
Artificial Intelligence
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
R24 SURVEYING LAB MANUAL for civil enggi
Abrasive, erosive and cavitation wear.pdf
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
introduction to high performance computing
Fundamentals of safety and accident prevention -final (1).pptx
Software Engineering and software moduleing
communication and presentation skills 01
Occupational Health and Safety Management System
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
Safety Seminar civil to be ensured for safe working.
Automation-in-Manufacturing-Chapter-Introduction.pdf
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Artificial Intelligence
Nature of X-rays, X- Ray Equipment, Fluoroscopy
R24 SURVEYING LAB MANUAL for civil enggi

Twitter Sentiment Analysis.pdf

  • 2. Overview : What Is Sentiment Analysis? Sentiment analysis is the automated process of identifying and classifying subjective information in text data. This might be an opinion, a judgment, or a feeling about a particular topic or product feature. The most common type of sentiment analysis is ‘polarity detection’ & ‘subjectivity detection’ and involves classifying statements as Positive, Negative or Neutral. ● Polarity : -1 to 1 ● Subjectivity : 0 to 1
  • 3. Problem Statement ● In this project, we try to implement a Twitter sentiment analysis model that helps to overcome the challenges of identifying the sentiments of the tweets in all subject platforms like business, politics, public actions etc.
  • 4. Current Scenario Twitter is an innovative service aired in 2006 with currently more than 550 million users. Surprisingly witnesses tweets covering everything under the world, ranging from current political affairs to personal experiences. Movie reviews, travel experiences , current events etc.
  • 5. Our Objective Social networks is a rich platform to learn about people’s opinion and sentiment regarding different topics as they can communicate and share their opinion actively on social media. To implement an algorithm for automatic classification of data into positive, negative or neutral. Analyze people's sentiments, attitudes, opinions,emotions, etc. towards elements such as, products, individuals, topics ,organizations, and services. Determine the attitude of the mass is positive, negative or neutral towards the subject of interest.
  • 6. Why Twitter data? Twitter is a gold mine of data. Unlike other social platforms, almost every user’s tweets are completely public and pullable. This is a huge plus if you’re trying to get a large amount of data to run analytics on. Twitter data is also pretty specific. A simple application of this could be analyzing how your company is received in the general public. You could collect the last 2,000 tweets that mention your company (or any term you like), and run a sentiment analysis algorithm over it.
  • 7. The Process at a Glance Importing libraries and dataset Exploring and preprocessing the dataset Sentiment Analysis Visualization of analyzed data
  • 8. Methodology : How we are doing it? 1. Authenticate on twitter 2. Importing libraries and dataset 3. Pre-processing of the datasets 4. Extract candidate or take it as a user input 5. Calculate sentiment 6. Visualise the candidate data
  • 9. Authenticate on Twitter In order to fetch tweets through Twitter API, one needs to register an App through their twitter account. Then ● Create a twitter developer account ● Create a app and get the ‘Keys and Access Tokens’. ● Use the OAuthHandler package from tweepy library to authenticate the consumer keys and access tokens
  • 10. Importing libraries and dataset ● Create a Twitter Client class using Tweepy library to interact with the Twitter API ● Take a hashtag input from the user to pass as a query parameter ● After authenticating the client pass the query parameter in API search function with the number of items you want in return ● Parse the results into a array for future processing
  • 11. Pre-processing of the datasets ● Remove all URLs (e.g. www.xyz.com), hash tags ● Correct the spellings ● Replace all the emoticons with their sentiment. ● Remove all punctuations, symbols, numbers ● Remove Stop Words ● Expand Acronyms(we can use a acronym dictionary) ● Remove Non-English Tweets
  • 12. Extract candidate or take it as a user input ● Either we take a reference array as input from user. OR ● We can use feature extraction to get the vector keywords
  • 13. Calculate sentiment ● Using TextBlob library to extract sentiment (i.e polarity and subjectivity) for each tweet ● We can also do various type of statistical analysis on the tweets like aggregate the results based on min, max, median, mean, etc using numpy
  • 14. Visualising the candidate data We can use matplotlib or other client side libraries to visualize the data on the basis of ● Timestamp ● Polarity ● Subjectiveness ● Number of Reference ● Aggregate columns (min, max, median, mean, etc)
  • 15. What visualization we are talking about?
  • 16. References ● ‘’Twitter as a Corpus for Sentiment Analysis and Opinion Mining". In Proceedings of the Seventh Conference on International Language Resources and Evaluation, 2010, pp.1320-1326 ● Sentiment140 dataset with 1.6 million tweets ● Twitter Datasets for Natural Language Processing and Machine Learning ● Sentiment Analysis of Twitter Data: A Survey of Techniques