-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathroots.tdl
48 lines (42 loc) · 1.83 KB
/
roots.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
;;; -*- Mode: TDL; Coding: utf-8 -*-
; A sample start symbol: Accept fully-saturated verbal
; projections only; if a grammar makes use of the head-subject and
; head-complement types as provided by the Matrix, this should be a
; good starting point. Note that it is legal to have multiple start
; symbols, but they all need to be listed as the value of
; `*start-symbol' (see `lkb/user-fns.lsp').
;;; DVM 2017-09-18: NON-LOCAL.SLASH 0-dlist is added so that INDRA won't be able to parse "makan" without subj
root := phrase &
[ SYNSEM [ LOCAL [ COORD -,
CAT [ VAL [ SUBJ < >,
COMPS < > ],
MC +,
HEAD +vjpc &
[ FORM finite ] ] ],
NON-LOCAL.SLASH 0-dlist ] ].
; This start symbol allows you to parse single words as stand-alone
; utterances. This can be useful for grammar debugging purposes.
;lex-root := word-or-lexrule.
;;; DVM 2017-01-09: added from Zhong, type for fragments
frag := phrase &
[ SYNSEM [ LOCAL [ CAT [ HEAD fragment_head,
VAL super-saturated ] ],
NON-LOCAL.SLASH 0-dlist ] ].
;;; DVM 2017-09-18: NON-LOCAL.SLASH 0-dlist is added
frag-v := phrase &
[ SYNSEM [ LOCAL [ COORD -,
CAT [ VAL valence,
MC +,
HEAD +vj &
[ FORM finite ] ] ],
NON-LOCAL.SLASH 0-dlist ] ].
;;; DVM 2017-12-14: add this to show NP parse tree
frag-n := phrase &
[ SYNSEM [ LOCAL [ COORD -,
CAT [ VAL saturated,
MC +,
HEAD noun ] ],
NON-LOCAL.SLASH 0-dlist ] ].
; Also need to add root constraint for bridged phrases
root-bridge := phrase &
[ SYNSEM.LOCAL.CAT.HEAD bridge-head & [ BRIDGED + ] ].