SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Sentiment Classification with
        RapidMiner




 Bruno Ohana and Brendan Tierney
     DIT School of Computing
            June 2011
Our Talk

 Introduction to Sentiment Analysis
 Supervised Learning Approaches
 Case Study with RapidMiner
Motivation
 “81% of US internet users (60 of population) have
                             60%
 used the internet to perform research on a product they
 intended to purchase, as of 2007.”

 “Over 30% of US internet users have at one time
          %
 posted a comment or online review about a product or
 service they’ve purchased.”
                                             (Horrigan, 2008)
Motivation
A lot of online content is subjective in nature.
  User Generated Content: Product reviews, blog
  posts, twitter, etc.
  epinions.com, Amazon, RottenTomatoes.com.
  Sheer volume of opinion data calls for automated
  analytical methods.
Why Are Automated Methods Relevant?
 Search and Recommendation Engines.
   Show me only positive/negative/neutral.

 Market Research.
   What is being said about brand X on Twitter?

 Contextual Ad Placement.

 Mediation of online communities.
A Growing Industry




 Opinion Mining offerings
   Voice of Customer analytics
   Social Media Monitoring
   SaaS or embedded in data mining packages
Opinion Mining – Sentiment Classification
  For a given Text Document, Determine Sentiment
  Orientation
      Positive or Negative, Favorable or Unfavorable, etc.
      Binary or along a scale (e.g. 1 stars)
                                    1-5
      Data is unstructured text format. From sentence to
      document level.

Ex: Positive or Negative?
“This is by far the worst hotel experience i've ever had. the owner
  overbooked while i was staying there (even though i booked the room
  two months in advance) and made me move to another room, but that
  room wasn't even a hotel room!”
Supervised Learning for Text
  Train a classifier algorithm based on a training
  data set.
     Raw data will be text.

  Approach: Use term presence information as
  features.
     A plain text document becomes a word vector.
Supervised Learning for Text
     A word vector can be used to train a classifier.
     Building a Word Vector
           Unit of tokenization: uni/bi/n
                                 uni/bi/n-gram
           Term presence metric
            Binary, tf-idf, frequency
                       idf,
           Stemming
           Stop Words Removal


                                        Word     Train Classifier
                 Tokenize   Stemming
                                        Vector



IMDB Data Set
  (Plain Text)
Opinion Mining – Sentiment Classification
Challenges of Data Driven Approaches

  Domain dependence.
     “chuck norris” might be a good sentiment
                   ”
     predictor, but on movies only
  We lose discourse information.
     Ex: negation detection
     “This comedy is not really funny.”
  NLP techniques might help.
RapidMiner Case Study
 Sentiment Classification based on Word Vectors.

 Convert Text data to Word Vectors
   Using RapidMiner’s Text Processing Extension.

 Use it to Train/Test a Learner Model.
   Using Cross-Validation.
   Using Correlation and Parameter Testing to pick better
   features.

 Our data set is a collection of Film reviews from IMDB
 presented in (Pang et al, 2004).
RapidMiner Case Study


                        Selects document collectio
                        From a directory.



                         From text to list of tokens




                         Convert word variations t
                         Their stem.
RapidMiner Case Study
              Parameter Testing
              - Filter “top K” most correlated attributes.
              - K is a macro iterated using Parameter
                Testing.
                Testing
RapidMiner Case Study
Cross Validation - Training Step.
   Calculate Attribute Weights and Normalize.
   Pass models on “through port” to Testing.
   Select “top k” attributes by weight and train SVM.
RapidMiner Case Study
Cross Validation – Testing Step
Case Study – Adding More Features
  Pre-Computed features based on text statistics.
      Computed
     Document, Word and Sentence Sizes, Part
                                           Part-of-speech
     Presence, Stop words ratio, Syllable Count.

  Features based on scoring using a sentiment lexicon.
    (Ohana & Tierney ‘09).
    Used SentiWordNet as the Lexicon (Esuli et al, 09).

  In RapidMiner we can merge those data sets using a
  known unique ID (File name in our case).
