Demos • Recognizing entities and relations • Dependency parsing
Kai-Wei Chang (
[email protected])
1
Recognizing Entities and Relations [Roth&Yih’04,07] other
0.05
other
0.10
other
0.05
per
0.85
per
0.60
per
0.50 0.40
loc
0.10
loc
0.30
loc Loc
0.45
Dole ’s wife, Elizabeth , is a native of N.C.
E1
E2 R12
E3 R23
irrelevant irrelevant
0.05
irrelevant
0.10
spouse_of spouse_of
0.45
spouse_of
0.05
born_in born_in
0.50
born_in
0.85
• Features: bag of words, part of speech tags Kai-Wei Chang (
[email protected])
2
Recognizing Entities and Relations [Roth&Yih’04,07] other
0.05
other
0.10
other
0.05
per
0.85
per
0.60
per
0.50 0.40
loc
0.10
loc
0.30
loc Loc
0.45
Dole ’s wife, Elizabeth , is a native of N.C.
E1
E2 R12
E3 R23
irrelevant irrelevant
0.05
irrelevant
0.10
spouse_of spouse_of
0.45
spouse_of
0.05
born_in born_in
0.50
born_in
0.85
• Features: bag of words, part of speech tags Kai-Wei Chang (
[email protected])
3
Results % cd demo/entityrelation % make er.perf Method
Entity F1 Relation F1 Training Time
VW 92.2 VW (+constraints) 92.6 SSVM (+constraints) 88.0
45.8 53.7 50.0
Kai-Wei Chang (
[email protected])
5 sec 5 sec 300 sec
4
Dependency Parsing Root They operate ships and banks . CJT
SBJ
CJT
OBJ PRED PU
[Kubler, McDonald, Nivre 09]
Kai-Wei Chang (
[email protected])
5
Search Space Root They operate ships and banks . init SBJ Shift
PRED
Shift
Shift
Reduce-left
Shift
Reduce-left
Reduce-left
Reduce-right
Reduce-left
Reduce-right
Reduce-right Reduce-right
… Kai-Wei Chang (
[email protected])
6
Actions • Shift: Root They operate ships and banks .
• Reduce-Left
• Reduce-Right
Kai-Wei Chang (
[email protected])
7
Actions • Shift: Root They operate ships and banks .
• Reduce-Left
• Reduce-Right
Kai-Wei Chang (
[email protected])
8
Actions • Shift: Root They operate ships and banks .
• Reduce-Left Root They operate ships and banks .
• Reduce-Right
Kai-Wei Chang (
[email protected])
9
Actions • Shift: Root They operate ships and banks .
• Reduce-Left Root They operate ships and banks .
• Reduce-Right
Kai-Wei Chang (
[email protected])
10
Actions • Shift: Root They operate ships and banks .
• Reduce-Left Root They operate ships and banks .
• Reduce-Right Root They operate ships and banks .
Kai-Wei Chang (
[email protected])
11
Actions • Shift: Root They operate ships and banks .
• Reduce-Left Root They operate ships and banks .
• Reduce-Right Root They operate ships and banks .
Kai-Wei Chang (
[email protected])
12
Search Space Root They operate ships and banks . init SBJ Shift
PRED
Shift
Shift
Reduce-left
Shift
Reduce-left
Reduce-left
Reduce-right
Reduce-left
Reduce-right
Reduce-right Reduce-right
… Kai-Wei Chang (
[email protected])
13
VW Implementation Loop until reaching the end of the sentence { extract_features(…); get_valid_actions(…); get_gold_actions(…); pred_action = Search::predictor(…).predict(); transition_hybrid(…, pred_action); } ./vw -k -c -d test/train-sets/wsj_small.dparser.vw.gz --search_task dep_parser -search 3 --search_alpha 1e-4 --search_rollout oracle --passes 2 --holdout_off Kai-Wei Chang (
[email protected])
14