SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Sentiment Analysis
Submitted By : Smriti Agarwal
(B-tech DA – 3rd year)
Section : G
University Roll: 171520025
Guided By : Mr. Rahul Pathak
(Technical Trainer)
INDUSTRIAL TRAINING ON MACHINE LEARNING
Content
 What is Sentiment Analysis?
 Tool Used
 What is the process?
• Getting the Data
• Cleaning the Data
• Iterating through fetched Tweets
• Data Visualization
 Detailed Report
 What are my next steps regarding the project?
What is Sentiment Analysis?
• Sentiment Analysis is the subfield of NLP(Natural Language Processing).
• It is also called opinion mining as it determines the opinion from the
text.
• A popular task in sentiment analysis is the classification of documents
based on the expressed opinions or emotions of the author.
Tools Used
• Spyder
• M S Excel
• Twitter Developer Account
• Tweepy
• Textblob
• Csv
• Matplotlib.pyplot
• Re
01
02
03
04
Getting the data
• Make a twitter
developer account
for authentication.
• Downloading data
from twitter.
Cleaning the data
• Taking input from
user(string to be
searched).
• Cleaning the tweets
by removing special
symbols and links
from tweet.
Data Visualization
• Whether, according to
people the word is
positive or negative.
Iterating fetched tweets
• The tweets being fetched
are analyzed using textblob
technique.
What was the process?
Getting the Data
There are various methods to retrieve data from twitter:
• Retrieve from the Twitter public API.
• Find an existing Twitter dataset.
• Purchase from Twitter.
• Access or purchase from a Twitter service provider.
Which I implemented among them is retrieving data using twitter public API.
It took a while for authentication of twitter account to get Keys and Tokens.
Cleaning the Data
• Pre-processing the data:
 Defined a function to clean the data, using library Regular Expression(re).
 A list of all stop words is created and thus, removed using sub().
• E.g.: special symbols etc. the words which don’t actually contribute in analysis.
Iterating fetched Tweets
• To iterate through tweets we use a loop.
• Analysis of tweets is done using textblob library.
• Here, the polarity comes into picture.
NLTK vs TextBlob
• NLP(Natural Language Processing) is a area of growing attention due
to increasing number of applications like: medical chat-bots,
machine translations. Eg: Siri, Google Assistant.
• NLP’s NLTK being tedious and heavy was not used rather TextBlob,
which is built on the shoulders of NLTK and Pattern. A big advantage
of this is, it is easy to learn and offers a lot of features like
sentiment analysis, pos-tagging, noun phrase extraction, etc.
TextBlob
1. Create a textblob object and pass a string with it.
2. Call function TextBlob in order to divide text or sentence into
sequence of tokens or words.
Data Visualization
Detailed Report
What are my next steps regarding this
project?
Increasing the spectrum of different sentiments: positivity, negativity,
love, hate, fear, desire and violence. Which would provide more
understanding of texts and comments.
THANK YOU
Email-id: smriti.Agarwal_da17@gla.ac.in

Weitere ähnliche Inhalte

Was ist angesagt?

Sentiment Analysis Using Twitter
Sentiment Analysis Using TwitterSentiment Analysis Using Twitter
Sentiment Analysis Using Twitter
piya chauhan
 

Was ist angesagt? (20)

social network analysis project twitter sentimental analysis
social network analysis project twitter sentimental analysissocial network analysis project twitter sentimental analysis
social network analysis project twitter sentimental analysis
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in Twitter
 
Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysis
 
Sentiment analysis of twitter data
Sentiment analysis of twitter dataSentiment analysis of twitter data
Sentiment analysis of twitter data
 
Twitter sentiment analysis project report
Twitter sentiment analysis project reportTwitter sentiment analysis project report
Twitter sentiment analysis project report
 
Sentiment analysis in Twitter on Big Data
Sentiment analysis in Twitter on Big DataSentiment analysis in Twitter on Big Data
Sentiment analysis in Twitter on Big Data
 
Sentiment Analysis Using Twitter
Sentiment Analysis Using TwitterSentiment Analysis Using Twitter
Sentiment Analysis Using Twitter
 
Twitter Sentiment Analysis
Twitter Sentiment AnalysisTwitter Sentiment Analysis
Twitter Sentiment Analysis
 
Approaches to Sentiment Analysis
Approaches to Sentiment AnalysisApproaches to Sentiment Analysis
Approaches to Sentiment Analysis
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis ppt
 
Sentiment Analysis on Twitter
Sentiment Analysis on TwitterSentiment Analysis on Twitter
Sentiment Analysis on Twitter
 
Sentimental Analysis of twitter data .
Sentimental Analysis of twitter data .Sentimental Analysis of twitter data .
Sentimental Analysis of twitter data .
 
