SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Sentiment Analysis from
  Cellphone Reviews




       Sagar Ahire | 155
       Preeti Singh | 178
What is Sentiment Analysis?
• Takes a block of text as input
• Determines the sentiment expressed in it
• “Sentiment” refers to whether the author’s
  opinion is positive or negative
Disciplines Involved
• Natural Language Processing
• Data Mining
• Artificial Intelligence
What Sentiment Analysis is NOT
• Does NOT use images anywhere (that is
  “emotion detection”)
• Does NOT aim at evaluating the product itself,
  just the sentiment expressed by the reviewer
Why Sentiment Analysis is challenging
• Keywords are not usually direct
  “This phone is as modern as the one owned by
  Alexander Graham Bell”
• Opinions expressed may belong to other
  people
  “Many people say iPhones are better than Androids”
• Order Effects
  “This could have revolutionized phones for ever,
  but the bundled OS makes it an ultimate letdown”
• Colloquial and domain-specific phrases
  “The phone runs a 1.2 GHz dual core processor”
Project Overview
• Aims to perform sentiment analysis on
  cellphone reviews
• Rates the sentiment on a scale of 1 to 5 stars
Inner Workings
• Uses a corpus of several cellphone reviews
  (currently 33)
• Trains a classifier using features, which may
  be:
  – Unigrams (Occurrences of single words)
  – Bigrams (Occurrences in pairs)
  – Adjectives only, etc.
• Uses the classifier to classify unknown reviews
Steps
Why Python?
• Less code, more productivity
• Flexible paradigms (functional, procedural,
  object-oriented, all in one)
• Fast development cycle
• Wide range of modules
Diving In…
• Modules used:
  – Python Standard Library (random, sys, etc)
  – nltk
• Classifiers used:
  – Naïve Bayes
Diving In… The Algorithm
          (Unigram Occurrences)
1. Take the entire corpus as input
2. Create a list ‘l’ of all documents, each labeled
   by its category (i.e., no of stars)
3. Extract the ‘n’ most frequent words in the
   entire corpus, cleaning up duplicates and
   non-alphabetic words
Diving In… The Algorithm
          (Unigram Occurrences)
4. For every document in l:
  i. Create a dictionary d[l]
  ii. For each of the n frequent words, put a value in
      d[l] indicating presence or absence
5. Divide the dictionary into a training set and a
   testing set
Diving In… The Algorithm
          (Unigram Occurrences)
6. Train a Naïve Bayes Classifier using the
   training set
7. Test the classifier using the testing set and
   report the accuracy
Next Steps
• Investigating the Maximum Entropy Classifier
• Refining feature choice
  – Negation Tagging
  – Synonyms
• Investigating Regression techniques
Additional Applications of Sentiment
               Analysis
• Filtering of SPAM or abusive e-mails
• Gauging the mood of people in a particular
  network
• Government intelligence
• Psychological evaluation
• Recommendation Systems
• Display of ads on webpages
“Sentiment is the poetry of the imagination.”
             - Alphonse de Lamartine

Weitere ähnliche Inhalte

Was ist angesagt?

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 casesKarol Chlasta
 
Sentiment analysis using ml
Sentiment analysis using mlSentiment analysis using ml
Sentiment analysis using mlPravin Katiyar
 
Amazon Product Sentiment review
Amazon Product Sentiment reviewAmazon Product Sentiment review
Amazon Product Sentiment reviewLalit Jain
 
Question Answering System using machine learning approach
Question Answering System using machine learning approachQuestion Answering System using machine learning approach
Question Answering System using machine learning approachGarima Nanda
 
Sentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataSentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataHari Prasad
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis pptSonuCreation
 
Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Saeedeh Shekarpour
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSumit Raj
 
Approaches to Sentiment Analysis
Approaches to Sentiment AnalysisApproaches to Sentiment Analysis
Approaches to Sentiment AnalysisNihar Suryawanshi
 
Sentiment Analysis Using Product Review
Sentiment Analysis Using Product ReviewSentiment Analysis Using Product Review
Sentiment Analysis Using Product ReviewAbdullah Moin
 
NLP using transformers
NLP using transformers NLP using transformers
NLP using transformers Arvind Devaraj
 
Transformer Introduction (Seminar Material)
Transformer Introduction (Seminar Material)Transformer Introduction (Seminar Material)
Transformer Introduction (Seminar Material)Yuta Niki
 