Opinion Lexicons
  Opinion Lexicons.
    A database of terms and opinion information they carry.
     Some terms and expressions carry “a priori” opinion
     bias, relatively independent from context.
       Ex: good, excellent, bad, poor.

  To build the data set:
     Score document based on terms found.
     Total positive/negative scores.
     Per part-of-speech.
     Per document section.
Lexicon Based Approach


                                                    Document Scores
                 POS     Negation
                                        Scoring      SWN Features
                Tagger   Detection



MDB Data Set
 (Plain Text)




                                     SentiWordNet
Part of Speech Tagging

 The computer-animated comedy " shrek " is designed to be enjoyed on
                 animated
 different levels by different groups . for children , it offers imaginative
 visuals , appealing new characters mixed with a host of familiar faces ,
 loads of action and a barrage of big laughs



  The/DT computer-animated/JJ comedy/NN ''/'' shrek/NN ''/'' is/VBZ
 designed/VBN to/TO be/VB enjoyed/VBN on/IN different/JJ levels/NNS by/IN
 different/JJ groups/NNS ./. for/IN children/NNS ,/, it/PRP offers/VBZ
 imaginative/JJ visuals/NNS ,/, appealing/VBG new/JJ characters/NNS
 mixed/VBN with/IN a/DT host/NN of/IN familiar/JJ faces/NNS ,/, loads/NNS of/IN
 action/NN and/CC a/DT barrage/NN of/IN big/JJ laughs/NNS
Negation Detection

 NegEx (Chapman et al ’01).
 Look for negating expressions
   Pseudo-negations.
     “no wonder”, “no change”, “not only”
   Forward and Backward Scope.
     “don’t”, “not”, “without”, “unlikely to”, etc…
Case Study – Adding More Features
  Data Set Merging
Results - Accuracy

Average Accuracy using 10-fold Cross
                          fold Cross-validation

Method                                    Accuracy %   Feature Count
Baseline word vector                      85.39        6739
Baseline less uncorrelated attributes     85.49        1800
Document Stats (S)                        68.73        22
SentiWordNet features (SWN)               67.40        39
Merging (S) + (N)                         72.79        61
Merging Baseline + (S) + (SWN) and        86.39        1800
removing uncorrelated attributes
Opinion Mining – Sentiment Classification
    Some results from the field (IMDB data set).

Method                               Accuracy   Source
Support Vector Machines and          77.10%     (Pang et al, 2002)
Bigrams word vector
Word Vector Naïve Bayes + Parts of   77.50%     (Salvetti et al, 2004)
Speech
Support Vector Machines and          82.90%     (Pang et al, 2002)
Unigrams word vector
Unigrams + Subjectivity Detection    87.15%     (Pang et al, 2004)
SVM + stylistic features             87.95%     (Abbasi et al, 2008)
SVM + GA feature selection           95.55%     (Abbasi et al, 2008)
Results – Term Correlation

                   Terms (after Stemming)
Most Correlated    didn, georg, add, wast, bore, guess, bad, son, stupid,
                   masterpiece, perform, stereotyp, if, adventur, oscar,
                   worst, blond, mediocr
Least Correlated   already, face, which, put, same, without, someth, must
                   manag, someon, talent, get, goe, sinc, abrupt
Thank You

Mais conteúdo relacionado

Mais procurados

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
 
LEPOR: an augmented machine translation evaluation metric - Thesis PPT
LEPOR: an augmented machine translation evaluation metric - Thesis PPT LEPOR: an augmented machine translation evaluation metric - Thesis PPT
LEPOR: an augmented machine translation evaluation metric - Thesis PPT
Lifeng (Aaron) Han
 

Mais procurados (20)

Semantic Patterns for Sentiment Analysis of Twitter
Semantic Patterns for Sentiment Analysis of TwitterSemantic Patterns for Sentiment Analysis of Twitter
Semantic Patterns for Sentiment Analysis of Twitter
 