Sentiment analysis using ml
Sentiment analysis using mlSentiment analysis using ml
Sentiment analysis using ml
 
How Sentiment Analysis works
How Sentiment Analysis worksHow Sentiment Analysis works
How Sentiment Analysis works
 
Sentiment analysis - Our approach and use cases
Sentiment analysis - Our approach and use casesSentiment analysis - Our approach and use cases
Sentiment analysis - Our approach and use cases
 
IRE2014-Sentiment Analysis
IRE2014-Sentiment AnalysisIRE2014-Sentiment Analysis
IRE2014-Sentiment Analysis
 
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
 
Twitter Sentiment Analysis.pdf
Twitter Sentiment Analysis.pdfTwitter Sentiment Analysis.pdf
Twitter Sentiment Analysis.pdf
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in Twitter
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysis
 

Ähnlich wie Sentiment Analysis on Twitter

Filtering out improper user accounts from twitter user accounts for discoveri...
Filtering out improper user accounts from twitter user accounts for discoveri...Filtering out improper user accounts from twitter user accounts for discoveri...
Filtering out improper user accounts from twitter user accounts for discoveri...
siramatu-lab
 
SubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an EntitySubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an Entity
Ankita Kumari
 

Ähnlich wie Sentiment Analysis on Twitter (20)

Introduction to Natural Language Processing (NLP)
Introduction to Natural Language Processing (NLP)Introduction to Natural Language Processing (NLP)
Introduction to Natural Language Processing (NLP)
 
Filtering out improper user accounts from twitter user accounts for discoveri...
Filtering out improper user accounts from twitter user accounts for discoveri...Filtering out improper user accounts from twitter user accounts for discoveri...
Filtering out improper user accounts from twitter user accounts for discoveri...
 
Introduction to Text Mining
Introduction to Text MiningIntroduction to Text Mining
Introduction to Text Mining
 
Open source ml systems that need to be built
Open source ml systems that need to be builtOpen source ml systems that need to be built
Open source ml systems that need to be built
 
Advances in Exploratory Data Analysis, Visualisation and Quality for Data Cen...
Advances in Exploratory Data Analysis, Visualisation and Quality for Data Cen...Advances in Exploratory Data Analysis, Visualisation and Quality for Data Cen...
Advances in Exploratory Data Analysis, Visualisation and Quality for Data Cen...
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 
Data Science Workshop - day 2
Data Science Workshop - day 2Data Science Workshop - day 2
Data Science Workshop - day 2
 
Webinar: Question Answering and Virtual Assistants with Deep Learning
Webinar: Question Answering and Virtual Assistants with Deep LearningWebinar: Question Answering and Virtual Assistants with Deep Learning
Webinar: Question Answering and Virtual Assistants with Deep Learning
 
Explore The Machine Learning and TensorFlow
Explore The Machine Learning and TensorFlowExplore The Machine Learning and TensorFlow
Explore The Machine Learning and TensorFlow
 
Internship
InternshipInternship
Internship
 
ProjectsSummary.pptx
ProjectsSummary.pptxProjectsSummary.pptx
ProjectsSummary.pptx
 
Solved Big Data and Data Science Projects pdf.pdf
Solved Big Data and Data Science Projects pdf.pdfSolved Big Data and Data Science Projects pdf.pdf
Solved Big Data and Data Science Projects pdf.pdf
 
Tweet analyzer web applicaion
Tweet analyzer web applicaionTweet analyzer web applicaion
Tweet analyzer web applicaion
 
Analysis Mechanical system using Artificial intelligence
Analysis Mechanical system using Artificial intelligenceAnalysis Mechanical system using Artificial intelligence
Analysis Mechanical system using Artificial intelligence
 
SubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an EntitySubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an Entity
 
ExperTwin: An Alter Ego in Cyberspace for Knowledge Workers
ExperTwin: An Alter Ego in Cyberspace for Knowledge WorkersExperTwin: An Alter Ego in Cyberspace for Knowledge Workers
ExperTwin: An Alter Ego in Cyberspace for Knowledge Workers
 
ML Framework for auto-responding to customer support queries
ML Framework for auto-responding to customer support queriesML Framework for auto-responding to customer support queries
ML Framework for auto-responding to customer support queries
 
From SQL to Python - A Beginner's Guide to Making the Switch
From SQL to Python - A Beginner's Guide to Making the SwitchFrom SQL to Python - A Beginner's Guide to Making the Switch
From SQL to Python - A Beginner's Guide to Making the Switch
 
Data Science Workshop - day 1
Data Science Workshop - day 1Data Science Workshop - day 1
Data Science Workshop - day 1
 
