SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysis
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in Twitter
 
Sentimental Analysis of twitter data .
Sentimental Analysis of twitter data .Sentimental Analysis of twitter data .
Sentimental Analysis of twitter data .
 
Sentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataSentiment Analysis using Twitter Data
Sentiment Analysis using Twitter Data
 
Sentiment analysis in twitter using python
Sentiment analysis in twitter using pythonSentiment analysis in twitter using python
Sentiment analysis in twitter using python
 
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
 
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
 
Analyse des Sentiments -cas twitter- "Opinion Detection with Machine Lerning "
Analyse des Sentiments  -cas twitter- "Opinion Detection with Machine Lerning "Analyse des Sentiments  -cas twitter- "Opinion Detection with Machine Lerning "
Analyse des Sentiments -cas twitter- "Opinion Detection with Machine Lerning "
 
Twitter Sentiment Analysis
Twitter Sentiment AnalysisTwitter Sentiment Analysis
Twitter Sentiment Analysis
 
Sentiment Analysis on Twitter
Sentiment Analysis on TwitterSentiment Analysis on Twitter
Sentiment Analysis on Twitter
 
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
 
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
 
Sentiment analysis of twitter data
Sentiment analysis of twitter dataSentiment analysis of twitter data
Sentiment analysis of twitter data
 
Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysis
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in Twitter
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis ppt
 
Twitter Sentiment Analysis.pdf
Twitter Sentiment Analysis.pdfTwitter Sentiment Analysis.pdf
Twitter Sentiment Analysis.pdf
 
Approaches to Sentiment Analysis
Approaches to Sentiment AnalysisApproaches to Sentiment Analysis
Approaches to Sentiment Analysis
 
Sentiment Analysis
Sentiment AnalysisSentiment Analysis
Sentiment Analysis
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 

Semelhante a 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
 

Semelhante a 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...
 
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
 
Dice.com Bay Area Search - Beyond Learning to Rank Talk
Dice.com Bay Area Search - Beyond Learning to Rank TalkDice.com Bay Area Search - Beyond Learning to Rank Talk
Dice.com Bay Area Search - Beyond Learning to Rank Talk
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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.

Notas do Editor

  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.