Facial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approachFacial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approachAshwinRachha
 
Tweet sentiment analysis (Data mining)
Tweet sentiment analysis (Data mining)Tweet sentiment analysis (Data mining)
Tweet sentiment analysis (Data mining)Anil Shrestha
 
Introduction to Sentiment Analysis
Introduction to Sentiment AnalysisIntroduction to Sentiment Analysis
Introduction to Sentiment AnalysisJaganadh Gopinadhan
 
Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysisSunil Kandari
 

Was ist angesagt? (20)

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 using ml
Sentiment analysis using mlSentiment analysis using ml
Sentiment analysis using ml
 
Amazon Product Sentiment review
Amazon Product Sentiment reviewAmazon Product Sentiment review
Amazon Product Sentiment review
 
Question Answering System using machine learning approach
Question Answering System using machine learning approachQuestion Answering System using machine learning approach
Question Answering System using machine learning approach
 
Introduction to Transformer Model
Introduction to Transformer ModelIntroduction to Transformer Model
Introduction to Transformer Model
 
Sentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataSentiment Analysis using Twitter Data
Sentiment Analysis using Twitter Data
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis ppt
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis ppt
 
Movie Sentiment Analysis
Movie Sentiment AnalysisMovie Sentiment Analysis
Movie Sentiment Analysis
 
Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 
Approaches to Sentiment Analysis
Approaches to Sentiment AnalysisApproaches to Sentiment Analysis
Approaches to Sentiment Analysis
 
Sentiment Analysis Using Product Review
Sentiment Analysis Using Product ReviewSentiment Analysis Using Product Review
Sentiment Analysis Using Product Review
 
NLP using transformers
NLP using transformers NLP using transformers
NLP using transformers
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysis
 
Transformer Introduction (Seminar Material)
Transformer Introduction (Seminar Material)Transformer Introduction (Seminar Material)
Transformer Introduction (Seminar Material)
 
Facial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approachFacial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approach
 
Tweet sentiment analysis (Data mining)
Tweet sentiment analysis (Data mining)Tweet sentiment analysis (Data mining)
Tweet sentiment analysis (Data mining)
 
Introduction to Sentiment Analysis
Introduction to Sentiment AnalysisIntroduction to Sentiment Analysis
Introduction to Sentiment Analysis
 
Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysis
 

Andere mochten auch

Sentiments Analysis using Python and nltk
Sentiments Analysis using Python and nltk Sentiments Analysis using Python and nltk
Sentiments Analysis using Python and nltk Ashwin Perti
 
Sentiment analysis-by-nltk
Sentiment analysis-by-nltkSentiment analysis-by-nltk
Sentiment analysis-by-nltkWei-Ting Kuo
 
Tutorial of Sentiment Analysis
Tutorial of Sentiment AnalysisTutorial of Sentiment Analysis
Tutorial of Sentiment AnalysisFabio Benedetti
 
Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14Rachit Goel
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in TwitterAyushi Dalmia
 
Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Kavita Ganesan
 
Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...
Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...
Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...Diana Maynard
 
Paolo Rosso "On irony detection in social media"
Paolo Rosso "On irony detection in social media"Paolo Rosso "On irony detection in social media"
Paolo Rosso "On irony detection in social media"AINL Conferences
 
2005 Web Content Mining 4
2005 Web Content Mining   42005 Web Content Mining   4
2005 Web Content Mining 4George Ang
 
Summarization and opinion detection in product reviews
Summarization and opinion detection in product reviewsSummarization and opinion detection in product reviews
Summarization and opinion detection in product reviewspapanaboinasuman
 
NLP Asignment Final Presentation [IIT-Bombay]
NLP Asignment Final Presentation [IIT-Bombay]NLP Asignment Final Presentation [IIT-Bombay]
NLP Asignment Final Presentation [IIT-Bombay]Sagar Ahire
 
Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]
Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]
Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]Sagar Ahire
 
Feature specific analysis of reviews
Feature specific analysis of reviewsFeature specific analysis of reviews
Feature specific analysis of reviewsSubhabrata Mukherjee
 
NLP based Mining on Movie Critics
NLP based Mining on Movie Critics NLP based Mining on Movie Critics
NLP based Mining on Movie Critics supraja reddy
 
Text Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEText Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEDiana Maynard
 
