SlideShare a Scribd company logo
1 of 50
Download to read offline
Sentiment Analysis
Lina Alhuri
Laalhuri@gmail.com
twitter.com/DscTaibah
28
•Identify the orientation of opinion in a piece of text .
•it is something human do.
•Can be generalized to a wider set of emotions
What is SA
The movie
was fabulous!
The movie
stars Mr. X
The movie
was horrible!
“Headlong’s adaptation of George Orwell’s ‘Nineteen Eighty-Four’ is such a sense-overloadingly visceral experience
that it was only the second time around, as it transfers to the West End, that I realised quite how political it was.
Writer-directors […] have reconfigured Orwell’s plot, making it less about Stalinism, more about state-sponsored
torture. Which makes great, queasy theatre, as Sam Crane’s frail Winston stumbles through 101 minutes of
disorientating flashbacks, agonising reminisce, blinding lights, distorted roars, walls that explode in hails of sparks,
[…] and the almost-too-much-to-bear Room 101 section, which churns past like ‘The Prisoner’ relocated to
Guantanamo Bay.
[…] Crane’s traumatised Winston lives in two strangely overlapping time zones – 1984 and an unspecified present
day. The former, with its two-minute hate and its sexcrime and its Ministry of Love, clearly never happened. But the
present day version, in which a shattered Winston groggily staggers through a 'normal' but entirely indifferent
world, is plausible. Any individual who has crossed the state – and there are some obvious examples – could go
through what Orwell’s Winston went through. Second time out, it feels like an angrier and more emotionally
righteous play.
Some weaknesses become more apparent second time too.”
Is sentiment really but ?
neutral
positive
negative?
Neutral?
5
More than binary (example)
• Opinion mining
• Sentiment analysis
• Sentiment mining
• Subjectivity detection
• ...
• Often used synonymously
• Some shadings in meaning
• “sentiment analysis“ describes the current mainstream task
best 🡪 I‘ll use this term.
A field of study with many names
•Sentiment
• A thought, view, or attitude, especially one based mainly on
emotion instead of reason
•Sentiment Analysis
• aka opinion mining
• use of natural language processing (NLP) and computational
techniques to automate the extraction or classification of
sentiment from typically unstructured text
Terms
• Consumer information
• Product reviews
• Marketing
• Consumer attitudes
• Trends
• Politics
• Politicians want to know voters’ views
• Voters want to know policitians’ stances and who else supports them
• Social
• Find like-minded individuals or communities
Motivation
•Knowing sentiment is a very natural ability of a human being.
Can a machine be trained to do it?
•SA aims at getting sentiment-related knowledge especially from
the huge amount of information on the internet
•Can be generally used to understand opinion in a set of
documents
Motivation
Tripod of Sentiment Analysis
Cognitive
Science
Natural
Language
Processing
Machine
Learning
Sentiment
Analysis
Natural
Language
Processing
Machine
Learning
•community
•another person
•user / author
•document
•sentence or clause
•aspect (e.g. product feature)
The unit of analysis
“What makes
people happy“
example
Phone example
•Review sites
•Blogs
•News
•Microblogs
Data sources
From Tsytsarau & Palpanas (2012)
Approaches
•Machine learning
• Naïve Bayes
• SVM
• Deep learning
•Unsupervised methods
• Use lexicons
•Hybrid solutions
•Each has advantages and disadvantages…
Approaches
•‘Learn by example’ paradigm
• Provide an algorithm with lots of examples
• Documents that have been manually/semi-automatically annotated with a
category
• Supervised learning
• In our case: e.g., positive/negative reviews
• Algorithm extracts characteristic patterns for each category and
builds a predictive model
• Apply model to new text -> get prediction
Machine-Learning (ML) solutions
• Basic approach:
1. Get manually annotated documents from the domain you are interested in.
• e.g., positive and negative reviews of electronics products
• This will be your training corpus
2. Train any standard classifier using bag-of-words as features
• Typical classifiers: Support Vector Machines (SVMs), Naïve Bayes, Maximum Entropy
• Naïve Bayes are super-easy to implement from scratch
• Don’t try to implement SVMs yourself! Use existing implementations: SVMlight
, LibSVM or
LibLinear (for larger datasets). Use linear kernels
• Use boolean features not frequency-based
3. Apply trained classifier to test corpus or application
• If you want to predict a rating, e.g., 1-5 stars [20]
• Same as above, but use multi-class classification or regression:
• Linear Regression, Support Vector Regression
Machine-Learning solutions
• Bag-of-words document representation: document -> vector
• Example:
d1
=“good average excellent good”
d2
=“okay good average fine”
d3
=“good okay okay”
• Then Vocabulary={“good”, “average”, “excellent”, “fine”, “okay”} and d1
will be represented as:
• d1
={2,1,1,0,0} if features are frequently-based or
• d1
={1,1,1,0,0} if boolean-based
• Problems:
• Order of tokens is lost
• Long-distance relationships are lost
• “Avengers was a good movie, but Iron Man sucked!”
Crash-course on ML for document
classification
Documents in a Vector Space - Classification
Sec.14.1
negative
positive
Test document; which category?
Documents in a Vector Space - Classification
Sec.14.1
Example: k-Nearest Neighbours Example: Support Vector Machines
20
Classes
• positive, negative, both, neutral
Lexicon solutions
Corpus
Lexicon
Neutral
or
Polar?
Step 1
Contextual
Polarity?
Step 2
All
Instances
Polar
Instances
19,506 5,671
• Detect emotion in two independent dimensions:
• Positive: Dpos
: {1, 2,… 5}
• Negative: Dneg
: {-5, -4,… -1}
• (optional) Predict overall polarity by comparing them :
• If Dpos
> |Dneg
| then positive
• Example: “He is brilliant but boring”
• Emotion(‘brilliant’)=+3
• Emotion(‘boring’)=-2
• Negation detection: “He isn’t brilliant and he is boring”
• Emotion(NOT ‘brilliant’) = -2
• Decreased by 1 and sign reversed
(Basic) lexicon-based approach
Dpos
=+3, Dneg
=-2 => positive
Dpos
=+1 (default), Dneg
=-3 => negative
SentiWordNet
SauDiSenti
•Lexical resource for sentiment analysis
•Saudi dialect lexicon.
•Lexicons + Machine-Learning, e.g., SELC (SElf-Supervised,
Lexicon-based and Corpus-based) [11]
Hybrid solutions
Aspect based analysis
•As discussed, often the Opinion Object comprises of different
aspects
• e.g., camera: lens, quality, weight.
•Often, such an aspect-based analysis is more valuable than a
general +/-
•Automatic extraction of those features is possible by:
• Building Ontology Trees [25]
Aspect-based Opinion Analysis
26
•Advantages:
• Tend to attain good predictive accuracy
•Disadvantages:
• Need for training corpus
• Solution: automated extraction (e.g., Amazon reviews, Rotten Tomatoes) or
crowdsourcing the annotation process (e.g., Mechanical Turk)
• Domain sensitivity
• Trained models are well-fitted to particular product category (e.g., electronics)
but underperform if applied to other categories (e.g., movies)
• Solution: train a lot of domain-specific models or apply domain-adaptation
techniques
• Particularly for Opinion Retrieval, you’ll also need to identify the domain of the
query!
Pros/Cons of the approach
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone. We
called each other when we
got home. The voice on my
phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy yesterday.
Small phone – small battery
life.
Aspect-oriented sentiment analysis:
It‘s not ALL good or bad
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone.
We called each other when
we got home. The voice on
my phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy yesterday.
Small phone – small battery
life.
Objects, aspects, opinions (1)
• Object identification
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone.
We called each other when
we got home. The voice on
my phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy yesterday.
Small phone – small battery
life.
Objects, aspects, opinions (2)
• Object identification
• Aspect extraction
•Basic idea: POS and co-occurrence
• find frequent nouns / noun phrases
• find the opinion words associated with them (from a dictionary: e.g. for
positive good, clear, amazing)
Find only the aspects belonging to the high-level
object
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone. We
called each other when we
got home. The voice on my
phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy yesterday.
Small phone – small battery
life.
Objects, aspects, opinions (3)
• Object identification
• Aspect extraction
• Grouping synonyms
•General-purpose lexical resources provide synonym
links
•E.g. Wordnet
•But: domain-dependent:
• Movie reviews: movie ~ film
• Camera reviews: movie 🡪 video; picture 🡪 photos
Grouping synonyms
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone. We
called each other when we
got home. The voice on my
phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy yesterday.
Small phone – small battery
life.
Objects, aspects, opinions (4a)
• Object identification
• Aspect extraction
• Grouping synonyms
• Opinion orientation
classification
Yesterday, I bought a
Nokia phone and my
girlfriend bought a
moto phone. We called
each other when we got
home. The voice on my
phone was not clear.
The camera was good.
My girlfriend said the
sound of her phone was
clear. I wanted a phone
with good voice quality.
So I was satisfied and
returned the phone to
BestBuy yesterday.
Objects, aspects, opinions (4b)
• Object identification
• Aspect extraction
• Grouping synonyms
• Opinion orientation
classification
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone. We
called each other when we
got home. The voice on my
phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy yesterday.
Small phone – small battery
life.
Objects, aspects, opinions (5)
• Object identification
• Aspect extraction
• Grouping synonyms
• Opinion orientation
classification
• Integration / coreference
resolution
Yesterday, I bought a Nokia
phone and my girlfriend
bought a moto phone. We
called each other when we
got home. The voice on my
phone was not clear. The
camera was good. My
girlfriend said the sound of
her phone was clear. I
wanted a phone with good
voice quality. So I was
satisfied and returned the
phone to BestBuy
yesterday.
Small phone – small battery
life.
Not all sentences/clauses carry sentiment
• Neutral sentiment
Applications
•Review-related analysis
•Developing ‘hate mail filters’ analogous
to ‘spam mail filters’
Applications
Meet sentiment analysis (1) (buzzilions.com)
Politics
Public Opinion Tracking
Market
Monitoring of public opinion on Twitter for the keyword “milk”.
Spike occurs on 8/4/2011 after a series of deaths in China relating to bad quality milk (source)
Challenges
• Subtle ways of expressing private states
• “If you are reading this because it is your darling fragrance, please wear it at home
exclusively and tape the windows shut” No negative words
• “Miss Austen is not a poetess” Fact or opinion?
• “Yeah, sure!” Irony
• “I feel blue” vs “The sky is blue” Idioms
• “If you thought this was going to be a good movie, this isn’t your day” Negation
• Informal language
• 90+% of language used in some social platforms deviates from standard English [3]
• “wuddup ,droppin, sum, cuzz luv, u”
Challenges (I)
• “This film should be brilliant. It sounds like a great plot, the actors are
first grade, and the supporting cast is good as well, and Stallone is
attempting to deliver a good performance. However, it can’t hold up”
Opinion reversal
• “I bought an iPhone a few days ago. It was such a nice phone. The
touch screen was really cool. The voice quality was clear too.
Although the battery life was not long, that is ok for me. However, my
mother was mad with me… ” Topic drift
• Domain/context dependence
• words/phrases can mean different things in different contexts and domains
• This technology is crazy… the patient is going crazy
Challenges (II)
•Very popular data source
• Mostly public messages
• API
• But: opaque sampling (“the best 1%“)
•Vocabulary, grammar
:‘( …. I am dying
•Length restriction
Special challenges in Tweets
Practical
•Thank you
•for listening
Join to DSC TU:
28
twitter.com/DscTaibah
Follow us
https://forms.gle/rNJiwgj6JsVxqG6o8
Check in

More Related Content

Similar to SENTIMENT ANALYSIS TITLE

How to answer a media exam question... Kind of
How to answer a media exam question... Kind ofHow to answer a media exam question... Kind of
How to answer a media exam question... Kind ofJack Wentworth-Weedon
 
Evaluation of research and planning 2
Evaluation of research and planning 2Evaluation of research and planning 2
Evaluation of research and planning 2ddelargy
 
Opinion mining for social media
Opinion mining for social mediaOpinion mining for social media
Opinion mining for social mediaDiana Maynard
 
Personal Study Essay Research Document Pro Forma.pptx
Personal Study Essay Research Document Pro Forma.pptxPersonal Study Essay Research Document Pro Forma.pptx
Personal Study Essay Research Document Pro Forma.pptxxIDawnIx
 
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.pptaashnareddy1
 
Sentiment analysis in machine learning using python
Sentiment analysis in machine learning using pythonSentiment analysis in machine learning using python
Sentiment analysis in machine learning using pythonamansharma22dec
 
Data Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisData Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisAli BELCAID
 
Natural Language Processing Advancements By Deep Learning - A Survey
Natural Language Processing Advancements By Deep Learning - A SurveyNatural Language Processing Advancements By Deep Learning - A Survey
Natural Language Processing Advancements By Deep Learning - A SurveyAkshayaNagarajan10
 
Data science for advanced dummies
Data science for advanced dummiesData science for advanced dummies
Data science for advanced dummiesSaurav Chakravorty
 
Recommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmRecommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmVaibhav Varshney
 
Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...
Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...
Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...hajinouha0
 
What Questions Are Worth Answering?
What Questions Are Worth Answering?What Questions Are Worth Answering?
What Questions Are Worth Answering?Ehren Reilly
 
Sentiment Analysis
Sentiment AnalysisSentiment Analysis
Sentiment Analysisharit66
 
Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012
Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012
Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012TEST Huddle
 
Linking UX Ideas for an Aha Moment from Non-Empathizers
Linking UX Ideas for an Aha Moment from Non-EmpathizersLinking UX Ideas for an Aha Moment from Non-Empathizers
Linking UX Ideas for an Aha Moment from Non-EmpathizersBalanced Team
 
Accu2014 Imagination in Software Development
Accu2014 Imagination in Software DevelopmentAccu2014 Imagination in Software Development
Accu2014 Imagination in Software Developmentcharlestolman
 

Similar to SENTIMENT ANALYSIS TITLE (20)

How to answer a media exam question... Kind of
How to answer a media exam question... Kind ofHow to answer a media exam question... Kind of
How to answer a media exam question... Kind of
 
Evaluation of research and planning 2
Evaluation of research and planning 2Evaluation of research and planning 2
Evaluation of research and planning 2
 
Opinion mining for social media
Opinion mining for social mediaOpinion mining for social media
Opinion mining for social media
 
Personal Study Essay Research Document Pro Forma.pptx
Personal Study Essay Research Document Pro Forma.pptxPersonal Study Essay Research Document Pro Forma.pptx
Personal Study Essay Research Document Pro Forma.pptx
 
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.ppt
 
sa.ppt
sa.pptsa.ppt
sa.ppt
 
Sentiment analysis in machine learning using python
Sentiment analysis in machine learning using pythonSentiment analysis in machine learning using python
Sentiment analysis in machine learning using python
 
Data Acquisition for Sentiment Analysis
Data Acquisition for Sentiment AnalysisData Acquisition for Sentiment Analysis
Data Acquisition for Sentiment Analysis
 
Natural Language Processing Advancements By Deep Learning - A Survey
Natural Language Processing Advancements By Deep Learning - A SurveyNatural Language Processing Advancements By Deep Learning - A Survey
Natural Language Processing Advancements By Deep Learning - A Survey
 
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.ppt
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysis
 
Data science for advanced dummies
Data science for advanced dummiesData science for advanced dummies
Data science for advanced dummies
 
Recommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmRecommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic Algorithm
 
Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...
Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...
Sld-Natural-Language-Processing-for-large-volumes-of-human-text-data-Sozzi-Br...
 
What Questions Are Worth Answering?
What Questions Are Worth Answering?What Questions Are Worth Answering?
What Questions Are Worth Answering?
 
Sentiment Analysis
Sentiment AnalysisSentiment Analysis
Sentiment Analysis
 
Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012
Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012
Michael Bolton - Testing Through The Qualitive Lens - EuroSTAR 2012
 
Linking UX Ideas for an Aha Moment from Non-Empathizers
Linking UX Ideas for an Aha Moment from Non-EmpathizersLinking UX Ideas for an Aha Moment from Non-Empathizers
Linking UX Ideas for an Aha Moment from Non-Empathizers
 
Accu2014 Imagination in Software Development
Accu2014 Imagination in Software DevelopmentAccu2014 Imagination in Software Development
Accu2014 Imagination in Software Development
 
Conference Speaking 101
Conference Speaking 101Conference Speaking 101
Conference Speaking 101
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 

SENTIMENT ANALYSIS TITLE

  • 3. •Identify the orientation of opinion in a piece of text . •it is something human do. •Can be generalized to a wider set of emotions What is SA The movie was fabulous! The movie stars Mr. X The movie was horrible!
  • 4. “Headlong’s adaptation of George Orwell’s ‘Nineteen Eighty-Four’ is such a sense-overloadingly visceral experience that it was only the second time around, as it transfers to the West End, that I realised quite how political it was. Writer-directors […] have reconfigured Orwell’s plot, making it less about Stalinism, more about state-sponsored torture. Which makes great, queasy theatre, as Sam Crane’s frail Winston stumbles through 101 minutes of disorientating flashbacks, agonising reminisce, blinding lights, distorted roars, walls that explode in hails of sparks, […] and the almost-too-much-to-bear Room 101 section, which churns past like ‘The Prisoner’ relocated to Guantanamo Bay. […] Crane’s traumatised Winston lives in two strangely overlapping time zones – 1984 and an unspecified present day. The former, with its two-minute hate and its sexcrime and its Ministry of Love, clearly never happened. But the present day version, in which a shattered Winston groggily staggers through a 'normal' but entirely indifferent world, is plausible. Any individual who has crossed the state – and there are some obvious examples – could go through what Orwell’s Winston went through. Second time out, it feels like an angrier and more emotionally righteous play. Some weaknesses become more apparent second time too.” Is sentiment really but ? neutral positive negative? Neutral?
  • 5. 5 More than binary (example)
  • 6. • Opinion mining • Sentiment analysis • Sentiment mining • Subjectivity detection • ... • Often used synonymously • Some shadings in meaning • “sentiment analysis“ describes the current mainstream task best 🡪 I‘ll use this term. A field of study with many names
  • 7. •Sentiment • A thought, view, or attitude, especially one based mainly on emotion instead of reason •Sentiment Analysis • aka opinion mining • use of natural language processing (NLP) and computational techniques to automate the extraction or classification of sentiment from typically unstructured text Terms
  • 8. • Consumer information • Product reviews • Marketing • Consumer attitudes • Trends • Politics • Politicians want to know voters’ views • Voters want to know policitians’ stances and who else supports them • Social • Find like-minded individuals or communities Motivation
  • 9. •Knowing sentiment is a very natural ability of a human being. Can a machine be trained to do it? •SA aims at getting sentiment-related knowledge especially from the huge amount of information on the internet •Can be generally used to understand opinion in a set of documents Motivation
  • 10. Tripod of Sentiment Analysis Cognitive Science Natural Language Processing Machine Learning Sentiment Analysis Natural Language Processing Machine Learning
  • 11. •community •another person •user / author •document •sentence or clause •aspect (e.g. product feature) The unit of analysis “What makes people happy“ example Phone example
  • 14. •Machine learning • Naïve Bayes • SVM • Deep learning •Unsupervised methods • Use lexicons •Hybrid solutions •Each has advantages and disadvantages… Approaches
  • 15. •‘Learn by example’ paradigm • Provide an algorithm with lots of examples • Documents that have been manually/semi-automatically annotated with a category • Supervised learning • In our case: e.g., positive/negative reviews • Algorithm extracts characteristic patterns for each category and builds a predictive model • Apply model to new text -> get prediction Machine-Learning (ML) solutions
  • 16. • Basic approach: 1. Get manually annotated documents from the domain you are interested in. • e.g., positive and negative reviews of electronics products • This will be your training corpus 2. Train any standard classifier using bag-of-words as features • Typical classifiers: Support Vector Machines (SVMs), Naïve Bayes, Maximum Entropy • Naïve Bayes are super-easy to implement from scratch • Don’t try to implement SVMs yourself! Use existing implementations: SVMlight , LibSVM or LibLinear (for larger datasets). Use linear kernels • Use boolean features not frequency-based 3. Apply trained classifier to test corpus or application • If you want to predict a rating, e.g., 1-5 stars [20] • Same as above, but use multi-class classification or regression: • Linear Regression, Support Vector Regression Machine-Learning solutions
  • 17. • Bag-of-words document representation: document -> vector • Example: d1 =“good average excellent good” d2 =“okay good average fine” d3 =“good okay okay” • Then Vocabulary={“good”, “average”, “excellent”, “fine”, “okay”} and d1 will be represented as: • d1 ={2,1,1,0,0} if features are frequently-based or • d1 ={1,1,1,0,0} if boolean-based • Problems: • Order of tokens is lost • Long-distance relationships are lost • “Avengers was a good movie, but Iron Man sucked!” Crash-course on ML for document classification
  • 18. Documents in a Vector Space - Classification Sec.14.1 negative positive Test document; which category?
  • 19. Documents in a Vector Space - Classification Sec.14.1 Example: k-Nearest Neighbours Example: Support Vector Machines
  • 20. 20 Classes • positive, negative, both, neutral Lexicon solutions Corpus Lexicon Neutral or Polar? Step 1 Contextual Polarity? Step 2 All Instances Polar Instances 19,506 5,671
  • 21. • Detect emotion in two independent dimensions: • Positive: Dpos : {1, 2,… 5} • Negative: Dneg : {-5, -4,… -1} • (optional) Predict overall polarity by comparing them : • If Dpos > |Dneg | then positive • Example: “He is brilliant but boring” • Emotion(‘brilliant’)=+3 • Emotion(‘boring’)=-2 • Negation detection: “He isn’t brilliant and he is boring” • Emotion(NOT ‘brilliant’) = -2 • Decreased by 1 and sign reversed (Basic) lexicon-based approach Dpos =+3, Dneg =-2 => positive Dpos =+1 (default), Dneg =-3 => negative
  • 22. SentiWordNet SauDiSenti •Lexical resource for sentiment analysis •Saudi dialect lexicon.
  • 23. •Lexicons + Machine-Learning, e.g., SELC (SElf-Supervised, Lexicon-based and Corpus-based) [11] Hybrid solutions
  • 25. •As discussed, often the Opinion Object comprises of different aspects • e.g., camera: lens, quality, weight. •Often, such an aspect-based analysis is more valuable than a general +/- •Automatic extraction of those features is possible by: • Building Ontology Trees [25] Aspect-based Opinion Analysis
  • 26. 26
  • 27. •Advantages: • Tend to attain good predictive accuracy •Disadvantages: • Need for training corpus • Solution: automated extraction (e.g., Amazon reviews, Rotten Tomatoes) or crowdsourcing the annotation process (e.g., Mechanical Turk) • Domain sensitivity • Trained models are well-fitted to particular product category (e.g., electronics) but underperform if applied to other categories (e.g., movies) • Solution: train a lot of domain-specific models or apply domain-adaptation techniques • Particularly for Opinion Retrieval, you’ll also need to identify the domain of the query! Pros/Cons of the approach
  • 28. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Aspect-oriented sentiment analysis: It‘s not ALL good or bad
  • 29. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Objects, aspects, opinions (1) • Object identification
  • 30. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Objects, aspects, opinions (2) • Object identification • Aspect extraction
  • 31. •Basic idea: POS and co-occurrence • find frequent nouns / noun phrases • find the opinion words associated with them (from a dictionary: e.g. for positive good, clear, amazing) Find only the aspects belonging to the high-level object
  • 32. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Objects, aspects, opinions (3) • Object identification • Aspect extraction • Grouping synonyms
  • 33. •General-purpose lexical resources provide synonym links •E.g. Wordnet •But: domain-dependent: • Movie reviews: movie ~ film • Camera reviews: movie 🡪 video; picture 🡪 photos Grouping synonyms
  • 34. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Objects, aspects, opinions (4a) • Object identification • Aspect extraction • Grouping synonyms • Opinion orientation classification
  • 35. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Objects, aspects, opinions (4b) • Object identification • Aspect extraction • Grouping synonyms • Opinion orientation classification
  • 36. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Objects, aspects, opinions (5) • Object identification • Aspect extraction • Grouping synonyms • Opinion orientation classification • Integration / coreference resolution
  • 37. Yesterday, I bought a Nokia phone and my girlfriend bought a moto phone. We called each other when we got home. The voice on my phone was not clear. The camera was good. My girlfriend said the sound of her phone was clear. I wanted a phone with good voice quality. So I was satisfied and returned the phone to BestBuy yesterday. Small phone – small battery life. Not all sentences/clauses carry sentiment • Neutral sentiment
  • 39. •Review-related analysis •Developing ‘hate mail filters’ analogous to ‘spam mail filters’ Applications
  • 40. Meet sentiment analysis (1) (buzzilions.com)
  • 41. Politics Public Opinion Tracking Market Monitoring of public opinion on Twitter for the keyword “milk”. Spike occurs on 8/4/2011 after a series of deaths in China relating to bad quality milk (source)
  • 43. • Subtle ways of expressing private states • “If you are reading this because it is your darling fragrance, please wear it at home exclusively and tape the windows shut” No negative words • “Miss Austen is not a poetess” Fact or opinion? • “Yeah, sure!” Irony • “I feel blue” vs “The sky is blue” Idioms • “If you thought this was going to be a good movie, this isn’t your day” Negation • Informal language • 90+% of language used in some social platforms deviates from standard English [3] • “wuddup ,droppin, sum, cuzz luv, u” Challenges (I)
  • 44. • “This film should be brilliant. It sounds like a great plot, the actors are first grade, and the supporting cast is good as well, and Stallone is attempting to deliver a good performance. However, it can’t hold up” Opinion reversal • “I bought an iPhone a few days ago. It was such a nice phone. The touch screen was really cool. The voice quality was clear too. Although the battery life was not long, that is ok for me. However, my mother was mad with me… ” Topic drift • Domain/context dependence • words/phrases can mean different things in different contexts and domains • This technology is crazy… the patient is going crazy Challenges (II)
  • 45. •Very popular data source • Mostly public messages • API • But: opaque sampling (“the best 1%“) •Vocabulary, grammar :‘( …. I am dying •Length restriction Special challenges in Tweets
  • 48. Join to DSC TU: