程序代写代做代考 flex algorithm junit lecture13.pptx

lecture13.pptx

LECTURE 13

Semantc Role Labelling

Arkaitz Zubiaga, 19
th

February, 2018

2

 What is Semantc Role Labelling?

 Thematc Roles:

 FrameNet.

 PropBank.

 Approaches to Semantc Role Labelling.

 Selectonal Restrictons.

LECTURE 13: CONTENTS

3

 Semanti ole labelling (SRL): for a predicate or verb in a
sentence, task of identfying thematc roles, such as agent, goal,
or result.

SEMANTIC ROLE LABELLING

Theme LocationPredicateAgent

4

 SRL can be useful for:

 Queston anseering.

 Machine translaton.

 Informaton extracton.

 To identfy sentences eith identcal meaning:

 XYZ corporaton bought the stock.

 They sold the stock to XYZ corporaton.

 The stock eas bought by XYZ corporaton.

SEMANTIC ROLE LABELLING

5

 Given a sentence:
Paul bought a car from Sarah for £7,000

 Identfy predicaters) [i.e. the acton, generally the verb]:
Paul bought a car from Sarah for £7,000

 Identfy thematc roles:

Paul bought a car from Sarah for £7,000

SEMANTIC ROLE LABELLING: EXAMPLE

buyer seller

goods
money

6

 A typical set of thematc roles.

THEMATIC ROLES

7

 Most f equently used themati oles:

 AGENT: subject ractve sentence), by X rpassive sentence).

 EXPERIENCER: animate subject in actve sentences.

 THEME: object rtransitve verb), subject rnon-acton verb).

 INSTRUMENT: eith X.

 BENEFICIARY: for X.

THEMATIC ROLES

8

 P oblem of themati oles:

 Ha d to i eate standa d set of roles or formally defne them.

 Alte native to thematc roles:

 P opBank, feeer, more generalised semantc roles.

 F ameNet, more roles, specifc to a group of predicates.

THEMATIC ROLES

9

 Includes 12 domains rbody, cogniton, health, tme,…)

 Conduited on f ame-by-f ame basis :

1. choose semantc frame re.g. Commerce_buy).

2. defne the frame and its frame elements re.g. BUYER,
GOODS, SELLER, MONEY).

3. list predicates that evoke it rbuy.v, purchase.v, purchase.n).

4. extract sentences for each predicate from Britsh Natonal
Corpus.

THE FRAMENET PROJECT

10

 F ame Relaton: directed elaton beteeen teo f ames, i.e. a
Supe _F ame rless dependent, more abstract) and a Sub_F ame
rthe more dependent, less abstract).

 e.g. the frame Commercial_transacton has teo sub-frames:

 Commerce_goods_transfer

 Commerce_money_transfer

FRAMENET: FRAME RELATIONS

11

 One million eo d io pus annotated eith predicate argument
structures.

 Developed at University of Pennsilvania.

 P ediiates are lexicalised only by ive bs.

 Adjunitive a guments : Locatve, Temporal, Manner, Cause, etc.

PROPOSITION BANK: PROPBANK

12

 A g0 = agent

 A g1 = direct object / theme / patent

 A g2 = indirect object / benefactve / instrument / atribute / end
state

 A g3 = start point / benefactve / instrument / atribute

 A g4 = end point

PROPBANK: ARGUMENT NUMBERS

13

PROPBANK: ADJUNCTS

14

 The company bought a eheel-loader from Dresser.

 Arg0: The company

 Rel: bought

 Arg1: a eheel-loader

 Arg2-from: Dresser

PROPBANK: EXAMPLE

15

 TV statons bought “Cosby” reruns for record prices.

 Arg0: TV statons

 Rel: bought

 Arg1: “Cosby” reruns

 Arg3-for: record prices

PROPBANK: EXAMPLE

16

 BUY SELL PAY

 Arg0: buyer Arg0: seller Arg0: buyer

 Arg1: commodity Arg1: commodity Arg1: price paid

 Arg2: seller Arg2: buyer Arg2: seller

 Arg3: price Arg3: price Arg3: commodity

 Arg4: benefciary Arg4: benefciary Arg4: benefciary

PROPBANK: FLEXIBILITY

17

FRAMENET VS PROPBANK

18

 Ea ly SRL systems r1970s-80s):

 parser folloeed by hand-eriten rules for each verb.

 dictonaries eith verb-specifc case frames.

 Cu ent systems use maihine lea ning.

APPROACHES TO SEMANTIC ROLE LABELLING

19

A SIMPLE MODERN ALGORITHM

20

 Uses parsed tree as input.

SEMANTIC ROLE LABELLING: EXAMPLE

21

1. P uning: use simple heuristcs to prune unlikely consttuents.

