Grammars, graphs and automata
Mark Johnson
Brown University
ESSLLI 2005 slides available from http:/ /cog.brown.edu/˜mj
1
Grammars, graphs and automata Mark Johnson Brown University ESSLLI - - PowerPoint PPT Presentation
Grammars, graphs and automata Mark Johnson Brown University ESSLLI 2005 slides available from http:/ /cog.brown.edu/mj 1 High-level overview Probability distributions and graphical models (Probabilistic) finite state machines and
1
2
3
4
5
6
7
8
9
ω∈Ω P(ω).
10
w
w
w
11
12
n
13
14
[Xc=xc] ], where θXc=xc = gc(xc)
15
16
12(X1, X2)
4(X4)
17
124(X1, X2, X4)
18
y
19
θ
θ
20
i [
i [
21
22
m
m
23
m
24
12(X1, X2)
4(X4)
25
124(X1, X2, X4)
26
i
Xi
27
28
29
W1 g(W1, T1)
T1 cW1(T1)h(T1, T2)
T2 cT1(T2)g(W2, T2)
W2 cT2(W2) 30
31
32
33
n
n
34
n−1
35
n−1
n+m−2
36
37
n−1
38
m
39
40
S P(S, V ) completely connects outputs
41
m
42
43
44
m
45
46
47
w∈V⋆ P(w) = 1, i.e., P is normalized
48
49
50
51
52
53
G is the reflexive and transitive closure of ⇒G.
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
v∈V,s′∈S pm(v, s′|s) = 1 for all s ∈ S (halt or move on)
75
76
77
78
79
s′∈S pm(s′|s) = 1 and v∈V pℓ(v|s) = 1 for all s ∈ S.
80
81
82
83
84
85
2 t1t2
86
87
88
89
90
91
92
93
94
k−1
95
k−1
96
1 2 3
97
k−1
98
99
100
j=i+1,...,k−1
A→B C∈R(A) p(A → B C)PG(
101
102
103
104
105
n
p
p
106
m
m
107
108
n
B→β∈R(B)
109
110
111
n
i=1 EG[nA→α|wi]
B→β∈R(B) p(B → β) = 1 yields:
i=1 EG[nA→α|wi]
i=1 EG[nA→α′|wi]
112
113
114
j−1
A→B C∈R
n
A→C D∈R
115
j−1
A→B C∈R
n
A→C D∈R
116
117
118
119
120
121
122
123
S VP VB Show NP PRP me NP NP PDT all DT the JJ nonstop NNS flights PP PP IN from NP NNP Dallas PP TO to NP NNP Denver ADJP JJ early PP IN in NP DT the NN morning . .
124
125
126
127
128
129
130
[ ], VP →
[ NP] NP, V [ ] → sleeps,
[ NP] → likes, . . .}
131
#books
#pizzas
132
Head=a Head=book Head=book Head=Sasha Head=read Head=Sam Head=read Head=read
Head=read −
Head=read
Head=Sasha
Head=book 133
Head=read Head=read Head=Sasha Head=a Head=book Head=book Head=read Head=read Head=Sam
Head=read −
Head=read
Head=book
Head=read −
Head=read
Head=Sasha 134
Head=wℓ
Head=wm
Head=wℓ
135
136
137
138
139
S NP D the N man PP P in NP D the N hat VP V drinks NP AP red N wine
140
ROOT S NP-SBJ NNP BELL NNP INDUSTRIES NNP Inc. VP VBD increased NP PRP$ its NN quarterly PP-DIR TO to NP CD 10 NNS cents PP-DIR IN from NP NP CD seven NNS cents NP-ADV DT a NN share . .
141
142
143
i=1 Pw(ti), where w are production
t∈T
144
145
146
(Abney 1997)
147
+singular
+singular
+plural
+plural
+singular → rice
+plural → bananas
+singular → grows
+plural → grow
+singular
+singular
+plural +plural
148
the hat hat in in man the man drinks drinks drinks wine red wine
drinks → NP man
drinks
drinks →
drinks NP wine
wine → AP red
wine
149
150
m
m
151
m
m
152
153
n
n
n
n
154
155
156
n
w
w n
157
158
w
D(w)
D(w)
n
159
160
VP V run
V see NP N people P with NP N telescopes VP PP VP
VP V see N people P with NP N telescopes NP PP NP
. . . × 2/105 × . . . . . . × 1/7 × . . . . . . × 2/7 × . . . . . . × 1/7 × . . . Rule count rel freq rel freq VP → V 100 100/105 4/7 VP → V NP 3 3/105 1/7 VP → VP PP 2 2/105 2/7 NP → N 6 6/7 6/7 NP → NP PP 1 1/7 1/7
161
162
ML CML EM CML+EM
163
164
165
′ → ∞ (hard constraint)
′ → −∞ (hard constraint) 166
w
D(w) − c m
−c
j w2 j
prior
167
n
m
n
n
n
n
168
169
170
171
172
173
174