Sentiment Analysis
Sentiment AnalysisSentiment Analysis
Sentiment Analysis
 
Automatic classification of remarks in Werewolf BBS
Automatic classification of remarks in Werewolf BBSAutomatic classification of remarks in Werewolf BBS
Automatic classification of remarks in Werewolf BBS
 
Sentiment analysis using naive bayes classifier
Sentiment analysis using naive bayes classifier Sentiment analysis using naive bayes classifier
Sentiment analysis using naive bayes classifier
 
sentiment analysis
sentiment analysis sentiment analysis
sentiment analysis
 
2 13
2 132 13
2 13
 
Sentiment Analysis on Twitter
Sentiment Analysis on TwitterSentiment Analysis on Twitter
Sentiment Analysis on Twitter
 
SentiCircles for Contextual and Conceptual Semantic Sentiment Analysis of Twi...
SentiCircles for Contextual and Conceptual Semantic Sentiment Analysis of Twi...SentiCircles for Contextual and Conceptual Semantic Sentiment Analysis of Twi...
SentiCircles for Contextual and Conceptual Semantic Sentiment Analysis of Twi...
 
Sentiment analysis of Twitter Data
Sentiment analysis of Twitter DataSentiment analysis of Twitter Data
Sentiment analysis of Twitter Data
 
Sentiment Analysis in Twitter with Lightweight Discourse Analysis
Sentiment Analysis in Twitter with Lightweight Discourse AnalysisSentiment Analysis in Twitter with Lightweight Discourse Analysis
Sentiment Analysis in Twitter with Lightweight Discourse Analysis
 
Sentence representations and question answering (YerevaNN)
Sentence representations and question answering (YerevaNN)Sentence representations and question answering (YerevaNN)
Sentence representations and question answering (YerevaNN)
 
IIT-TUDA at SemEval-2016 Task 5: Beyond Sentiment Lexicon: Combining Domain ...
IIT-TUDA at SemEval-2016 Task 5: Beyond Sentiment Lexicon: Combining Domain ...IIT-TUDA at SemEval-2016 Task 5: Beyond Sentiment Lexicon: Combining Domain ...
IIT-TUDA at SemEval-2016 Task 5: Beyond Sentiment Lexicon: Combining Domain ...
 
Sentiment Analysis Using Hybrid Structure of Machine Learning Algorithms
Sentiment Analysis Using Hybrid Structure of Machine Learning AlgorithmsSentiment Analysis Using Hybrid Structure of Machine Learning Algorithms
Sentiment Analysis Using Hybrid Structure of Machine Learning Algorithms
 
NLP based Mining on Movie Critics
NLP based Mining on Movie Critics NLP based Mining on Movie Critics
NLP based Mining on Movie Critics
 
Lac presentation
Lac presentationLac presentation
Lac presentation
 
Sentiment Analysis on Twitter
Sentiment Analysis on TwitterSentiment Analysis on Twitter
Sentiment Analysis on Twitter
 
LEPOR: an augmented machine translation evaluation metric - Thesis PPT
LEPOR: an augmented machine translation evaluation metric - Thesis PPT LEPOR: an augmented machine translation evaluation metric - Thesis PPT
LEPOR: an augmented machine translation evaluation metric - Thesis PPT
 
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
 
Data Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisData Acquisition for Sentiment Analysis
Data Acquisition for Sentiment Analysis
 
Topic extraction using machine learning
Topic extraction using machine learningTopic extraction using machine learning
Topic extraction using machine learning
 

Destaque

Sentiment analysis of arabic,a survey
Sentiment analysis of arabic,a surveySentiment analysis of arabic,a survey
Sentiment analysis of arabic,a survey
Arabic_NLP_ImamU2013
 
Arabic Text mining Classification
Arabic Text mining Classification Arabic Text mining Classification
Arabic Text mining Classification
Zakaria Zubi
 
