-
Notifications
You must be signed in to change notification settings - Fork 0
/
minimal-grammar.tdl
134 lines (96 loc) · 3.63 KB
/
minimal-grammar.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
;;; -*- Mode: TDL; Coding: utf-8 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Grammar of minimal-grammar
;;; created at:
;;; Fri Sep 27 06:21:16 UTC 2013
;;; based on Matrix customization system version of:
;;; Tue Jul 2 20:32:27 UTC 2013
;;;
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Type assigning empty mod list. Added to basic types for nouns, verbs and determiners.
non-mod-lex-item := lex-item &
[ SYNSEM.LOCAL.CAT.HEAD.MOD < > ].
;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Matrix Type Addenda
;;;;;;;;;;;;;;;;;;;;;;;;;
basic-head-comp-phrase :+ [ SYNSEM.LOCAL.CAT.MC #mc,
HEAD-DTR.SYNSEM.LOCAL.CAT.MC #mc ].
basic-head-mod-phrase-simple :+ [ SYNSEM.LOCAL.CAT.MC #mc,
NON-HEAD-DTR.SYNSEM.LOCAL.CAT.MC #mc ].
perfective := aspect.
present := tense.
past := tense.
future := tense.
;;;;;;;;;;;;;;;;;;;
;;; Lexical Types
;;;;;;;;;;;;;;;;;;;
;;; Nouns
noun-lex := basic-noun-lex & basic-one-arg & no-hcons-lex-item & non-mod-lex-item &
[ ARG-ST < #spr >,
SYNSEM.LOCAL.CAT.VAL [ COMPS < >,
SUBJ < >,
SPEC < >,
SPR < #spr &
[ LOCAL.CAT.HEAD det,
OPT + ] > ] ].
noun1-noun-lex := noun-lex.
noun2-noun-lex := noun-lex.
;;; Verbs
verb-lex := basic-verb-lex & non-mod-lex-item &
[ SYNSEM.LOCAL [ CAT.VAL [ SPR < >,
SPEC < >,
SUBJ < #subj > ],
CONT.HOOK.XARG #xarg ],
ARG-ST.FIRST #subj &
[ LOCAL [ CAT.VAL [ SPR < >,
COMPS < > ],
CONT.HOOK.INDEX #xarg ] ] ].
intransitive-verb-lex := verb-lex & intransitive-lex-item &
[ SYNSEM.LOCAL.CAT.VAL.COMPS < >,
ARG-ST.FIRST.LOCAL.CAT.HEAD noun ].
transitive-verb-lex := verb-lex & transitive-lex-item &
[ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps >,
ARG-ST < [ LOCAL.CAT.HEAD noun ],
#comps &
[ LOCAL.CAT [ VAL [ SPR < >,
COMPS < > ],
HEAD noun ] ] > ].
;;; Subject Raising Verb Lexeme.
sr-verb-lex := verb-lex &
[ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps >,
SYNSEM.LOCAL.CAT.VAL.SUBJ #subj,
SYNSEM.LOCAL.CAT.VAL.SUBJ.FIRST.LOCAL.AGR #agr,
SYNSEM.LOCAL.AGR #agr,
ARG-ST < [LOCAL.CAT.HEAD noun],
#comps & [ SYNSEM.LOCAL.CAT.VAL.SUBJ #subj ,
SYNSEM.LOCAL.CAT.VAL.COMPS <> ] >
].
auxiliary-verb-lex := sr-verb-lex.
verb1-verb-lex := intransitive-verb-lex.
verb2-verb-lex := transitive-verb-lex.
;;;;;;;;;;;;;;;;;;;
;;; Lexical Rules
;;;;;;;;;;;;;;;;;;;
;;; Lexical rule types
past-participle-lex-rule := infl-add-only-no-ccont-lex-rule &
[ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.ASPECT perfective ].
transitive-comp-delete-rule := local-change-only-lex-rule &
[ DTR transitive-verb-lex,
DTR.SYNSEM.LOCAL.CAT.HEAD verb,
SYNSEM.LOCAL.CAT.VAL.COMPS <> ].
;;;;;;;;;;;;;;;;;;;
;;; Phrasal Types
;;;;;;;;;;;;;;;;;;;
;Constraint on MC used to be part of matrix.tdl
;;it applies to all wo implementations, except for v2
head-comp-phrase := basic-head-1st-comp-phrase & head-initial.
subj-head-phrase := decl-head-subj-phrase & head-final &
[ HEAD-DTR.SYNSEM.LOCAL.CAT.VAL.COMPS < > ].
; Bare NP phrase. Consider modifying the PRED value of the quantifier relation
; introduced to match the semantic effect of bare NPs in your language.
bare-np-phrase := basic-bare-np-phrase &
[ C-CONT.RELS <! [ PRED "exist_q_rel" ] !> ].
auxiliary-verb-phrase := head-final &
[ SYNSEM.LOCAL.CAT.HEAD verb,
HEAD-DTR.SYNSEM.LOCAL.CAT.VAL.COMPS <> ].