• Non ci sono risultati.

A new era: Topic-based Annotators

N/A
N/A
Protected

Academic year: 2021

Condividi "A new era: Topic-based Annotators"

Copied!
64
0
0

Testo completo

(1)

A new era:

Topic-based Annotators

(2)

“Diego Maradona won against Mexico”

Dictionary of terms

against Diego Maradona Mexico won

2.2 5.1 9.1 1.0 0.1

Term Vector

Similarity(v,w) ≈ cos(α) t1 v

w t3

t2

a

Vector Space model

Classical approach

Mainly term-based

:

polysemy and synonymy issues

(3)

3

A new approach:

Massive graphs of entities and relations

May 2012

(4)

the paparazzi photographed the star the astronomer photographed the star

A typical issue: polysemy

(5)

He is using Microsoft’s browser He is a fan of Internet Explorer

Another issue: synonymy

(6)

http://richard.cyganiak.de/2007/10/lod/lod-datasets_2011-09-19_colored.png

Web of Data: RDF, Tables, Microdata

Cyc

Thanks to G. Weikum, SIGMOD 20136

(7)

http://richard.cyganiak.de/2007/10/lod/lod-datasets_2011-09-19_colored.png

Web of Data: RDF, Tables, Microdata

• 10M entities in 350K classes

• 120M facts for 100 relations

• 100 languages

• 95% accuracy

• 4M entities in 250 classes

• 500M facts for 6000 properties

• live updates

• 25M entities in 2000 topics

• 100M facts for 4000 properties

• powers Google knowledge graph

Thanks to G. Weikum, SIGMOD 20137

(8)

Wikipedia is a rich source of instances

(9)

Wikipedia's categories contain classes

Categories form a taxonomic DAG (not really…)

(10)

10

DAG of categories:

http://toolserver.org/~dapete/catgraph/

(11)

“Diego Maradona won against Mexico”

Find mentions and annotate them with topics drawn from a catalog

Ex-Argentina’s player

Mexico’s football team

A new approach:

Topic-based annotation

Wikipedia!

anchors

articles

(12)

Polysemy

the paparazzi photographed the star the astronomer photographed the star

Star is a massive, luminous ball of

plasma …

Celebrity is a

person who is famou-

sly recognized …

(13)

“Diego Maradona won against Mexico”

•Ex-Argentina’s coach

•His nephew

•Maradona Stadium

•Maradona Movie

•…

•Mexico nation

•Mexico state

•Mexico football team

•Mexico baseball team

•…

Don’t annotate!

Why is it a difficult problem?

(14)

Features used by annotators

Commonness of a page p wrt an anchor a

Pr(p| a) = # a linked to p

# a as anchor

Link probability of an anchor a

text in the

of freq

anchor as

of ) freq

( a

a a lp =

Context of a around the mention and within a page/entity p

mention =

…w1 w2 w3 a w4 w5 w6

page/entity p =

…z1 z2 z3 z4 z5 z6

Graph-based features a is a mention-node

p is an entity-node Links a p and paths

between pages

(15)

The literature

15

Many commercial software: AlchemyAPI, DBpedia

Spotlight, Extractiv, Lupedia, OpenCalais, Saplo,

SemiTags, TextRazor, Wikimeta, Yahoo! Content

Analysis, Zemanta.

(16)

• Designed for short texts

– news, blogs, search-results snippets, tweets, ads, etc – competitive on long texts too

• Achieves high accuracy

– Massive experimental test on millions of short texts

• Fast

– More than 10x faster than others – 100% Java

[Ferragina-Scaiella, CIKM 2010]

tagme.di.unipi.it

(17)

• …

“Diego Maradona won against Mexico”

•Diego A. Maradona

•Diego Maradona jr.

•Maradona Stadium

•Maradona Film

•…

•Mexico nation

•Mexico state

•Mexico football team

•Mexico baseball team

•…

No Annotation PARSING

PARSING PRUNING

2 simple features

• …

DISAMBIGUATION

by a voting scheme

How TAGME works

(18)

Relatedness between pages

(19)

Disambiguation: The voting scheme

Disambiguation: The voting scheme

Collective agreement among topics via voting

“Diego Maradona won against Mexico”

Wiki-articles Votes

Mexico 0.09

State of Mexico 0

Mexico National

Football Team 0.29

Mexico National

Baseball Team 0

p

a

p

b

•Diego A. Maradona

•Diego Maradona jr.

•Maradona Stadium

•Maradona Film

•…

b a

(20)

Disambiguation: all steps Disambiguation: all steps

Commonness of a page p wrt an anchor a

Pr(p| a) = # a linked to p

# a as anchor

Voting scheme Select top-ε pages

Select the best in commonness

Pruning by commonness < τ

τ = trade-of speed vs. recall

(21)

Pruning Pruning

We use 2 features:

1. link probability

2. coherence wrt context

• Compute a ρ score via

– 3 classifiers, avg, linear combination

 if ρ < ρ

NA

then prune!

Link probability of an anchor a

text in the

of freq

anchor as

of ) freq