Unstructured Data and the Enterprise
Unstructured Data and the EnterpriseUnstructured Data and the Enterprise
Unstructured Data and the Enterprise
DATAVERSITY
 
Semi structure data extraction
Semi structure data extractionSemi structure data extraction
Semi structure data extraction
R A Akerkar
 
Recorded Future News Analytics for Financial Services
Recorded Future News Analytics for Financial ServicesRecorded Future News Analytics for Financial Services
Recorded Future News Analytics for Financial Services
Chris Holden
 
Optimizing Usage Analysis During Implementation Of Social Media Systems
Optimizing Usage Analysis During Implementation Of Social Media SystemsOptimizing Usage Analysis During Implementation Of Social Media Systems
Optimizing Usage Analysis During Implementation Of Social Media Systems
Martin Rückert
 

Destaque (20)

Sentiment Analysis for Arabic tweets
Sentiment Analysis for Arabic tweetsSentiment Analysis for Arabic tweets
Sentiment Analysis for Arabic tweets
 
Sentiment analysis of arabic,a survey
Sentiment analysis of arabic,a surveySentiment analysis of arabic,a survey
Sentiment analysis of arabic,a survey
 
Arabic Text mining Classification
Arabic Text mining Classification Arabic Text mining Classification
Arabic Text mining Classification
 
Arabic tokenization and stemming
Arabic tokenization and  stemmingArabic tokenization and  stemming
Arabic tokenization and stemming
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 
Sentiment Classification with Case-Based Reasoning
Sentiment Classification with Case-Based ReasoningSentiment Classification with Case-Based Reasoning
Sentiment Classification with Case-Based Reasoning
 
Introduction to R Package Recommendation System Competition
Introduction to R Package Recommendation System CompetitionIntroduction to R Package Recommendation System Competition
Introduction to R Package Recommendation System Competition
 
Integrating Structure and Analytics with Unstructured Data
Integrating Structure and Analytics with Unstructured DataIntegrating Structure and Analytics with Unstructured Data
Integrating Structure and Analytics with Unstructured Data
 
RCOMM 2011 - Sentiment Classification
RCOMM 2011 - Sentiment ClassificationRCOMM 2011 - Sentiment Classification
RCOMM 2011 - Sentiment Classification
 
Unstructured Data and the Enterprise
Unstructured Data and the EnterpriseUnstructured Data and the Enterprise
Unstructured Data and the Enterprise
 
Semi structure data extraction
Semi structure data extractionSemi structure data extraction
Semi structure data extraction
 
Installing R and R-Studio
Installing R and R-StudioInstalling R and R-Studio
Installing R and R-Studio
 
Mengenal Rapidminer
Mengenal RapidminerMengenal Rapidminer
Mengenal Rapidminer
 
Rudi hartanto tutorial 04 rapid miner 5.3 k-means
Rudi hartanto   tutorial 04 rapid miner 5.3 k-meansRudi hartanto   tutorial 04 rapid miner 5.3 k-means
Rudi hartanto tutorial 04 rapid miner 5.3 k-means
 
R-Studio Vs. Rcmdr
R-Studio Vs. RcmdrR-Studio Vs. Rcmdr
R-Studio Vs. Rcmdr
 
Netbase AMA Sentiment Analysis Presentation
Netbase AMA Sentiment Analysis PresentationNetbase AMA Sentiment Analysis Presentation
Netbase AMA Sentiment Analysis Presentation
 
Rudi hartanto tutorial 01 rapid miner 5.3 decision tree
Rudi hartanto   tutorial 01 rapid miner 5.3 decision treeRudi hartanto   tutorial 01 rapid miner 5.3 decision tree
Rudi hartanto tutorial 01 rapid miner 5.3 decision tree
 
isMOOD: Listening to the customers’ voice through social network analytics
isMOOD: Listening to the customers’ voice through social network analyticsisMOOD: Listening to the customers’ voice through social network analytics
isMOOD: Listening to the customers’ voice through social network analytics
 