Challenges of using Twitter for sentiment analysis
Challenges of using Twitter for sentiment analysisChallenges of using Twitter for sentiment analysis
Challenges of using Twitter for sentiment analysisAna Canhoto
 
Sentiments Improvement
Sentiments ImprovementSentiments Improvement
Sentiments ImprovementMisha Kozik
 

Andere mochten auch (20)

Sentiments Analysis using Python and nltk
Sentiments Analysis using Python and nltk Sentiments Analysis using Python and nltk
Sentiments Analysis using Python and nltk
 
Sentiment analysis-by-nltk
Sentiment analysis-by-nltkSentiment analysis-by-nltk
Sentiment analysis-by-nltk
 
Tutorial of Sentiment Analysis
Tutorial of Sentiment AnalysisTutorial of Sentiment Analysis
Tutorial of Sentiment Analysis
 
Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in Twitter
 
Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)Opinion Mining Tutorial (Sentiment Analysis)
Opinion Mining Tutorial (Sentiment Analysis)
 
sent_analysis_report
sent_analysis_reportsent_analysis_report
sent_analysis_report
 
Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...
Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...
Who cares about sarcastic tweets? Investigating the impact of sarcasm on sent...
 
Paolo Rosso "On irony detection in social media"
Paolo Rosso "On irony detection in social media"Paolo Rosso "On irony detection in social media"
Paolo Rosso "On irony detection in social media"
 
2005 Web Content Mining 4
2005 Web Content Mining   42005 Web Content Mining   4
2005 Web Content Mining 4
 
Summarization and opinion detection in product reviews
Summarization and opinion detection in product reviewsSummarization and opinion detection in product reviews
Summarization and opinion detection in product reviews
 
NLP Asignment Final Presentation [IIT-Bombay]
NLP Asignment Final Presentation [IIT-Bombay]NLP Asignment Final Presentation [IIT-Bombay]
NLP Asignment Final Presentation [IIT-Bombay]
 
Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]
Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]
Sarcasm & Thwarting in Sentiment Analysis [IIT-Bombay]
 
Feature specific analysis of reviews
Feature specific analysis of reviewsFeature specific analysis of reviews
Feature specific analysis of reviews
 
Python NLTK
Python NLTKPython NLTK
Python NLTK
 
NLP based Mining on Movie Critics
NLP based Mining on Movie Critics NLP based Mining on Movie Critics
NLP based Mining on Movie Critics
 
Science Festival 2011 Programme
Science Festival 2011 ProgrammeScience Festival 2011 Programme
Science Festival 2011 Programme
 
Text Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEText Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATE
 
Challenges of using Twitter for sentiment analysis
Challenges of using Twitter for sentiment analysisChallenges of using Twitter for sentiment analysis
Challenges of using Twitter for sentiment analysis
 
Sentiments Improvement
Sentiments ImprovementSentiments Improvement
Sentiments Improvement
 

Ähnlich wie Sentiment Analysis

Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingGeeks Anonymes
 
Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_EndgameInc
 
Introduction to Text Mining
Introduction to Text MiningIntroduction to Text Mining
Introduction to Text MiningMinha Hwang
 
Managing Next Generation Threats to Cyber Security
Managing Next Generation Threats to Cyber SecurityManaging Next Generation Threats to Cyber Security
Managing Next Generation Threats to Cyber SecurityPriyanka Aash
 
Data Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisData Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisAli BELCAID
 
Recommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmRecommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmVaibhav Varshney
 
Serendipity module in Item Recommender System
Serendipity module in Item Recommender SystemSerendipity module in Item Recommender System
Serendipity module in Item Recommender SystemMichele Filannino
 
From Human Intelligence to Machine Intelligence
From Human Intelligence to Machine IntelligenceFrom Human Intelligence to Machine Intelligence
From Human Intelligence to Machine IntelligenceNUS-ISS
 
NLP, Expert system and pattern recognition
NLP, Expert system and pattern recognitionNLP, Expert system and pattern recognition
NLP, Expert system and pattern recognitionMohammad Ilyas Malik
 
Exploratory Testing in a chaotic world to share
Exploratory Testing in a chaotic world   to shareExploratory Testing in a chaotic world   to share
Exploratory Testing in a chaotic world to shareDoron Bar
 
Exploratory Testing Explained
Exploratory Testing ExplainedExploratory Testing Explained
Exploratory Testing ExplainedTechWell
 
Empirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an OverviewEmpirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an Overviewalessio_ferrari
 
Deep learning introduction
Deep learning introductionDeep learning introduction
Deep learning introductionAdwait Bhave
 
"Hands Off! Best Practices for Code Hand Offs"
"Hands Off!  Best Practices for Code Hand Offs""Hands Off!  Best Practices for Code Hand Offs"
"Hands Off! Best Practices for Code Hand Offs"Naomi Dushay
 
WTF is Penetration Testing v.2
WTF is Penetration Testing v.2WTF is Penetration Testing v.2
WTF is Penetration Testing v.2Scott Sutherland
 
Jason Kent - AppSec Without Additional Tools
Jason Kent - AppSec Without Additional ToolsJason Kent - AppSec Without Additional Tools
Jason Kent - AppSec Without Additional Toolscentralohioissa
 
Exploratory testing
Exploratory testingExploratory testing
Exploratory testingHuib Schoots
 

Ähnlich wie Sentiment Analysis (20)

Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_
 
Introduction to Text Mining
Introduction to Text MiningIntroduction to Text Mining
Introduction to Text Mining
 
Managing Next Generation Threats to Cyber Security
Managing Next Generation Threats to Cyber SecurityManaging Next Generation Threats to Cyber Security
Managing Next Generation Threats to Cyber Security
 
Data Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisData Acquisition for Sentiment Analysis
Data Acquisition for Sentiment Analysis
 
Recommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmRecommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic Algorithm
 
Serendipity module in Item Recommender System
Serendipity module in Item Recommender SystemSerendipity module in Item Recommender System
Serendipity module in Item Recommender System
 
From Human Intelligence to Machine Intelligence
From Human Intelligence to Machine IntelligenceFrom Human Intelligence to Machine Intelligence
From Human Intelligence to Machine Intelligence
 
AI System.pptx
AI System.pptxAI System.pptx
AI System.pptx
 
NLP, Expert system and pattern recognition
NLP, Expert system and pattern recognitionNLP, Expert system and pattern recognition
NLP, Expert system and pattern recognition
 
Exploratory Testing in a chaotic world to share
Exploratory Testing in a chaotic world   to shareExploratory Testing in a chaotic world   to share
Exploratory Testing in a chaotic world to share
 
Exploratory Testing Explained
Exploratory Testing ExplainedExploratory Testing Explained
Exploratory Testing Explained
 
Unit Testing Your Application
Unit Testing Your ApplicationUnit Testing Your Application
Unit Testing Your Application
 
Empirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an OverviewEmpirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an Overview
 
Final presentation
Final presentationFinal presentation
Final presentation
 
Deep learning introduction
Deep learning introductionDeep learning introduction
Deep learning introduction
 
"Hands Off! Best Practices for Code Hand Offs"
"Hands Off!  Best Practices for Code Hand Offs""Hands Off!  Best Practices for Code Hand Offs"
"Hands Off! Best Practices for Code Hand Offs"
 
WTF is Penetration Testing v.2
WTF is Penetration Testing v.2WTF is Penetration Testing v.2
WTF is Penetration Testing v.2
 
Jason Kent - AppSec Without Additional Tools
Jason Kent - AppSec Without Additional ToolsJason Kent - AppSec Without Additional Tools
Jason Kent - AppSec Without Additional Tools
 
Exploratory testing
Exploratory testingExploratory testing
Exploratory testing
 

Mehr von Sagar Ahire

MTech Seminar Presentation [IIT-Bombay]
MTech Seminar Presentation [IIT-Bombay]MTech Seminar Presentation [IIT-Bombay]
MTech Seminar Presentation [IIT-Bombay]Sagar Ahire
 
Wordnet-Affect [IIT-Bombay]
Wordnet-Affect [IIT-Bombay]Wordnet-Affect [IIT-Bombay]
Wordnet-Affect [IIT-Bombay]Sagar Ahire
 
Sentiwordnet [IIT-Bombay]
Sentiwordnet [IIT-Bombay]Sentiwordnet [IIT-Bombay]
Sentiwordnet [IIT-Bombay]Sagar Ahire
 
Paper Presentation: HMM-based Alignment
Paper Presentation: HMM-based AlignmentPaper Presentation: HMM-based Alignment
Paper Presentation: HMM-based AlignmentSagar Ahire
 
