Entity Sentiment Extraction Using Text Ranking
John O’NeilAttivio, Inc.

15 August 2012

An Example
I already hated AT&T. It’s my fixed telephony andinternet provider (because it has something of amonopoly on such services). I go through periods where
my internet becomes intermittent, which AT&T refuses
to acknowledge. . . I love love love my iPhone. It’s mymini-computer on the go. I use it for texting, social
sharing, photography, editing, keeping track of mycalendar, storing contacts, finding directions, listening tomusic and podcasts, watching videos, reading, andblogging. Sometimes, I even make a phone call.
— http://stumbledownunder.com/2012/01/07/using-my-beloved-iphone-in-australia/

Entity Sentiment

I Entity extraction and document sentiment are well-known

techniques.
I For many uses, it’s important to assign sentiment to entities

in a document, not to the document as a whole.
I How best to accomplish this?

TextRank (Mihalcea & Tarau 2004)

I Document as graph.
I Choose representation appropriately!
I Power iteration finds the dominant eigenvector.

Prerequisite: Entity Extraction

I A combination of statistical and rule-based approaches.
I We get the positions of the entity mentions in the document,and resolve matches.

Prerequisite: Document Sentiment

I Train on a corpus of positive and negative BOWs using yourfavorite linear classifier.
I This associates a (positive or negative) sentiment weight foreach word (and optionally phrase) in the training corpus.

TextRank Highlights

I Document graphNodes Words and entities
Edges Between nearby words-entity pairs andword-word pairs.
Edge Weights Word sentiment
I PageRank
I De-sparsified matrix

TextRank algorithm
Input: Initial set of vertex weights WS
Iterate until convergence:
WS(Vi ) = (1 − d) + d ∗wjiXXVj ∈In(Vi )wjkWS(Vj )Vk ∈Out(Vj )I wij is the weight of the edge going from vertex Vi to vertex Vj
I In(Vi ) are the edges that point to Vi
I Out(Vi ) are the edges that point away from Vi .
I d is a constant damping factor (typically 0.85).
I At convergence, WS contains the final sentiment weights.

An Example, Again
I already hated AT&T. It’s my fixed telephony andinternet provider (because it has something of amonopoly on such services). I go through periods wheremy internet becomes intermittent, which AT&T refuses
to acknowledge. . . I love love love my iPhone. It’s mymini-computer on the go. I use it for texting, social
sharing, photography, editing, keeping track of mycalendar, storing contacts, finding directions, listening tomusic and podcasts, watching videos, reading, andblogging. Sometimes, I even make a phone call.
— http://stumbledownunder.com/2012/01/07/using-my-beloved-iphone-in-australia/

Simple Text Graph
hated
−1.5

ATT

−0.5

monopoly−0.9

iPhonerefuses
3.2−0.9 3.2

loveSimple Text Node Weights

AT&TiPhone
hatedmonopoly
refusesloveinitial
1.0
1.0
1.0
1.0
1.0
1.0

final
-1.25
0.95
-0.84
-0.09
0.28
0.95

Main Uses of Entity Sentiment (for us)

Faceting Filling facets with entries relevant to the query.
Entities Creating metadata for entities, improving search.
Time Viewing entity sentiment changes over time.

Entity Sentiment Evaluation

I Without test corpus, compare systems:

TextRank The one described here.
Baseline System using document’s sentiment for each
entity in the document.
I Task: get most highly correlated (and anti-correlated)

entity-&-sentiment pairs

Entity Sentiment Evaluation Corpus

I One day of the Moreover feed: 23 September 2011.
I Approximately 423,000 news articles in English, mostly U.S.

Top Headlines for 23 September, 2011

I Idaho to seek waiver for No Child Left Behind law
I Spending Dispute Threatens U.S. Government Shutdown
I Faster than light? CERN findings bewilder scientists
I Saleh Returns to Yemen amid Increased Violence
I GOP Candidates Debate in Orlando; Audience Boos GaySoldierBaseline: Top Document Co-occurrences on query Obama

Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama

entityWhite House
Mitt Romney
Rick Perry
West Bank
Mahmoud Abbas
Jon Huntsman
Michele Bachmann
United States
Benjamin Netanyahu
Rick Santorum

log likelihood
4344.153677.813612.593120.622879.532644.312526.38
2520.69
2508.192083.20

Baseline: Top Document Co-occurrences on query Stephen
Hill

Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill

entityRick Santorum
Gay Soldier
Rick Perry
Megyn Kelly
Ron Paul
Brian Williams
John Kerry
Mitt Romney
Herman Cain
Newt Gingrichlog likelihood815.64220.70195.20171.66165.22141.52109.87105.6890.21
86.38

Baseline: Positive and Negative Entity Sentiment inCorpus
entityBarack Obama
Congress
Michelle Bachmann
Rick Perry
Rick Santorum
Ron PaulJohn Kerry
Mitt Romney
Herman Cain
Newt GingrichAli Abdullah Saleh%pos
70.7
87.6
94.2
79.7
82.5
90.0
88.0
82.3
85.1
85.0
38.9%neg
29.3
12.4
5.8
20.3
17.5
10.0
12.0
17.7
14.9
15.0
61.1

TextRank: Positive and Negative Entity Sentiment inCorpus
entityBarack Obama
Congress
Michelle Bachmann
Rick Perry
Rick Santorum
Ron PaulMitt Romney
Newt Gingrich
Ali Abdullah Saleh%pos
46.25
46.0
0.0
39.2
13.3
34.5
70.5
77.4
5.6%neg
53.75
54.0
100.0
60.8
86.7
65.5
29.5
22.6
94.4

TextRank: Top Same-Polarity Correlations on queryObamaBarack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama

entityIdaho
Eric Holder
Arne Duncan
Angela Merkel
Education Department

log likelihood
314.57134.66107.16103.0374.15

TextRank: Top Opposite-Polarity Correlations on query
Obama

Barack Obama
Barack Obama
Barack Obama
Barack Obama
Barack Obama

entityMumbai Attackers
Capitol Hill
Republicans
Congress
Michele Bachmann

log likelihood
388.06282.10144.9484.18
76.61

TextRank: Top Same-Polarity Correlations on query
Stephen Hill

Stephen Hill

entityGay Soldier

log likelihood
13.58

TextRank: Top Opposite-Polarity Correlations on query
Stephen Hill

Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill
Stephen Hill

entityFox News
Rick Santorum
Republican Debate
Rick Perry
Mitt Romney

log likelihood
114.39116.08
30.96
18.43
3.98

TextRank: Top Same-Polarity Correlations on query
Congress

Congress
Congress
Congress
Congress
Congress

entityMitch Daniels
SenateDemocrats
Treasury Department
Sonia Gandhi

log likelihood466.28122.13117.57
95.66
64.59

TextRank: Top Opposite-Polarity Correlations on query
Congress

Congress
Congress
Congress
Congress
Congress

entityCapitol Hill
Americans
Barack Obama
Janet Napolitano
Senatelog likelihood278.19110.84
54.55
27.03
17.43

Conclusions & Future Directions

I Extraction of recognizably useful information.
I Need test corpus.

The EndThanks! Questions?