Recorded Future News Analytics for Financial Services
Recorded Future News Analytics for Financial ServicesRecorded Future News Analytics for Financial Services
Recorded Future News Analytics for Financial Services
 
Optimizing Usage Analysis During Implementation Of Social Media Systems
Optimizing Usage Analysis During Implementation Of Social Media SystemsOptimizing Usage Analysis During Implementation Of Social Media Systems
Optimizing Usage Analysis During Implementation Of Social Media Systems
 

Semelhante a RCOMM 2011 - Sentiment Classification with RapidMiner

Mining Product Reputations On the Web
Mining Product Reputations On the WebMining Product Reputations On the Web
Mining Product Reputations On the Web
feiwin
 
Proceedings Template - WORD
Proceedings Template - WORDProceedings Template - WORD
Proceedings Template - WORD
butest
 
2005 Web Content Mining 4
2005 Web Content Mining   42005 Web Content Mining   4
2005 Web Content Mining 4
George Ang
 

Semelhante a RCOMM 2011 - Sentiment Classification with RapidMiner (20)

IRJET- Survey of Classification of Business Reviews using Sentiment Analysis
IRJET- Survey of Classification of Business Reviews using Sentiment AnalysisIRJET- Survey of Classification of Business Reviews using Sentiment Analysis
IRJET- Survey of Classification of Business Reviews using Sentiment Analysis
 
Supervised Sentiment Classification using DTDP algorithm
Supervised Sentiment Classification using DTDP algorithmSupervised Sentiment Classification using DTDP algorithm
Supervised Sentiment Classification using DTDP algorithm
 
Mining Product Reputations On the Web
Mining Product Reputations On the WebMining Product Reputations On the Web
Mining Product Reputations On the Web
 
Proceedings Template - WORD
Proceedings Template - WORDProceedings Template - WORD
Proceedings Template - WORD
 
A SURVEY OF SENTIMENT CLASSSIFICTION TECHNIQUES
A SURVEY OF SENTIMENT CLASSSIFICTION TECHNIQUESA SURVEY OF SENTIMENT CLASSSIFICTION TECHNIQUES
A SURVEY OF SENTIMENT CLASSSIFICTION TECHNIQUES
 
REVIEW PPT.pptx
REVIEW PPT.pptxREVIEW PPT.pptx
REVIEW PPT.pptx
 
Analyse de sentiment et classification par approche neuronale en Python et Weka
Analyse de sentiment et classification par approche neuronale en Python et WekaAnalyse de sentiment et classification par approche neuronale en Python et Weka
Analyse de sentiment et classification par approche neuronale en Python et Weka
 
Imtiaz khan data_science_analytics
Imtiaz khan data_science_analyticsImtiaz khan data_science_analytics
Imtiaz khan data_science_analytics
 
Sentiment+Analysis.ppt
Sentiment+Analysis.pptSentiment+Analysis.ppt
Sentiment+Analysis.ppt
 
DEEP LEARNING SENTIMENT ANALYSIS OF AMAZON.COM REVIEWS AND RATINGS
DEEP LEARNING SENTIMENT ANALYSIS OF AMAZON.COM REVIEWS AND RATINGSDEEP LEARNING SENTIMENT ANALYSIS OF AMAZON.COM REVIEWS AND RATINGS
DEEP LEARNING SENTIMENT ANALYSIS OF AMAZON.COM REVIEWS AND RATINGS
 
From Linked Data to Semantic Applications
From Linked Data to Semantic ApplicationsFrom Linked Data to Semantic Applications
From Linked Data to Semantic Applications
 
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
 
Veda Semantics - introduction document
Veda Semantics - introduction documentVeda Semantics - introduction document
Veda Semantics - introduction document
 
TasteWeights: Visual Interactive Hybrid Recommendations
TasteWeights: Visual Interactive Hybrid RecommendationsTasteWeights: Visual Interactive Hybrid Recommendations
TasteWeights: Visual Interactive Hybrid Recommendations
 
