-
Notifications
You must be signed in to change notification settings - Fork 5
/
matrix.tdl
1394 lines (1105 loc) · 42.8 KB
/
matrix.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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; -*- Mode: TDL; Package: LKB -*-
;;;
;;; HPSG Grammar Matrix Version 0.9 (sort of)
;;;
;;; Copyright (c) 2002-2005
;;; Emily M. Bender, Dan Flickinger, Stephan Oepen
;;; see licence.txt for conditions
;;;
;;; Projects using the Grammar Matrix should reference
;;; http://www.delph-in.net/matrix, the version used
;;; and Bender, Flickiner, & Oepen 2002.
;;;
;;; Based on:
;;;
;;; LinGO Grammar: fundamentals.tdl
;;; Copyright Daniel Flickinger 1994-2001
;;; Initial development Rob Malouf, 3-Nov-1994
;;;
;;; JACY Grammar: fundamentals.tdl, mrsbasic.tdl
;;; Developed by Melanie Siegel, Emily M. Bender
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Top-level feature geometry
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Types for Sign, Word, Phrase, and Lex-Entry
;;; make STEM of type orthog(raphy) to pass up from/to/form
sign-min := avm &
[ STEM orthog ].
orthog := cons &
[ FROM string,
TO string ].
basic-sign := sign-min &
[ KEY-ARG bool ].
sign := basic-sign &
[ SYNSEM synsem,
ARGS list,
INFLECTED bool,
ROOT bool ].
; C-CONT encodes the semantic contribution of the rule (phrasal
; or lexical).
phrase-or-lexrule := sign &
[ SYNSEM canonical-synsem &
[ LOCAL.CONT.HOOK #hook],
C-CONT mrs-min & [ HOOK #hook] ].
word-or-lexrule-min := sign-min.
; ALTS allow lexical entries to block lexical rule application
word-or-lexrule := word-or-lexrule-min & sign &
[ ALTS alts-min ].
alts-min := avm.
alts := alts-min &
[ PASSIVE bool ].
no-alts := alts-min.
; Not all words have lex-synsem - e.g. lexical PPs like "tomorrow" are
; phr-synsem since they can be post-nominal modifiers.
word := word-or-lexrule &
[ ROOT - ].
lex-item := word-or-lexrule.
norm-lex-item := lex-item &
[ SYNSEM [ LOCAL.CONT [ HOOK [ LTOP #ltop,
INDEX #index ],
RELS.LIST.FIRST #keyrel ],
LKEYS.KEYREL #keyrel & [ LBL #ltop,
ARG0 #index ] ] ].
; (MS 2003-12-17) We cannot safely switch to the Matrix 0.6 definition of lexeme.
; This needs some fundamental adaptations of the word and lexeme concepts.
;lexeme := norm-lex-item &
; [ INFLECTED - ].
;; Not all phrases have SYNSEM phr-synsem, since we need to allow the
;; head-comp rules to build signs which are still [ SYNSEM lex-synsem
;; ], for constructions like "twenty-two" and "five fifteen p.m.". So
;; most phrases will assign the type phr-synsem to the value of
;; SYNSEM, but not all.
; Phrases don't have argument structure, but ARG-S is a feature
; of local, not sign. So rather than have subtypes of local for
; phrases and lexical items, constrain phrases to have empty ARG-S.
phrase := phrase-or-lexrule &
[ SYNSEM.LOCAL.ARG-S < >,
ROOT bool ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Affixation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
non-affix-bearing := word-or-lexrule &
[ INFLECTED + ].
; Rule
rule := sign &
[ RULE-NAME string ].
; LABEL-NAME and META used for labeling nodes in parse trees
tree-node-label := *top* &
[ NODE sign ].
label := sign &
[ LABEL-NAME string ].
; For complex node labels, like S/NP
meta := sign &
[ META-PREFIX string,
META-SUFFIX string ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SYNSEM values
; ERB 2007-02-05 Moving to an analysis of discourse status/cognitive
; status of referents following Borthen & Haugereid 2005. Replacing
; DEF and DEF-OPT with COG-ST and OPT-CS.
synsem-min := avm &
[ OPT bool,
OPT-CS cog-st,
LOCAL mod-local,
NON-LOCAL non-local-min ].
lex-or-phrase-synsem := synsem-min &
[ LEX bool ].
synsem := synsem-min.
expressed-synsem := synsem.
canonical-synsem := expressed-synsem &
[ MODIFIED xmod ].
lex-synsem := canonical-synsem & lex-or-phrase-synsem &
[ LOCAL local-min,
LEX +,
LKEYS lexkeys ].
; ERB (2005-08-10) We want to make sure that head-comp phrases
; don't have the feature LKEYS, even if they are LIGHT +.
phr-synsem-min := canonical-synsem & lex-or-phrase-synsem &
[ LOCAL local-min ].
phr-synsem := phr-synsem-min &
[ LEX - ].
non-canonical := synsem &
[ LOCAL.CONT.HOOK.INDEX event-or-ref-index ].
expressed-non-canonical := non-canonical & expressed-synsem.
gap := expressed-non-canonical &
[ LOCAL #local,
NON-LOCAL [ REL 0-dlist,
QUE 0-dlist,
SLASH 1-dlist &
[ LIST < #local > ] ] ].
unexpressed := synsem-min &
[ NON-LOCAL [ SLASH 0-dlist,
REL 0-dlist,
QUE 0-dlist ] ].
unexpressed-reg := unexpressed & non-canonical.
anti-synsem := unexpressed.
; &
;"A contrasting type to ordinary synsems (expressed
;and unexpressed) which is sometimes useful. No longer
;explicitly used in the Matrix.".
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LOCAL & NON-LOCAL values
; The feature AGR is introduced on LOCAL rather than on CAT (or on HEAD) since
; coordination schema unify the CAT value of the daughters with that of then
; mother, but need to be able to change AGR on the mother (to get plural
; agreement on verb when subject is a coordinated NP with "and" vs. "or").
mod-local := avm.
local-min := mod-local &
[ CAT cat-min,
CONT mrs-min,
AGR individual ].
local := local-min &
[ CTXT ctxt-min,
ARG-S list ].
; Types for distinguishing scopal v. intersective modifiers.
; (These types are used in the MOD value of modifiers, and
; referenced by the scopal/intersective head-adjunct rules.)
scopal-mod := local.
intersective-mod := local.
non-local-min := avm.
non-local := non-local-min &
[ SLASH 0-1-dlist,
QUE 0-1-dlist,
REL 0-1-dlist ].
non-local-none := non-local &
[ SLASH 0-dlist & [ LIST < > ],
QUE 0-dlist,
REL 0-dlist ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CAT values
cat-min := avm.
; ERB 2004-05-05 Following ERG, add a feature HC-LIGHT which indicates
; whether a head-comp phrase projected from a head is treated as light
; or heavy. That is, whether or not a phrase consisting of heads and
; complements is light or heavy is taken to be a lexical property of
; the head.
; MC stands for 'Main clause', and is used to distinguish phenomena
; which can only occur in main (+) or subordinate clauses (-). The
; value of MC is luk, allowing for a third possibility of na, for
; not applicable.
cat := cat-min &
[ HEAD head-min,
VAL valence-min,
MC luk,
HC-LIGHT luk,
POSTHEAD bool ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; HEAD & VAL
head-min := avm.
; It is expected that head will have many more features, but it
; is not yet clear which are relevant crosslinguistically. In
; the English grammar, HEAD features include CASE, PRD, AUX, INV,
; TAM, and VFORM. (Re: TAM --- it is sometimes useful to have the
; semantic information encoded in EVENT.E accessible via the head
; path.)
; Which subtypes of head are necessary and which head features are
; declared for which subtypes is also a language-specific question.
head := head-min &
[ MOD list,
KEYS keys_min ].
valence-min := avm.
valence := valence-min &
[ SUBJ list,
SPR list,
COMPS list,
SPEC list,
--KEYCOMP avm ].
keys_min := avm.
keys := keys_min &
[ KEY predsort,
ALTKEY predsort ].
; One of a grammatically salient inventory of semantic sorts, such as
; 'animate' or 'time'
semsort := sort.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CONT values
;
; HOOK : Externally visible attributes of a sign
; RELS diff-list ; List of semantic relations
; HCONS diff-list ; Scope constraints: list of qeq's
mrs-min := avm.
; ERB 2007-01-21 Removing feature MSG here (moving it to a feature--SF---
; of events).
mrs := mrs-min &
[ HOOK hook,
RELS diff-list,
HCONS diff-list ].
; HOOK values include
; LTOP ; Local top handle
; INDEX ; The salient nominal instance or event
; XARG ; The external (controlled) argument of a phrase
hook := avm &
[ GTOP handle,
LTOP handle,
INDEX individual,
XARG individual ].
; MRSs are divided into psoas (with a distinguished event) and
; nom-objs (with a distinguished index). We use a polymorphic
; attribute name INDEX for both of these, to simplify manipulation of
; these objects; for example, modifying PPs assign as their ARG's
; value the INDEX of the phrase they modify, whether it's an N-bar
; (with a ref-ind value) or a VP (with an event value). Similarly
; useful for coordination.
psoa := mrs &
[ HOOK.INDEX event ].
nom-obj := mrs &
[ HOOK.INDEX index ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LKEYS attributes, providing pointers to semantic relations and complement
; predsorts in lexical types:
; KEYREL relation ; Pointer to main relation in RELS
; ALTKEYREL relation ; Pointer to an alternate relation in RELS
; --COMPKEY predsort ; Pointer to the first complement's KEY predsort
; --OCOMPKEY predsort ; Pointer to the oblique complement's KEY predsort
; lexkeys := avm &
; [ KEYREL relation,
; ALTKEYREL relation,
; --COMPKEY predsort,
; --OCOMPKEY predsort ].
;;
;;; Moving to this may save some space (DPF and FCB 2008-08-05)
;;;
lexkeys := avm &
[ KEYREL relation ].
lexkeys_full := lexkeys &
[ ALTKEYREL relation,
--COMPKEY predsort,
--OCOMPKEY predsort ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CTXT values
ctxt-min := avm.
ctxt := ctxt-min &
[ ACTIVATED bool,
PRESUP diff-list ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Basic semantic types
; The message represents the semantic type of a clause (cf. Ginzburg &
; Sag 2000). All clauses have messages. Elements that take clauses
; as semantic arguments should end up with the LBL of the clause as
; the value of ARGn, L/R-HNDL, etc. The MARG (message argument) of a
; message is a handle that qeqs the LBL of the main verb in the clause.
; This leaves room for quantifiers to scope at each clause without
; allowing scope ambiguity between quanitifers and messages, as it is
; not clear what that would mean.
; basic_message := relation.
; message := basic_message &
; [ PRED message_m_rel,
; MARG handle ].
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; Message preds
; message_m_rel := predsort.
; command_m_rel := message_m_rel.
; prop-or-ques_m_rel := message_m_rel. ;for COMPS of e.g. 'know'
; proposition_m_rel := prop-or-ques_m_rel.
; abstr-ques_m_rel := prop-or-ques_m_rel.
; question_m_rel := abstr-ques_m_rel.
; no-msg := basic_message.
; ; Subtype of int_rel for tag questions and structures in other languages
; ; with equivalent pragmatics.
; ne_m_rel := abstr-ques_m_rel.
; Constrains handle of scopable argument HARG relative to one
; outscoped LARG handle (the "H" is mnemonic for either "higher" or
; "hole" argument, while the "L" is mnemonic for either "lower" or
; "label" argument.
qeq := avm &
[ HARG handle,
LARG handle ].
semarg := avm &
[ INSTLOC string ].
;"INSTLOC is used by generator to index input. Changed from
;value instloc to value string in July 2004. The grammar
;should never need to make reference to it beyond this."
handle := semarg.
individual := semarg &
[ SORT semsort ].
; The INDEX value of a nom-obj is an index (expletive or
; referential).
; ERB 2004-05-10 Add a feature DEF which encodes definiteness
; for (in)definite null instantiation, and possibly other uses.
; The null instantiation use might get superceded by a Sem-I based
; solution.
; ERB 2007-02-05 Moving to an analysis of discourse status/cognitive
; status of referents following Borthen & Haugereid 2005. Replacing
; DEF and DEF-OPT with COG-ST and OPT-CS.
; ERB 2007-05-16 Can't put SPECI inside COG-ST, or the generator won't
; pay attention to the value of COG-ST. So, making it parallel.
index := individual &
[ COG-ST cog-st,
SPECI bool ].
; ERB 2007-02-05 Hierarchy from Borthen and Haugereid of possible
; COG-ST values. Departing from B&H analysis by putting SPECI on
; this type (as well as by making COG-ST a feature of indicies rather
; than parallel to the indices in the next level up).
cog-st := avm.
activ-or-less := cog-st.
uniq-or-more := cog-st.
uniq+fam+act := activ-or-less & uniq-or-more.
fam-or-less := activ-or-less.
fam-or-more := uniq-or-more.
activ+fam := uniq+fam+act & fam-or-more.
uniq+fam := uniq+fam+act & fam-or-less.
uniq-or-less := fam-or-less.
activ-or-more := fam-or-more.
type-id := uniq-or-less.
uniq-id := uniq-or-less & uniq+fam.
familiar := uniq+fam & activ+fam.
activated := activ+fam & activ-or-more.
in-foc := activ-or-more.
; This is the type of the index of the phrase modified by predicative
; PPs, which can either modify a ref-ind nominal or an event VP.
event-or-ref-index := individual.
; Expletives get distinguished index type so they can be
; selected semantically. In English, this type has subtypes
; for it and there. Most languages have at most one expletive,
; so those aren't included here.
expl-ind := index.
ref-ind := index & event-or-ref-index &
[ PNG png ].
; Types encoding agreement information, analyzed as a part of the
; index, following Pollard & Sag 1994. Which subtypes and features
; are appropriate seems highly language dependent. The agreement
; system of English doesn't justify a full cross-classification of
; number and gender, so the features of png are PN and GENDER in the
; English grammar. (See Flickinger 2000.) Sag & Wasow 1999 declare
; GENDER as a feature of the png type 3sg.
png := avm.
; Create subtypes of tense, aspect and mood as appropriate.
tense := sort.
aspect := sort.
mood := sort.
tam := avm &
[ TENSE tense,
ASPECT aspect,
MOOD mood ].
; Sentence force: SF, this replaces MSG.
iforce := avm.
prop-or-ques := iforce.
prop := prop-or-ques.
ques := prop-or-ques.
comm := iforce.
; for 'ne' questions
ne-sf := ques.
event := event-or-ref-index &
[ E tam,
SF iforce ].
; Coordinated phrases have coordinated indices as their INDEX
; values. These are meant to be interpreted as pointers to
; the set of coordinated indices.
; Name changed in Matrix 9.0
conj-index := event-or-ref-index.
conj-event := conj-index & event.
conj-ref-ind := conj-index & ref-ind.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Basic relation types
; Relations are classified according to the types of arguments they take. All
; relations have a handle. In addition, quantifier relations have a bound
; variable and a restriction, nominal relations have an instance, and event
; relations have an event. Furthermore, nominal relations and event relations
; can have additional roles, depending on their meaning.
; WLINK links semantic relation to input string elements, more or less.
; This becomes useful whenever a grammar is used in some application.
; (MS 2004-06-14) Added CFROM and CTO to get the character positions in the RMRS.
; relation := avm &
; [ LBL handle,
; WLINK list,
; PRED predsort,
; CFROM *top*,
; CTO *top* ].
; changed WLINK to LNK to humour oe ? now change it back ? Can we lose CFROM/CTO ???
relation := avm &
[ LBL handle,
LNK list,
PRED predsort,
CFROM *top*,
CTO *top* ].
; Abstract relation subtypes. We recommend not positing a type
; for each lexical relation, but rather using the feature PRED
; to distinguish different lexical relations of the same type.
; Relation types are modified in one of two circumstances:
;
; (i) A feature needs to be introduced that is relevant for some
; relations and not others, or
;
; (ii) Something in the grammar needs to make reference to a family
; of relations that are not otherwise distinguished by a type.
arg0-relation := relation &
[ ARG0 individual ].
arg1-relation := arg0-relation &
[ ARG1 semarg ].
arg12-relation := arg1-relation &
[ ARG2 semarg ].
arg123-relation := arg12-relation &
[ ARG3 semarg ].
arg1234-relation := arg123-relation &
[ ARG4 semarg ].
event-relation := arg0-relation &
[ ARG0 event ].
arg1-ev-relation := arg1-relation & event-relation.
arg12-ev-relation := arg1-ev-relation & arg12-relation.
arg123-ev-relation := arg12-ev-relation & arg123-relation.
arg1234-ev-relation := arg123-ev-relation & arg1234-relation.
; Noun relations
noun-relation := arg0-relation &
[ ARG0 ref-ind ].
; Relational nouns like 'picture' or 'claim' take an additional semantic
; argument
noun-arg1-relation := noun-relation & arg1-relation.
; (ERB 2004-1-14) Change to make number names analysis possible.
; I'll try to propagate this change into the main source for the matrix.
const-value-relation := relation &
[ CARG *top* ].
; (MS 2005-07-18) In order to get the generics entries into the grammar,
; CARG should be *top* instead of string
named-relation := noun-relation & const-value-relation &
[ PRED named_rel,
CARG *top* ].
; Preposition relations
prep-mod-relation := arg12-ev-relation.
; adverb relations
; NB: Negation is represented not as a subtype of adv-relation, but as an
; adv-relation with the PRED value neg_rel.
;;; FCB fixed
;adv-relation := arg0-relation.
adv-relation := arg1-ev-relation.
; coordinating and subordinating conjunctions
; (MS 2004-06-24) changed the handle to semarg, otherwise it won't scope
; in n compounds.
subord-or-conj-relation := arg0-relation &
[ L-HNDL semarg,
R-HNDL semarg ].
;;; (FCB 2006-06-02) changed to allow for event conjunction
conjunction-relation := subord-or-conj-relation &
[ L-INDEX event-or-ref-index,
R-INDEX event-or-ref-index ].
; NB: "if_then_rel" is now a PRED value of subord-relation.
; currently it is sconjunction relation FCB
subord-relation := subord-or-conj-relation & event-relation.
; noun noun compounds
unspec-compound-relation := arg12-relation &
[ ARG1 ref-ind,
ARG2 ref-ind ].
; quantifier relation
quant-relation := arg0-relation &
[ ARG0 ref-ind,
RSTR handle,
BODY handle ].
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; predsorts
norm_rel := predsort.
named_rel := norm_rel.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Head types
; Values for head features such as CASE, VFORM, ...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Sorts for atomic values
; person, number and gender
; clause mode
; voice
; mood
; pronoun type
; Three-valued sort evoking Polish logician Jan Lukasiewicz
luk := sort.
; These types allow the statement of constraints (e.g., in
; subcategorization) of the form: If you care, you must have
; the value + (-), but you don't have to care. Useful for keeping
; down the number of constructions and subcategorization types.
na-or-+ := luk.
na-or-- := luk.
+-or-- := luk.
na := na-or-+ & na-or--.
bool := luk.
+ := bool & na-or-+ & +-or--.
- := bool & na-or-- & +-or--.
; Three-valued sort for distinguishing unmodified signs from both
; left-modified and right-modified signs PERIPH indicates whether this
; modifier is left- or right-peripheral in its phrase - e.g., "the IBM
; temporary employees" but "*the IBM five employees"
xmod := sort &
[ PERIPH luk ].
notmod-or-rmod := xmod.
notmod-or-lmod := xmod.
notmod := notmod-or-rmod & notmod-or-lmod.
hasmod := xmod.
lmod := hasmod & notmod-or-lmod.
rmod := hasmod & notmod-or-rmod.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Basic types
sort := *top*.
predsort := sort.
atom := predsort.
no-pred := predsort.
avm := *top*.
list := avm.
cons := list &
[ FIRST *top*,
REST *top* ].
0-1-list := list.
1-list := 0-1-list & cons &
[ REST null ].
null := 0-1-list.
1-plus-list := cons &
[ REST cons ].
diff-list := avm &
[ LIST list,
LAST list ].
0-1-dlist := diff-list &
[ LIST 0-1-list ].
0-dlist := 0-1-dlist &
[ LIST #list,
LAST #list ].
1-dlist := 0-1-dlist &
[ LIST 1-list &
[ REST #rest & null ],
LAST #rest ].
; This type shows the basic form for diff-list appends.
; It is not meant to be used as a supertype. Actual instances
; of diff-list append will involve different features in different
; relationships to each other & the feature geometry.
dl-append := avm & [APPARG1 [LIST #first,
LAST #between],
APPARG2 [LIST #between,
LAST #last],
RESULT [LIST #first,
LAST #last]].
integer := atom.
; NB: strings should be enclosed in double quotes, e.g., [PRED "named_rel"].
;string := atom.
; (MS 2004-06-14) Added values for cfrom and cto to get the character
; positions in the RMRS (parallel to ERG). Therefore, string has to be redefined.
initial-cfrom-val := atom.
initial-cto-val := atom.
string := initial-cfrom-val & initial-cto-val.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Some useful kinds of lists
; A list of optional arguments.
olist := list.
ocons := olist & cons &
[ FIRST unexpressed & [ OPT + ],
REST olist ].
onull := olist & null.
; The LinGO grammar also makes use of a prolist -- or list
; of synsems of type pro-ss.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Lexical rules
; Grammars should be monotonic in their construction of semantic
; representations. That is, as the tree is built, no relations should
; ever be thrown away. This has implications for the way lexical rules
; are written. If two forms are related to each other, and one has
; more semantic relations than the other, it has to be the output.
; We are interested in cases where this constraint is or appears to
; be problematic.
;
; added IDIOM (CH)
;
lex-rule := phrase-or-lexrule & word-or-lexrule &
[ IDIOM #idiom,
NEEDS-AFFIX bool,
SYNSEM.LOCAL.CONT [ RELS [ LIST #first,
LAST #last ],
HCONS [ LIST #hfirst,
LAST #hlast ] ],
DTR #dtr & word-or-lexrule &
[ SYNSEM.LOCAL.CONT [ RELS [ LIST #first,
LAST #middle ],
HCONS [ LIST #hfirst,
LAST #hmiddle ] ],
ALTS #alts,
IDIOM #idiom],
C-CONT [ RELS [ LIST #middle,
LAST #last ],
HCONS [ LIST #hmiddle,
LAST #hlast ]],
ALTS #alts,
ARGS < #dtr > ].
; Lexical rules vary on two dimensions: whether they are lexeme-to-lexeme
; or lexeme-to-word and whether or not they involve spelling changes.
; Accordingly, we define four subtypes of lex-rule, which have
; four cross-classified glb subtypes:
; Note that the lexeme/word distinction is represented via a feature
; [INFLECTED bool] rather than as a type. We find this more convenient,
; as it allows certain words to be [INFLECTED +] from the start without
; having to twist the hierarchy too much (especially if one makes use
; of defaults).
; Lexeme-to-word rules are hypothesized to monotonically add synsem
; information.
lexeme-to-word-rule := lex-rule &
[ INFLECTED +,
KEY-ARG #keyarg,
SYNSEM #synsem,
ROOT #root,
DTR [ INFLECTED -,
KEY-ARG #keyarg,
SYNSEM #synsem,
ROOT #root ],
C-CONT.RELS <! !> ].
; Lexeme-to-lexeme rules can make more radical changes to the SYNSEM value.
lexeme-to-lexeme-rule := lex-rule & lexeme &
[ INFLECTED #infl,
SYNSEM.LOCAL.CAT.MC #mc,
DTR [ INFLECTED #infl,
SYNSEM.LOCAL.CAT.MC #mc ] ].
; Spelling changing rules. The LKB identifies these rules based
; on the NEEDS-AFFIX value.
inflecting-lex-rule := lex-rule &
[ NEEDS-AFFIX + ].
; Spelling-preserving rules copy up the STEM (orthography) of
; the daughter.
constant-lex-rule := lex-rule &
[ STEM #stem,
DTR [ STEM #stem ]].
; Cross-classified glb types
const-ltol-rule := lexeme-to-lexeme-rule & constant-lex-rule.
infl-ltol-rule := lexeme-to-lexeme-rule & inflecting-lex-rule.
const-ltow-rule := lexeme-to-word-rule & constant-lex-rule.
infl-ltow-rule := lexeme-to-word-rule & inflecting-lex-rule.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Phrase structure rules
; Headed phrases must obey the Head Feature Principle and the Revised
; Marking Principle. They do not all obey the NLFP with respect to
; QUE, but it appears that all CLAUSE phrases account for QUE on
; mother and non-head-dtr. Hence moved the QUE coreference to
; NON-CLAUSE. Headed phrases also identify the value of AGR on mother
; and head daughter, unlike e.g. the coordination schemata which
; identify HEAD but not AGR.
; (MS 2003-12-17) This is the place, where I have to change the Matrix. I need the NONHEAD-DTR already here, because I want to use it in the empty-head-type.
headed-phrase := phrase &
[ ROOT -,
SYNSEM.LOCAL [ CAT.HEAD head & #head,
AGR #agr ],
HEAD-DTR.SYNSEM.LOCAL local &
[ CAT.HEAD #head,
AGR #agr ],
NON-HEAD-DTR sign ].
non-headed-phrase := phrase &
[ ROOT - ].
; Most but not all phrases have SYNSEM phr-synsem; head-complement
; constructions have their SYNSEM type determined by the head-dtr.
phrasal := phrase &
[ SYNSEM phr-synsem ].
; Head/nexus phrases pass up the REL and QUE values of the head daughter
; (which has amalgamated the REL and QUE values of its arguments as in
; Sag 1997) to the mother.
head-nexus-rel-phrase := headed-phrase &
[ SYNSEM.NON-LOCAL.REL #rel,
HEAD-DTR.SYNSEM.NON-LOCAL.REL #rel ].
head-nexus-que-phrase := headed-phrase &
[ SYNSEM.NON-LOCAL.QUE #que,
HEAD-DTR.SYNSEM.NON-LOCAL.QUE #que ].
head-nexus-phrase := head-nexus-rel-phrase & head-nexus-que-phrase.
; In a head/local dependent phrase, the SLASH feature of the mother is
; token-identical to that of the head daughter, which has already amalgamated
; the SLASH values of its arguments. See discussion of head-nexus-phrase for
; treatment of REL and QUE.
head-valence-phrase := head-nexus-phrase &
[ SYNSEM.NON-LOCAL.SLASH #slash,
HEAD-DTR.SYNSEM.NON-LOCAL.SLASH #slash ].
; All phrases are either unary or binary.
;;;
;;; Idiom Implementation (CH 060804)
;;;
basic-unary-phrase := phrase &
[ STEM #stem,
IDIOM #idiom,
SYNSEM.LOCAL.CONT [ RELS [ LIST #first,
LAST #last ],
HCONS [ LIST #scfirst,
LAST #sclast ] ],
C-CONT [ RELS [ LIST #middle,
LAST #last ],
HCONS [ LIST #scmiddle,
LAST #sclast ] ],
ARGS < sign & [ STEM #stem,
SYNSEM.LOCAL local &
[ CONT [ RELS [ LIST #first,
LAST #middle ],
HCONS [ LIST #scfirst,
LAST #scmiddle ] ] ],
ROOT -,
IDIOM #idiom] > ].
unary-phrase := basic-unary-phrase &
[ INFLECTED +,
ARGS < [ INFLECTED + ] > ].
;;;
;;; Idiom Implementation (CH 060804)
;;;
basic-binary-phrase := phrase &
[ IDIOM #idiom,
SYNSEM.LOCAL.CONT [ RELS [ LIST #first,
LAST #last ],
HCONS [ LIST #scfirst,
LAST #sclast ] ],
C-CONT [ RELS [ LIST #middle2,
LAST #last ],
HCONS [ LIST #scmiddle2,
LAST #sclast ] ],
ARGS < sign & [ IDIOM #idiom,
SYNSEM.LOCAL local &
[ CONT [ RELS [ LIST #first,
LAST #middle1 ],
HCONS [ LIST #scfirst,
LAST #scmiddle1 ] ] ],
ROOT - ],
sign & [ IDIOM #idiom,
SYNSEM.LOCAL local &
[ CONT [ RELS [ LIST #middle1,
LAST #middle2 ],
HCONS [ LIST #scmiddle1,
LAST #scmiddle2 ] ] ],
ROOT - ] > ].
; basic-binary-phrase := phrase &
; [ SYNSEM.LOCAL.CONT [ RELS [ LIST #first,
; LAST #last ],
; HCONS [ LIST #scfirst,
; LAST #sclast ] ],
; C-CONT [ RELS [ LIST #middle2,
; LAST #last ],
; HCONS [ LIST #scmiddle2,
; LAST #sclast ] ],
; ARGS < sign & [ SYNSEM.LOCAL local &
; [ CONT [ RELS [ LIST #first,
; LAST #middle1 ],
; HCONS [ LIST #scfirst,