How Oracle Uses CrowdFlower For Sentiment Analysis
How Oracle Uses CrowdFlower For Sentiment AnalysisHow Oracle Uses CrowdFlower For Sentiment Analysis
How Oracle Uses CrowdFlower For Sentiment Analysis
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Sentiment Analysis on Twitter

  • 1. Sentiment Analysis Submitted By : Smriti Agarwal (B-tech DA – 3rd year) Section : G University Roll: 171520025 Guided By : Mr. Rahul Pathak (Technical Trainer) INDUSTRIAL TRAINING ON MACHINE LEARNING
  • 2. Content  What is Sentiment Analysis?  Tool Used  What is the process? • Getting the Data • Cleaning the Data • Iterating through fetched Tweets • Data Visualization  Detailed Report  What are my next steps regarding the project?
  • 3. What is Sentiment Analysis? • Sentiment Analysis is the subfield of NLP(Natural Language Processing). • It is also called opinion mining as it determines the opinion from the text. • A popular task in sentiment analysis is the classification of documents based on the expressed opinions or emotions of the author.
  • 4. Tools Used • Spyder • M S Excel • Twitter Developer Account • Tweepy • Textblob • Csv • Matplotlib.pyplot • Re
  • 5. 01 02 03 04 Getting the data • Make a twitter developer account for authentication. • Downloading data from twitter. Cleaning the data • Taking input from user(string to be searched). • Cleaning the tweets by removing special symbols and links from tweet. Data Visualization • Whether, according to people the word is positive or negative. Iterating fetched tweets • The tweets being fetched are analyzed using textblob technique. What was the process?
  • 6. Getting the Data There are various methods to retrieve data from twitter: • Retrieve from the Twitter public API. • Find an existing Twitter dataset. • Purchase from Twitter. • Access or purchase from a Twitter service provider. Which I implemented among them is retrieving data using twitter public API. It took a while for authentication of twitter account to get Keys and Tokens.
  • 7.
  • 8.
  • 9. Cleaning the Data • Pre-processing the data:  Defined a function to clean the data, using library Regular Expression(re).  A list of all stop words is created and thus, removed using sub(). • E.g.: special symbols etc. the words which don’t actually contribute in analysis.
  • 10. Iterating fetched Tweets • To iterate through tweets we use a loop. • Analysis of tweets is done using textblob library. • Here, the polarity comes into picture.
  • 11. NLTK vs TextBlob • NLP(Natural Language Processing) is a area of growing attention due to increasing number of applications like: medical chat-bots, machine translations. Eg: Siri, Google Assistant. • NLP’s NLTK being tedious and heavy was not used rather TextBlob, which is built on the shoulders of NLTK and Pattern. A big advantage of this is, it is easy to learn and offers a lot of features like sentiment analysis, pos-tagging, noun phrase extraction, etc.
  • 12. TextBlob 1. Create a textblob object and pass a string with it. 2. Call function TextBlob in order to divide text or sentence into sequence of tokens or words.
  • 13.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. What are my next steps regarding this project? Increasing the spectrum of different sentiments: positivity, negativity, love, hate, fear, desire and violence. Which would provide more understanding of texts and comments.

Hinweis der Redaktion

  1. Notes to presenter: Description of what you learned in your own words on one side. Include information about the topic Details about the topic will also be helpful here. Tell the story of your learning experience. Just like a story there should always be a beginning, middle and an end. On the other side, you can add a graphic that provides evidence of what you learned. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.
  2. Notes to presenter: What did you think at first? What obstacles did you encounter along the way? How did you overcome those obstacles? What images can you add to support your process? This SmartArt allows you add images and text to help outline your process. If a picture is worth a thousand words, then pictures and words should help you communicate this reflection on learning perfectly! You can always click on Insert>SmartArt to change this graphic or select the graphic and click on the Design contextual menu to change the colors. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.
  3. Notes to presenter: What steps will you be taking as a result of this learning experience? Did you learn from any failed experiences? How will you do things differently? What advice will you give to others so they can learn from your experiences? How can you share what you learned with a real-world audience? Some examples of next steps might be: After delivering my first persuasive presentation, I am thinking about joining the debate team. After making my first film, I’m considering entering it in our school film festival or local film festival. After connecting with this career expert, I’d like to do some research on that career field because it sounds interesting to me. This SmartArt allows you add images and text to help outline your process. If a picture is worth a thousand words, then pictures and words should help you communicate this reflection on learning perfectly! You can always click on Insert>SmartArt to change this graphic or select the graphic and click on the Design contextual menu to change the colors. Feel free to use more than one slide to share your next steps. It also helps to add some video content to explain your message.