2. Identfiaton: a binary classifcaton of each node as an
argument to be labelled or a NONE.

3. Classifiaton: a 1-of-N classifcaton of all the consttuents that
eere labelled as arguments by the previous stage.

3-STEP VERSION OF SRL ALGORITHM

22

 Imbalanie beteeen:

 positve samples rconsttuents that are arguments of
predicate).

 negatve samples rconsttuents that are not arguments of
predicate).

 Imbalanied data ian be ha d for many classifers.

 So ee p une the ive y unlikely ionsttuents f st , and then use a
classifer to get rid of the rest.

WHY PRUNING AND IDENTIFICATION STEPS?

23

 Algo ithm so fa ilassifes eive ything loially – each decision
about a consttuent is independent of all others.

 But this ian’t be ight: Lots of global or joint interactons
beteeen arguments.

 A local system may incorrectly label teo overlapping
consttuents as arguments.

 e.g. labelling one consttuent ARG0 should increase the
probability of another being ARG1

FINAL STAGE: JOINT INFERENCE

24

 Re anking:

 The frst stage SRL system produces multple possible labels
for each consttuent.

 The second stage classifes the best global label for all
consttuents.

 Ofen a classifer that takes all the inputs along eith other
features rsequences of labels).

HOW TO DO JOINT INFERENCE

25

SRL: NOT JUST ENGLISH

26

SEMANTIC ROLE LABELLING: EXAMPLE

27

 Prune the predicate and all other elements that include it.

SRL EXAMPLE: PRUNING

28

 Binary classifcaton of each element: argument or not.

SRL EXAMPLE: ARGUMENT IDENTIFICATION

29

SRL EXAMPLE: ARGUMENT IDENTIFICATION

30

 Multclass classifcaton of argument type.

SRL EXAMPLE: ARGUMENT CLASSIFICATION

31

SRL EXAMPLE: ARGUMENT CLASSIFICATION

32

 Features to classify arguments:

 Governing predicate, e.g. issued.

 Phrase type that it is, e.g. NP.

 Path from argument to predicate.

 Positon, i.e. before or afer predicate.

 Voice, i.e. actve or passive.

 Head eord of the consttuent.

SEMANTIC ROLE LABELLING: FEATURES

33

 Content eord: lexicalised feature that selects an informatve
eord from the consttuent, other than the head.

 POS tag of the content eord.

 POS tag of the head eord.

 Named Entty class of the content eord rlocaton, person,
organisaton,…)

 Contains named enttes? Boolean feature.

SEMANTIC ROLE LABELLING: MORE FEATURES

34

 First eord of the consttuent rand its POS tag).

 Last eord of the consttuent rand its POS tag).

 Lef and right sibling consttuent labels.

 Lef and right sibling head eords rand their POS tags).

SEMANTIC ROLE LABELLING: MORE FEATURES

35

 SRL: A level of shalloe semantcs for representng events and
their partcipants.

 Teo common architectures, for various languages:

 F ameNet: frame-specifc roles.

 P opBank: Proto-roles.

 Current systems extract by:

 Parsing sentence.

 Finding predicates, classifying associated arguments.

SEMANTIC ROLE LABELLING: SUMMARY

36

 Consider the teo interpretatons of:
I eant to eat someehere nearby.

1. I eant to eat in a nearby place.

2. It is a place nearby the object that I eant to eat.

 Difficult for an algorithm if ee expect the folloeing patern:
eat + [food], e.g. eat chicken

SELECTIONAL RESTRICTIONS

37

 Selectonal restrictons are associated eith senses:

 The restaurant se ives pizzas. [serves + food]

 Britsh Aireays se ives London. [serves + place]

SELECTIONAL RESTRICTIONS

38

 Common practce for selectonal restrictons is to use thesauri
such as WordNet.

 e.g. The THEME of “eat” must be WordNet synset {food, nutrient}

SELECTIONAL RESTRICTIONS

39

RESOURCES

 FrameNet:
http://framenet.icsi.berkeley.edu/

 PropBank:
http://www.cs.rochester.edu/~gildea/PropBank/Sort/

 NomBank:
http://nlp.cs.nyu.edu/meyers/NomBank.html

40

RESOURCES: SOFTWARE

 SENNA:
https://ronan.collobert.com/senna/

 SEMAFOR:
http://www.cs.cmu.edu/~ark/SEMAFOR/

 MatePlus:
https://github.com/microth/mateplus

 Open Sesame:
https://github.com/Noahs-ARK/open-sesame

41

ASSOCIATED READING

 Jurafsky, Daniel, and James H. Martin. 2009. Speech and Language
Processing: An Introduction to Natural Language Processing, Speech
Recognition, and Computational Linguistics. 3rd edition. Chapter 22.