-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfundamentals_sg.tdl
316 lines (258 loc) · 10.8 KB
/
fundamentals_sg.tdl
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
;;; -*- Mode: tdl; Coding: utf-8; -*-
;;;
;;;
;;; fundamentals_sg.tdl
;;;
;;; Basic definitions of types for English grammar
;;; Additions to the Singlish branch of the English Resource Grammar
;;;
;;; Rob Malouf, 3-Nov-1994
;;;
;;; $Id: fundamentals.tdl 7479 2010-02-21 23:11:30Z danf $
;;; Chow Siew Yeng 2020, 2021
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
basic_adj := mobile & adj_or_intadj & vc_add
"""
CSY 04-09-2020 - added vc_add for the purpose of allowing adj to head sentences
"""
.
; 21-4-2021 - add in new verbal_or_a (for subjh mc phrase)
; For positive adjectives
; 29-12-2020 CSY add in basic_adj as a supertype of adj
adj := basic_adj & n_or_a_or_det & p_adj_adv_or_comp & verb_or_adj_or_frag &
[ CARDINAL - ].
; CSY 18-12-2020 - include adj as something that has VFORM (from basic_adj_or_frag)
; 28-7-2021 add new feature of 3sginfl as a feature of things that head sentences
; for the sake of distinguishing fragments from possible sentences (that do not have subjs
; which is permissable in Singlish)
basic_verb_or_adj_or_frag := non_noun_or_frag & ;subst_or_adv_or_frag &
[ VFORM vform,
3SGINFL 3sginfl ].
; 8-6-2021 to use this head value for runon sentences
verb_or_conj_or_adj_or_frag := head.
verb_or_conj_or_frag := verb_or_conj_or_adj_or_frag.
verb_or_adj_or_frag := basic_verb_or_adj_or_frag & verb_or_conj_or_adj_or_frag.
; 8-6-2021 to ensure 'verbal' inherits from adj??
verbal_or_conj-s := verb_or_adj_or_frag.
; took away vform from this
basic_verb_or_frag := basic_verb_or_adj_or_frag & verb_or_conj_or_frag.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CONT types
aspect := basic_aspect &
[ PRF luk,
PROGR luk,
INCEP luk,
INCHO luk,
EXP luk ].
no_aspect := aspect &
[ PRF -,
PROGR -,
INCEP -,
INCHO -,
EXP - ].
; CSY 9-11-2020 for inchoative aspect
; <ex> he hungry already
; to mean he has started eating durian
incho_aspect := aspect &
[ PRF -,
PROGR -,
INCHO +,
INCEP - ].
; 19-8-2021 for inceptive aspect
; <ex> it's raining already
; to mean it has started raining. Not necessary with the progressive,
; but only the inceptive interpretation of 'already' is possible
; when with the progressive aspect.
incep_aspect := aspect &
[ PRF -,
PROGR +,
INCHO -,
INCEP + ].
; 19-8-2021 for the completive aspect
; <ex> He eat already.
; to mean he has eaten. This is incompatible with the progressive
completive_aspect := aspect &
[ PRF +,
PROGR -,
INCHO -,
INCEP - ].
; CSY 17-11-2020 for experiential aspect
; <ex> he ever have cat.
; to mean he has had a cat before
; In contrast to the perfect in English, this necessarily means that the proposition
; is not true anymore
exp_aspect := aspect &
[ PRF +,
EXP + ].
past_tam := past_or_subj_tam & indic_tam &
[ TENSE past,
ASPECT aspect &
[ PROGR -,
INCHO -,
INCEP - ] ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 8-4-2021 - adding in subtypes of pronoun type to differentiate
; as it is one of the things that are passed up in an RC
;for regular relative pronouns and the wh words that are not relpro
; 9-4-2021 - change hierarchy to make sure notpro has something in common with onerelpro
; for sp-hd_n_c
;normrelpro := prontype.
;notpro_or_refl := normrelpro & onerelpro.
;notpro_or_non_refl := normrelpro & onerelpro.
;only for the singlish relative pronoun one
;onerelpro := prontype.
notpro_or_onerelpro := prontype.
notpro := notpro_or_refl & notpro_or_non_refl & notpro_or_onerelpro.
onerelpro := notpro_or_onerelpro.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CASE and VFORM
; CSY 16-3-2021 for rel_cl which previously only took VFORM fin_or_inf
fin_or_inf_or_prp := vform.
fin_or_inf := fin_or_inf_or_prp & non_bse & fin_or_inf_or_imp.
inf_or_prp := fin_or_inf_or_prp & non_pas & non_fin_non_bse.
; CSY 12-1-2021 - for main clauses that allow prp but not base
fin_or_prp := fin_or_bse_or_prp & non_bse & fin_or_inf_or_prp.
; CSY 12-1-2021 - add in fin_or_prp
fin := fin_or_inf & fin_or_bse & fin_or_imp & fin_or_non_fin & fin_or_prp.
; CSY 12-1-2021 - add in fin_or_prp
prp := inf_or_prp & non_inf & pas_or_prp & bse_or_prp & fin_or_prp.
; CSY 16-12-2020 - root just for singlish adj headed constructions
root_sg_synsem := basic_root_synsem &
[ LOCAL [ CAT [ HEAD adj &
[ TAM indic_tam ],
MC + ],
CONT.HOOK.INDEX.SF #pred,
CONJ cnil ],
PUNCT.RPUNCT comma_or_clause_or_pair_or_no_punct &
[ PSF #pred ] ].
; 28-7-2021 something like VFORM but it is used only to mark the 3sg inflected verbs
3sginfl := *sort*.
3sg_plus := 3sginfl.
3sg_unk := 3sginfl.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Head types
; 20-5-2021 add new head type for the sentence final particles
; have it under comp?
n_or_p_or_v_or_adv_or_part := n_p_v_adv_adj_comp.
n_or_p_or_v_or_adv := n_or_p_or_v_or_adv_or_part.
;n_or_p_or_v := n_or_p_or_v_or_adv & subst.
p_or_adv_or_dadv_or_part := head.
;p_or_adv_or_dadv := p_or_adv_or_dadv_or_part.
v_or_a_or_p_or_part := non_noun.
v_or_a_or_p := v_or_a_or_p_or_part.
verbal_or_a_or_p_or_part := non_noun.
verbal_or_a_or_p := verbal_or_a_or_p_or_part.
n_or_v_or_a_or_part := subst.
n_or_v_or_a := n_or_v_or_a_or_part.
n_or_v_or_part := n_or_v_or_a_or_part.
v_or_g_or_a_or_p_or_part := subst.
v_or_g_or_a_or_n_or_part := subst.
v_or_g_or_a_or_n_or_p := subst.
v_or_g_or_a_or_p := v_or_g_or_a_or_n_or_p & v_or_g_or_a_or_p_or_part.
v_or_g_or_a_or_n := v_or_g_or_a_or_n_or_p & v_or_g_or_a_or_n_or_part.
v_or_g_or_a_or_part := v_or_g_or_a_or_p_or_part & v_or_g_or_a_or_n_or_part.
v_or_a_or_part := v_or_g_or_a_or_part & n_or_v_or_a_or_part & v_or_a_or_p_or_part.
v_or_a := v_or_g_or_a & n_or_v_or_a & verbal_or_a_or_p & v_or_a_or_part.
a_or_part := v_or_a_or_part.
adj_or_intadj := v_or_a & a_or_p & adverbee & nominal_or_verbal &
a_or_adv & intsort & a_or_part.
#|
; 17-12-2021 trying to use head types for constraining sfp complements
particle1 := v_or_a_or_part.
particle2_super := v_or_a_or_part.
particle2b := v_or_a_or_part.
particle2 := particle2_super.
particle3_sfadv := particle2_super.
particle3 := particle3_sfadv.
sfadverb_va := particle3_sfadv.
sfadverb := sfadverb_va.
v_or_a := v_or_g_or_a & n_or_v_or_a & verbal_or_a_or_p & sfadverb_va.
basic_particle := particle1 & particle2b & particle2 & particle3.
particle := basic_particle.
basic_particle_or_sfa := basic_particle & sfadverb.
|#
; 11-8-2021 add in sentence final adverbs
basic_particle_or_sfa := a_or_part & mobile.
basic_particle := basic_particle_or_sfa.
basic_sfa := basic_particle_or_sfa.
; Does not inherit from comp_spec_abe because it cannot be the target of comp. deg. specifiers
; 31-8-2021 removed CARDINAL from particle because it does not inherit from intsort
particle := basic_particle.
;&
; [ CARDINAL - ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pred sorts
; CSY 9-3-2021 create supertype to redefine pron_nonlocal_rel in order to separate it
; from the rel for relpro 'one'
; for the filler head and head filler rules to call on diff MIN values
pron_nonlocal_super_rel := basic_pron_rel & nonpro_or_refl_or_num_rel &
nonpart_nom_rel.
pron_nonlocal_rel := pron_nonlocal_super_rel.
;CSY 9-3-2021 only for 'one'
pron_nonlocal_one_rel := pron_nonlocal_super_rel.
; 19-4-2021 - also for 'one' but the possessive one
super_reg_nom_rel := non_temp_nonpro_rel & reg_or_temp_nom_rel.
reg_nom_rel := super_reg_nom_rel.
one_nom_rel := super_reg_nom_rel.
; 23-4-2021 for place nouns (but different from place_n_rel becuase that is used for adv
; in this grammar). Split original norm_nom_rel into two parts. so that the place_nom_rel
; can be used as the COMPS of 'go'
place_norm_nom_rel := reg_nom_rel & non_temp_nbar_rel & norm_nom_or_place_rel.
norm_nom_rel := place_norm_nom_rel.
place_nom_rel := place_norm_nom_rel.
;;; not used anymore because there will be no more new lextype for 'go'
; but instead, all the special locative nouns will have a new type that allows it to undergo
; the npmod_adv rule
; 4-5-2021 - new rel types for 'market' and 'school' lexical entries that can become
; npadv_mod. <ex>I go school
_school_p_rel := dir_or_state_nontemp_rel.
_market_p_rel := dir_or_state_nontemp_rel.
; 29-4-2021 - for the possessive 'one' so that it doesn't undergo the bnp rule
one_poss_rel := place_norm_nom_rel.
; 29-4-2021 for the proper noun after it becomes a det
; sort of modelled after _the_q_rel, mostly so it cannot unify with compos_spec_rel
_pnspr_q_rel := def_explicit_q_rel & dofw_or_poss_or_def_q_rel.
;4-5-2021 for kinship terms *unused*
;diadic_nom_super_rel := reg_diadic_nom_rel & norm_nom_rel.
;diadic_nom_rel := diadic_nom_super_rel.
;kinship_nom_rel := diadic_nom_super_rel.
;;; moving these rels to a higher node in an attempt to get rid of the many particle
;;; head comp rules
; 23-5-2021 add in particle_rel as a sister of adv_rel
;particle_rel := abstr_adv_dim_rel.
;; 11-8-2021 add in sfadverb_rel as sister of adv_rel instead of just using adv_rel to prevent it
;; from hd-aj_int-unsl? no change to sister of particle 3
;; sfadverb_rel := abstr_adv_dim_rel.
;particle1_rel := particle_rel.
;particle2_super_rel := particle_rel.
;particle2b_rel := particle_rel.
;particle2_rel := particle2_super_rel.
;particle3_sfadv_rel := particle2_super_rel.
;particle3_rel := particle3_sfadv_rel.
;sfadverb_rel := particle3_sfadv_rel.
; 27-7-2021 for the new prodrop fragments *unused*
;unknown_super_rel := v_event_rel.
;unknown_rel := unknown_super_rel.
;unknown_sg_rel := unknown_super_rel.
; 15-12-2021 to group MIN of all verbs and adjectives together
; so that the SFPs can select their complements through MIN instead of
; through many separate rules for the different particles in the hierarchy
event_arg_dim_rel_super := event_mod_rel & basic_event_dim_rel.
;event_arg_dim_v_or_a_rel := event_arg_dim_rel_super.
event_arg_dim_rel := event_arg_dim_rel_super.
abstr_adj_rel := event_arg_dim_v_or_a_rel & adj_or_card_or_much_rel.
v_event_rel := verb_aspect_rel & event_arg_dim_v_or_a_rel.
;; to move to HEAD types
; to make particle rels not sisters of adv_rel but a daughter of event_arg_dim_rel_super
; so that particles can be grouped together with verbs and adj through a common MIN value
; in this case, all the super_rels contain verbs and adj
event_arg_dim_v_or_a_or_part_rel := event_arg_dim_rel_super.
particle3_rel := event_arg_dim_v_or_a_or_part_rel.
particle2_super_rel := event_arg_dim_v_or_a_or_part_rel.
particle2b_rel := event_arg_dim_v_or_a_or_part_rel.
particle2_rel := particle2_super_rel.
particle1_sfadv_rel := particle2_super_rel.
particle1_rel := particle1_sfadv_rel.
sfadverb_va_rel := particle1_sfadv_rel.
sfadverb_rel := sfadverb_va_rel.
event_arg_dim_v_or_a_rel := sfadverb_va_rel.