Paper Presentation: A Pendulum Swung Too Far
Paper Presentation: A Pendulum Swung Too FarPaper Presentation: A Pendulum Swung Too Far
Paper Presentation: A Pendulum Swung Too FarSagar Ahire
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systemsSagar Ahire
 

Mehr von Sagar Ahire (6)

MTech Seminar Presentation [IIT-Bombay]
MTech Seminar Presentation [IIT-Bombay]MTech Seminar Presentation [IIT-Bombay]
MTech Seminar Presentation [IIT-Bombay]
 
Wordnet-Affect [IIT-Bombay]
Wordnet-Affect [IIT-Bombay]Wordnet-Affect [IIT-Bombay]
Wordnet-Affect [IIT-Bombay]
 
Sentiwordnet [IIT-Bombay]
Sentiwordnet [IIT-Bombay]Sentiwordnet [IIT-Bombay]
Sentiwordnet [IIT-Bombay]
 
Paper Presentation: HMM-based Alignment
Paper Presentation: HMM-based AlignmentPaper Presentation: HMM-based Alignment
Paper Presentation: HMM-based Alignment
 
Paper Presentation: A Pendulum Swung Too Far
Paper Presentation: A Pendulum Swung Too FarPaper Presentation: A Pendulum Swung Too Far
Paper Presentation: A Pendulum Swung Too Far
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systems
 

Sentiment Analysis

  • 1. Sentiment Analysis from Cellphone Reviews Sagar Ahire | 155 Preeti Singh | 178
  • 2. What is Sentiment Analysis? • Takes a block of text as input • Determines the sentiment expressed in it • “Sentiment” refers to whether the author’s opinion is positive or negative
  • 3. Disciplines Involved • Natural Language Processing • Data Mining • Artificial Intelligence
  • 4. What Sentiment Analysis is NOT • Does NOT use images anywhere (that is “emotion detection”) • Does NOT aim at evaluating the product itself, just the sentiment expressed by the reviewer
  • 5. Why Sentiment Analysis is challenging • Keywords are not usually direct “This phone is as modern as the one owned by Alexander Graham Bell” • Opinions expressed may belong to other people “Many people say iPhones are better than Androids” • Order Effects “This could have revolutionized phones for ever, but the bundled OS makes it an ultimate letdown” • Colloquial and domain-specific phrases “The phone runs a 1.2 GHz dual core processor”
  • 6. Project Overview • Aims to perform sentiment analysis on cellphone reviews • Rates the sentiment on a scale of 1 to 5 stars
  • 7. Inner Workings • Uses a corpus of several cellphone reviews (currently 33) • Trains a classifier using features, which may be: – Unigrams (Occurrences of single words) – Bigrams (Occurrences in pairs) – Adjectives only, etc. • Uses the classifier to classify unknown reviews
  • 9. Why Python? • Less code, more productivity • Flexible paradigms (functional, procedural, object-oriented, all in one) • Fast development cycle • Wide range of modules
  • 10. Diving In… • Modules used: – Python Standard Library (random, sys, etc) – nltk • Classifiers used: – Naïve Bayes
  • 11. Diving In… The Algorithm (Unigram Occurrences) 1. Take the entire corpus as input 2. Create a list ‘l’ of all documents, each labeled by its category (i.e., no of stars) 3. Extract the ‘n’ most frequent words in the entire corpus, cleaning up duplicates and non-alphabetic words
  • 12. Diving In… The Algorithm (Unigram Occurrences) 4. For every document in l: i. Create a dictionary d[l] ii. For each of the n frequent words, put a value in d[l] indicating presence or absence 5. Divide the dictionary into a training set and a testing set
  • 13. Diving In… The Algorithm (Unigram Occurrences) 6. Train a Naïve Bayes Classifier using the training set 7. Test the classifier using the testing set and report the accuracy
  • 14. Next Steps • Investigating the Maximum Entropy Classifier • Refining feature choice – Negation Tagging – Synonyms • Investigating Regression techniques
  • 15. Additional Applications of Sentiment Analysis • Filtering of SPAM or abusive e-mails • Gauging the mood of people in a particular network • Government intelligence • Psychological evaluation • Recommendation Systems • Display of ads on webpages
  • 16. “Sentiment is the poetry of the imagination.” - Alphonse de Lamartine