( a

a a lp =

Avg. relatedness btw the assigned concept

to the others

balance

precision vs. recall

(22)
(23)

Less links

More links

(24)

Tagging  Json

(25)

http://tagme.di.unipi.it/tag?text=maradona%20won%20against%20mexico&key=***

NLP ?

Useful for relating topics

(26)

Relating topics

http://tagme.di.unipi.it/rel?id=8485%20615883&key=***

Maradona vs Tot

0,8157

(27)

We surpassed 100 Mln query

Tweet Classification

(28)

On comparing annotators

[Cornolti et al, WWW 2013]

(29)

A word of caution !

A2W

Sa2W

Rc2W

(30)
(31)
(32)

Weak annotation match

(same entity & mention overlap)

Your project should pump up TAGME’s curve

(33)
(34)

Other approaches

to topic-based annotation

(35)

Goal

Main goal:

each mention is connected to at most one entity

90 30

5 100 100 50

20 50

90

80 30 90

10 10

20 30

30

35

Entities = Wikipedia Pages

Mentions = Anchor Texts

Thanks to G. Weikum, SIGMOD 2013

(36)

Probability Factor Graph

90 30

5 100 100 50

20 50

90

80 30 90

10 10

20 30

30

Collective Learning with Probabilistic Factor Graphs

[Chakrabarti et al.: KDD’09]

• model P[m|e] by similarity and P[e1|e2] by coherence

• consider likelihood of P[m1 … mk|e1 … ek]

• factorize by all m-e pairs and e1-e2 pairs

• use hill-climbing, LP etc. for solution

Thanks to G. Weikum, SIGMOD 201336

Entities = Wikipedia Pages

Mentions = Anchor Texts

(37)

Dense Subgraph

• Compute dense subgraph such that:

each mention is connected to at most one entity

• ML and classification (possibly based on unambiguous entities) 90

30

5 100 100 50

20 50

90

80 30 90

10 10

20 30

30

Thanks to G. Weikum, SIGMOD 201337

[Bunescu/Pasca 2006, Cucerzan 2007, Milne/Witten 2008, …]

Entities = Wikipedia Pages

Mentions = Anchor Texts

(38)

Coherence Graph Algorithm

• Compute dense subgraph such that:

each mention is connected toat most one entity

• GOAL: maximize min weighted degree among entity nodes

• Greedy approximation:

iteratively remove weakest entity and its edges

90 30

5 100 100

50 50

90

80

90 30

10 20

10

30 30

30

[Weikum et al. 2011]

140 180 60 470 145 240

(39)

Random Walks

for each mention run personalized PageRank with restart

• rank entity e by stationary visiting probability, starting from m

50 90

80 30 90

10

20 10

0.83 0.7

0.4

0.75 0.15

0.17

0.2 0.1

90 30

5 100 100 50 30 20 30

0.75 0.25

0.04 0.96 0.77 0.5 0.23 0.2 0.3

Thanks to G. Weikum, SIGMOD 201339

(40)

Is it just a matter of “annotation” ?

(41)

BOW-representation

t1 d2

d1 d5 t3

t2

a

cos(a) = v  w / ||v|| * ||w||

(42)

Enrich the BOW-representation

• T = {w

1

…w

n

} be input text

• <tfidf

i

> be its TFIDF weight of word w

i

• Wikipedia concept/entity c

j

• Add concept/entity c

j

to the vector

representation of T with a weight that depends

on the strength of pertinence of c

j

(43)

obama says gaddafi may way out military assault

us president issues libya ultimatum

Barack Obama Muammar al-Gaddaf

Offensive (military)

President of the United States

Libya Ultimatum

A new representation

Q: ho w to m ea su re pr ox im ity of no de s

(44)

Text as a sub-graph of topics

Mahmoud Ahmadineja d

Ultimatum

RQ-170 drone

Any relatedness measure over a graph, e.g. [Milne &

Witten, 2008]

President of the United States

Barack Obama

Iran

Graph analysis allows to find similarities between texts and entities even if they do not match

syntactically (so at concept level)

(45)

• Given two texts, we map them to two sets of nodes/entities

– We stick onto the graph representation

Annotators and Random walks

Text 1

Text 2

Volumes

of random paths

Graph-KB of concepts

(46)

Some applications of this

novel text representation

(47)

Text Categorization

It is the problem of labeling natural language texts with one or more thematic categories drawn from a predefined set.

• Many solutions for long texts (hence many terms)

– Naive Bayes, SVM, k-NN, MaxEnt, Decision Tree…

few for short texts

which are poorly

composed

(48)

Topical classifcation of news

Training (given a set of classes)

1. Annotate the training-set using TAGME

2. For each class i, create a subset of topics t

z

by

importance and distinctiveness over all training-set

Test

3. Annotate the text to be classified using TAGME 4. Classify the text by computing the r-weighted

relatedness between any text-topic with the subset of topics assigned to each category (r of topic in text).

No vector space

(49)

Example

Relatedness measure SPORT

SPORT SCI-TECHSCI-TECH BUSINESSBUSINESS HEALTHHEALTH ....

Rafael Nadal Coach (sport)

Roger Federer

NBA Playofs

World Wide Web

Federal Reserve

NASA

web search engine Planet

Eurozone Stock

Francesca Schiavone won Roland Garros

Wall Street

Cholesterol Patient Infants

HIV

French Open Francesca Schiavone

SPORT SPORT

(50)

Some experiments

32K items from 3 RSS news-feeds

TAGME BAYES C4.5 AdaBoost.MH SVM

0.58 0.60 0.62 0.64 0.66 0.68 0.70 0.72 0.74 0.76

F1 m e as u re

0.78

80%

75%

70%

65%

60%

Categories Sport Business U.S.

Health Sci&Tech World

Entertainment

(51)

Paper at

ECIR 2012

(52)

User profling

(53)

User profiling in Twitter

Parse all tweets of a users via

TAGME and via the Stanford NLP Parser, then assign a weight to each detected entity according to its

grammatical role in the tweet.

User profle = weighted set of entities

Few interesting advantages:

Small footprint of the user profile, better space and time

Robustness against polysemy and synonymy

Same profile structure for users and tweets

(54)

Best user per tweet

[M. Pennacchiotti et al., CIKM 2012]

Problem: Given a tweet predict the “most interested” user

Data = 250 users over 182'000 tweets

o Tested: Classic tf-idf approach versus TagMe-based approach

events/content status/sentiment

Generic News

% correct

(55)

Problem: Given a profiled user, predict interesting news for her

Data = 1619 users over 2 mln tweets.

o

3 known approaches

versus

TagMe-based approach

Reciprocal of the avg pos of first

relevant news

Prob to have relevant news among top-10 R@10

Relevant news per Twitter user

[F. Abel et al., UMAP 2011]

OpenCalais.com

Named Entities

(56)

Serendipity in Web search

(57)

Anticipating information needs

Bordino et al, WSDM 2013

• PROBLEM: Given the current web page p that a user is visiting, we want to recommend a small and

diverse set of search queries that are relevant to the content of p, non-obvious and serendipitous.

• Not a ‘reverse search’ problem;

• Not a standard query recommendation problem;

• Needs to be applicable to previously unseen pages.

(58)

Serendipity in Web Search

Bordino et al, WSDM 2013

(59)

The Entity-Query (EQ) Graph

A large query-log is available Three types of arcs:

1. query to query:

2. entity to query

3. entity to entity

Bordino et al, WSDM 2013

Query nodes

Query-flow graph

(60)

Query recommender for a web page

Entity Extraction

Seed set expansion

Retrieval of related queries

Machu_Picchu Pre-Columbian Era

Inca_Empire Cusco_Region

Peru Mountain

Machu_Picchu Spanish_Conquest_of_the_Aztec_Empire Pre-Columbian_era Andes

Inca_Empire Pachacuti Cusco_Region Inca_Religion

Peru Atahualpa

Mountain Francisco_Pizarro South_America Ollantaytambo

rafting excursion down the urubamba river el dorado temple of sun

indios quechuas map of peru

sapa inca

Bordino et al, WSDM 2013

ML_approach but also

TAGME

(61)

Other two steps

• Personalized PageRank on the entity-induced subgraph;

• Preference Vector: uniform distribution over the entity seed;

• Return the top-N entities that achieve the highest scores.

Expanding the entity seed

Seed set of the

Visited Page

(62)

Other two steps

Obtaining queries for entities

 Personalized PageRank on the full EQ graph (pref vector = uniform);

 Return the top-K query nodes that achieve the highest scores.

Some Algorithm Engineering

-Pruning: store the top probabilities for each entity in the QE-graph;

- Bucketing: group probabilities into buckets of exponentially increasing size.

Expanded

entity set

(63)

The moral

Topic-based annotators extract useful contextual knowledge

A sort of semantic dimension: Entities can be related within the graph-KB The better/larger is graph-KB, the more efective is the annotation

(64)

The moral

Topic-based annotators extract useful contextual knowledge

A sort of semantic dimension: Entities can be related within the graph-KB The better/larger is graph-KB, the more efective is the annotation

State-of-the-art tools available

Efficient and efective

Room for improvement, especially on scalability & robustness

Riferimenti

Documenti correlati

This approximant does not take into account any of the other parts of the portion, and is computationally cheap to perform given the low number of parameters involved and the small

This paper uses a prospective evaluation design to derive estimates of the potential cost savings that may arise from Local Healthcare Authorities (LHAs)

There is a characterization of outerplanar graphs that says a graph is outerplanar if and only if it does not contain a subdivision of the complete graph K 4 or the complete

Therefore the intersection graph of ideals of the lattice L is isomorphic to the graph with vertex-set L \ {0, 1} in which two distinct vertices a and b are adjacent if and only if a

The previous discussion shows that any finite simple graph which is dual to some simplicial complex is the dual graph of a ring.. However, not all finite simple graphs are dual to

He is using Microsoft’s browser He is a fan of Internet Explorer.. Another

Graph analysis allows to find similarities between texts and entities even if they do not match. syntactically (so at

Uno dei momenti del procedimento impositivo lasciato alla discrezionalità dell’Ente è certamente quello attinente alla riscossione: la potestà regolamentare degli enti