Lecture 13: Structured Prediction
Kai-Wei Chang CS @ University of Virginia kw@kwchang.net Couse webpage: http://kwchang.net/teaching/NLP16
1 CS6501: NLP
Lecture 13: Structured Prediction Kai-Wei Chang CS @ University of - - PowerPoint PPT Presentation
Lecture 13: Structured Prediction Kai-Wei Chang CS @ University of Virginia kw@kwchang.net Couse webpage: http://kwchang.net/teaching/NLP16 CS6501: NLP 1 Quiz 2 v Lectures 9-13 v Lecture 12: before page 44 v Lecture 13: before page 33 v Key
Kai-Wei Chang CS @ University of Virginia kw@kwchang.net Couse webpage: http://kwchang.net/teaching/NLP16
1 CS6501: NLP
CS6501: NLP 2
CS6501: NLP 3
How likely the sentence ”I love cat” occurs POS tags of ”I love cat” occurs How to learn the model?
CS6501: NLP 4
The/DT grand/JJ jury/NN commented/VBD
topics/NNS ./. Tag set: DT, JJ, NN, VBD… POS Tagger
CS6501: NLP 5
CS6501: NLP 6
CS6501: NLP 7
POS Tagging with a restricted Tagset?
CS6501: NLP 8
CS6501: NLP 9
CS6501: NLP 10
POS Tagging with a restricted Tagset?
CS6501: NLP 11
v B-PERS, B-DATE,…: beginning of a mention of a person/date... v I-PERS, I-DATE,…: inside of a mention of a person/date... v O: outside of any mention of a named entity
CS6501: NLP 12
CS6501: NLP 13
CS6501: NLP 14
CS6501: NLP 15
CS6501 Natural Language Processing 16
>? 𝜀7@A 𝑟B 𝑄 𝑢7 = 𝑟 ∣ 𝑢7@A = 𝑟B
The best i-1 tag sequence Generating the current
Transition from the previous best ending tag
CS6501: NLP 17
M 𝒙,𝒖 M 𝒙
CS6501: NLP 18
CS6501: NLP 19
Generative Model’s view Discriminative Model’s view
CS6501: NLP 20
CS6501: NLP 21
4
CS6501: NLP 22
Not necessarily independent features! VB China NNP
CS6501: NLP 23
know
[
CS6501: NLP 24
4
4
abc d ef,efgh,if ∑ abc d e,efgh,if
j
4
e 4 Constant only related to 𝝁 𝝁: parameters
CS6501: NLP 25
𝒖,i
4
𝒖,i
Decompose the training data into such units
CS6501: NLP 26
CS6501: NLP 27
7(𝑢4,𝑢4@A,𝒙) 7
CS6501: NLP 28
CS6501: NLP 29
B-LOC E-LOC
B-PER E-PER
CS6501: NLP 30
B-LOC E-LOC
B-PER E-PER
CS6501: NLP 31
7 𝑢4,𝒙 + ∑ 𝛿qq(𝑢4,𝑢4@A, 𝒙) q 7 𝒋
7 𝑢4,𝒙 + ∑ 𝛿qq(𝑢4,𝑢4@A,𝒙) q 7
4
Node feature 𝑔(𝑢4,𝒙) Edge feature (𝑢4,𝑢4@A,𝒙)
CS6501: NLP 32
Not necessarily independent features! VB China NNP
CS6501: NLP 33
know
CS6501: NLP 34
7 𝑢4,𝒙 + ∑ 𝛿q(𝑢4,𝑢4@A, 𝒙) q 7 𝒋
7 𝑢4,𝒙 ) 4 𝒍
4 𝒎
A 𝑢4, 𝒙 ) 4
O 𝑢4, 𝒙 ) 4
4
4
CS6501: NLP 35
7 𝑢4,𝒙 + ∑ 𝛿q(𝑢4,𝑢4@A, 𝒙) q 7 𝒋
𝒋
4
∏ abc d(ef,efgh,if)
f
∏ ∑ abc d e,efgh,if
j f
∑ abc • 𝒖,𝒙
𝒖
∏ abc d(ef,efgh,if)
f
∑ ∏ abc d(ef,efgh,if)
f 𝒖
CS6501: NLP 36
Like in the previous slide, we can rearrange the summations Locally normalized globally normalized
CS6501: NLP 37
38
Pronoun Verb Noun And Noun
Root They operate ships and banks .
39
40
𝒛
Kai-Wei Chang 41