Overfitting and-tbl
Overfitting and-tblOverfitting and-tbl
Overfitting and-tbl
 
Sentiment Analysis Using Hybrid Approach: A Survey
Sentiment Analysis Using Hybrid Approach: A SurveySentiment Analysis Using Hybrid Approach: A Survey
Sentiment Analysis Using Hybrid Approach: A Survey
 
A Multifaceted Look At Faceting - Ted Sullivan, Lucidworks
A Multifaceted Look At Faceting - Ted Sullivan, LucidworksA Multifaceted Look At Faceting - Ted Sullivan, Lucidworks
A Multifaceted Look At Faceting - Ted Sullivan, Lucidworks
 
Fyp ca2
Fyp ca2Fyp ca2
Fyp ca2
 
Siddhesh Dilip Rumde Resume
Siddhesh Dilip Rumde ResumeSiddhesh Dilip Rumde Resume
Siddhesh Dilip Rumde Resume
 
2005 Web Content Mining 4
2005 Web Content Mining   42005 Web Content Mining   4
2005 Web Content Mining 4
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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...
 
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
 
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?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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...
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 

RCOMM 2011 - Sentiment Classification with RapidMiner

  • 1. Sentiment Classification with RapidMiner Bruno Ohana and Brendan Tierney DIT School of Computing June 2011
  • 2. Our Talk Introduction to Sentiment Analysis Supervised Learning Approaches Case Study with RapidMiner
  • 3. Motivation “81% of US internet users (60 of population) have 60% used the internet to perform research on a product they intended to purchase, as of 2007.” “Over 30% of US internet users have at one time % posted a comment or online review about a product or service they’ve purchased.” (Horrigan, 2008)
  • 4. Motivation A lot of online content is subjective in nature. User Generated Content: Product reviews, blog posts, twitter, etc. epinions.com, Amazon, RottenTomatoes.com. Sheer volume of opinion data calls for automated analytical methods.
  • 5. Why Are Automated Methods Relevant? Search and Recommendation Engines. Show me only positive/negative/neutral. Market Research. What is being said about brand X on Twitter? Contextual Ad Placement. Mediation of online communities.
  • 6. A Growing Industry Opinion Mining offerings Voice of Customer analytics Social Media Monitoring SaaS or embedded in data mining packages
  • 7. Opinion Mining – Sentiment Classification For a given Text Document, Determine Sentiment Orientation Positive or Negative, Favorable or Unfavorable, etc. Binary or along a scale (e.g. 1 stars) 1-5 Data is unstructured text format. From sentence to document level. Ex: Positive or Negative? “This is by far the worst hotel experience i've ever had. the owner overbooked while i was staying there (even though i booked the room two months in advance) and made me move to another room, but that room wasn't even a hotel room!”
  • 8. Supervised Learning for Text Train a classifier algorithm based on a training data set. Raw data will be text. Approach: Use term presence information as features. A plain text document becomes a word vector.
  • 9. Supervised Learning for Text A word vector can be used to train a classifier. Building a Word Vector Unit of tokenization: uni/bi/n uni/bi/n-gram Term presence metric Binary, tf-idf, frequency idf, Stemming Stop Words Removal Word Train Classifier Tokenize Stemming Vector IMDB Data Set (Plain Text)
  • 10. Opinion Mining – Sentiment Classification Challenges of Data Driven Approaches Domain dependence. “chuck norris” might be a good sentiment ” predictor, but on movies only We lose discourse information. Ex: negation detection “This comedy is not really funny.” NLP techniques might help.
  • 11. RapidMiner Case Study Sentiment Classification based on Word Vectors. Convert Text data to Word Vectors Using RapidMiner’s Text Processing Extension. Use it to Train/Test a Learner Model. Using Cross-Validation. Using Correlation and Parameter Testing to pick better features. Our data set is a collection of Film reviews from IMDB presented in (Pang et al, 2004).
  • 12. RapidMiner Case Study Selects document collectio From a directory. From text to list of tokens Convert word variations t Their stem.
  • 13. RapidMiner Case Study Parameter Testing - Filter “top K” most correlated attributes. - K is a macro iterated using Parameter Testing. Testing
  • 14. RapidMiner Case Study Cross Validation - Training Step. Calculate Attribute Weights and Normalize. Pass models on “through port” to Testing. Select “top k” attributes by weight and train SVM.
  • 15. RapidMiner Case Study Cross Validation – Testing Step
  • 16. Case Study – Adding More Features Pre-Computed features based on text statistics. Computed Document, Word and Sentence Sizes, Part Part-of-speech Presence, Stop words ratio, Syllable Count. Features based on scoring using a sentiment lexicon. (Ohana & Tierney ‘09). Used SentiWordNet as the Lexicon (Esuli et al, 09). In RapidMiner we can merge those data sets using a known unique ID (File name in our case).
  • 17. Opinion Lexicons Opinion Lexicons. A database of terms and opinion information they carry. Some terms and expressions carry “a priori” opinion bias, relatively independent from context. Ex: good, excellent, bad, poor. To build the data set: Score document based on terms found. Total positive/negative scores. Per part-of-speech. Per document section.
  • 18. Lexicon Based Approach Document Scores POS Negation Scoring SWN Features Tagger Detection MDB Data Set (Plain Text) SentiWordNet
  • 19. Part of Speech Tagging The computer-animated comedy " shrek " is designed to be enjoyed on animated different levels by different groups . for children , it offers imaginative visuals , appealing new characters mixed with a host of familiar faces , loads of action and a barrage of big laughs The/DT computer-animated/JJ comedy/NN ''/'' shrek/NN ''/'' is/VBZ designed/VBN to/TO be/VB enjoyed/VBN on/IN different/JJ levels/NNS by/IN different/JJ groups/NNS ./. for/IN children/NNS ,/, it/PRP offers/VBZ imaginative/JJ visuals/NNS ,/, appealing/VBG new/JJ characters/NNS mixed/VBN with/IN a/DT host/NN of/IN familiar/JJ faces/NNS ,/, loads/NNS of/IN action/NN and/CC a/DT barrage/NN of/IN big/JJ laughs/NNS
  • 20. Negation Detection NegEx (Chapman et al ’01). Look for negating expressions Pseudo-negations. “no wonder”, “no change”, “not only” Forward and Backward Scope. “don’t”, “not”, “without”, “unlikely to”, etc…
  • 21. Case Study – Adding More Features Data Set Merging
  • 22. Results - Accuracy Average Accuracy using 10-fold Cross fold Cross-validation Method Accuracy % Feature Count Baseline word vector 85.39 6739 Baseline less uncorrelated attributes 85.49 1800 Document Stats (S) 68.73 22 SentiWordNet features (SWN) 67.40 39 Merging (S) + (N) 72.79 61 Merging Baseline + (S) + (SWN) and 86.39 1800 removing uncorrelated attributes
  • 23. Opinion Mining – Sentiment Classification Some results from the field (IMDB data set). Method Accuracy Source Support Vector Machines and 77.10% (Pang et al, 2002) Bigrams word vector Word Vector Naïve Bayes + Parts of 77.50% (Salvetti et al, 2004) Speech Support Vector Machines and 82.90% (Pang et al, 2002) Unigrams word vector Unigrams + Subjectivity Detection 87.15% (Pang et al, 2004) SVM + stylistic features 87.95% (Abbasi et al, 2008) SVM + GA feature selection 95.55% (Abbasi et al, 2008)
  • 24. Results – Term Correlation Terms (after Stemming) Most Correlated didn, georg, add, wast, bore, guess, bad, son, stupid, masterpiece, perform, stereotyp, if, adventur, oscar, worst, blond, mediocr Least Correlated already, face, which, put, same, without, someth, must manag, someon, talent, get, goe, sinc, abrupt