-
Notifications
You must be signed in to change notification settings - Fork 3
/
dataset_events.py
236 lines (212 loc) · 8.04 KB
/
dataset_events.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
from dataset_helpers import *
phs = eventStart({'name':'help','frame':'transitive','tense':'pres','aspect':'neut','pol':'pos','voice':'active'})
phs.participants['agent'] = characterStart({'name':'professor','num':'pl'})
phs.participants['patient'] = characterStart({'name':'student','num':'pl'})
wp = {'reltype':'orc','relevent':phs}
testev = eventStart({'name':'follow','frame':'which','tense':'pres','aspect':'neut','pol':'pos','voice':'active','wp':wp})
testev.participants['agent'] = characterStart({'name':'woman','num':'sg'})
testev.bindings[Variable('?nagent')] = 'sg'
testev.bindings[Variable('?nwpagent')] = 'pl'
testev.bindings[Variable('?nwppatient')] = 'pl'
mainList = {'transitive':['help'],'intransitive':[],'noun':['professor']}
main2List = {'transitive':['follow'],'intransitive':[],'noun':['window']}
profList = {'transitive':[],'intransitive':[],'noun':['professor']}
recList = {'transitive':['recommend'],'intransitive':[],'noun':[]}
actneut = eventStart({'voice':'active','aspect':'neut'})
neut = eventStart({'aspect':'neut'})
pas = eventStart({'voice':'passive'})
main = eventStart({'name':'help'})
main.participants['agent'] = characterStart({'name':'professor'})
mainb = eventStart({'name':'help'})
mainb.participants['patient'] = characterStart({'name':'professor'})
mainP = eventStart({'name':'help','tense':'past','aspect':'neut','pol':'pos'})
mainP.participants['agent'] = characterStart({'name':'professor'})
mainbP = eventStart({'name':'help','tense':'past','aspect':'neut','pol':'pos'})
mainbP.participants['patient'] = characterStart({'name':'professor'})
main2 = eventStart({'name':'follow'})
main2.participants['agent'] = characterStart({'name':'window'})
rceventmain1 = eventStart({'pol':'pos','aspect':'prog','voice':'active'})
main3n = eventStart({'name':'help','voice':'active','pol':'neg','aspect':'prog'})
main3n.participants['agent'] = characterStart()
main3n.participants['agent'].attributes['rc'] = {'rtype':None,'role':None,'event':rceventmain1}
rceventmain2 = eventStart({'pol':'neg','aspect':'prog','voice':'active'})
main3p = eventStart({'voice':'active','pol':'pos','aspect':'prog'})
main3p.participants['agent'] = characterStart()
main3p.participants['agent'].attributes['rc'] = {'rtype':None,'role':None,'event':rceventmain2}
rceventmain1 = eventStart({'pol':'neg','aspect':'prog','voice':'active','name':'help'})
main4n = eventStart({'frame':'transitive','voice':'active','pol':'pos','aspect':'prog'})
main4n.participants['patient'] = characterStart()
main4n.participants['patient'].attributes['rc'] = {'rtype':None,'role':None,'event':rceventmain1}
rceventmain2 = eventStart({'pol':'pos','aspect':'prog','voice':'active'})
main4p = eventStart({'frame':'transitive','voice':'active','pol':'neg','aspect':'prog'})
main4p.participants['patient'] = characterStart()
main4p.participants['patient'].attributes['rc'] = {'rtype':None,'role':None,'event':rceventmain2}
#main pos rc neg
rcpos = eventStart({'pol':'pos','aspect':'prog','voice':'active'})
rcneg = eventStart({'pol':'neg','aspect':'prog','voice':'active'})
mainposagrc = eventStart({'voice':'active','pol':'pos','aspect':'prog'})
mainposagrc.participants['agent'] = characterStart()
mainposagrc.participants['agent'].attributes['rc'] = {'rtype':None,'role':None,'event':rcneg}
mainposparc = eventStart({'voice':'active','pol':'pos','aspect':'prog'})
mainposparc.participants['patient'] = characterStart()
mainposparc.participants['patient'].attributes['rc'] = {'rtype':None,'role':None,'event':rcneg}
mainnegagrc = eventStart({'voice':'active','pol':'neg','aspect':'prog'})
mainnegagrc.participants['agent'] = characterStart()
mainnegagrc.participants['agent'].attributes['rc'] = {'rtype':None,'role':None,'event':rcpos}
mainnegparc = eventStart({'voice':'active','pol':'neg','aspect':'prog'})
mainnegparc.participants['patient'] = characterStart()
mainnegparc.participants['patient'].attributes['rc'] = {'rtype':None,'role':None,'event':rcpos}
mainnegpaneg = eventStart({'voice':'active','pol':'neg','aspect':'prog'})
mainnegparc.participants['patient'] = characterStart()
mainnegparc.participants['patient'].attributes['rc'] = {'rtype':None,'role':None,'event':rcneg}
mainnegagneg = eventStart({'voice':'active','pol':'neg','aspect':'prog'})
mainnegparc.participants['agent'] = characterStart()
mainnegparc.participants['agent'].attributes['rc'] = {'rtype':None,'role':None,'event':rcneg}
#main neg rc pos
task2inputs = {
'xy': {
'pos': {
'needEv': [],
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
# 'needEv': [mainposagrc],
'needEv': [mainposagrc,mainposparc,mainnegagrc,mainnegparc],
'needList': [],
'avoidEv': None,
'avoidList':[]
}},
'xy2': {
'neg': {
# 'needEv': [mainposagrc],
'needEv': [mainposagrc,mainposparc,mainnegagrc,mainnegparc],
'needList': [],
'avoidEv': [mainnegagneg],
'avoidList':[]
}},
'hasprof': {
'pos': {
'needEv': None,
'needList': profList,
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': None,
'needList': [],
'avoidEv': None,
'avoidList': profList
}},
'profhelp': {
'pos': {
'needEv': main,
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': None,
'needList': mainList,
'avoidEv': [main],
'avoidList':[]
}},
'profhelp2': {
'pos': {
'needEv': mainP,
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': mainbP,
'needList': [],
'avoidEv': None,
'avoidList':[]
}},
'profhelppat': {
'pos': {
'needEv': mainb,
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': None,
'needList': mainList,
'avoidEv': [mainb],
'avoidList':[]
}},
'windfoll': {
'pos': {
'needEv': main2,
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': None,
'needList': main2List,
'avoidEv': [main2],
'avoidList':[]
}},
'neghelp': {
'pos': {
'needEv': main3p,
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': main3n,
'needList': [],
'avoidEv': None,
'avoidList':[]
}},
'neghelp2': {
'pos': {
'needEv': main4p,
'needList': [],
'avoidEv': None,
'avoidList':[]
},
'neg': {
'needEv': main4n,
'needList': [],
'avoidEv': None,
'avoidList':[]
}}
}
role_rc_structures_dict = {
'xy' :
{'intransitive':[{'agent':'none'},{'agent':'transitive'},{'agent':'intransitive'}],
'transitive':[{'agent':'none','patient':'none'},{'agent':'none','patient':'transitive'},{'agent':'none','patient':'intransitive'},
{'agent':'transitive','patient':'none'},{'agent':'intransitive','patient':'none'},
]},
'xy2' :
{'intransitive':[{'agent':'none'},{'agent':'transitive'},{'agent':'intransitive'}],
'transitive':[{'agent':'none','patient':'none'},{'agent':'none','patient':'transitive'},{'agent':'none','patient':'intransitive'},
{'agent':'transitive','patient':'none'},{'agent':'transitive','patient':'transitive'},{'agent':'transitive','patient':'intransitive'},
{'agent':'intransitive','patient':'none'},{'agent':'intransitive','patient':'transitive'},{'agent':'intransitive','patient':'intransitive'},
]},
'neghelp':
{'intransitive':[],
'transitive':[{'agent':'intransitive','patient':'none'},{'agent':'transitive','patient':'none'}]
},
'neghelp2':
{'intransitive':[],
'transitive':[{'agent':'none','patient':'transitive'}]
},
'profhelp2' :
{'intransitive':[{'agent':'none'},{'agent':'transitive'},{'agent':'intransitive'}],
'transitive':[{'agent':'none','patient':'none'},{'agent':'none','patient':'transitive'},{'agent':'none','patient':'intransitive'},
{'agent':'transitive','patient':'none'},{'agent':'intransitive','patient':'none'},
]},
'other' :
{'intransitive':[{'agent':'none'},{'agent':'transitive'},{'agent':'intransitive'}],
'transitive':[{'agent':'none','patient':'none'},{'agent':'none','patient':'transitive'},{'agent':'none','patient':'intransitive'},
{'agent':'transitive','patient':'none'},{'agent':'transitive','patient':'transitive'},{'agent':'transitive','patient':'intransitive'},
{'agent':'intransitive','patient':'none'},{'agent':'intransitive','patient':'transitive'},{'agent':'intransitive','patient':'intransitive'},
]}
}