-
Notifications
You must be signed in to change notification settings - Fork 5
/
rule-types.tdl
2581 lines (2200 loc) · 88.2 KB
/
rule-types.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; Coding: utf-8 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; file: %Z% %M%
;;; module:
;;; version: %I%
;;; written by:
;;; last update: %G% --- %U%
;;; updated by:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; author | date | modification
;;; ------------------|-------------|------------------------------------------
;;;Melanie Siegel(MS) | | Emily Bender (ERB), Francis Bond (FCB),
;;; | | Chikara Hashimoto (CH),
;;; | | Akira Ohtani (AO), Michael Goodman (MWG)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
rule-type := phrase-or-lexrule.
;;; for rules with only one thing in their C-CONT, link FROM/TO to CFROM/CTO
c-cont-1 := phrase-or-lexrule &
[ STEM [FROM #from,
TO #to ],
C-CONT.RELS <! [ CFROM #from,
CTO #to ] !>].
c-cont-2 := phrase-or-lexrule &
[ STEM [FROM #from,
TO #to ],
C-CONT.RELS <! [ CFROM #from,
CTO #to ],
[ CFROM #from,
CTO #to ] !>].
phrasal_sign := phrase-or-lexrule.
; (MS 2002-05-02) We need a phrasal sign that does not compose the RELS's
; to account for quasi-morphological rules (suffixes that are separated by CHASEN
; from the words they belong to).
binary-basic := binary-phrase & que-princ &
[SYNSEM [NON-LOCAL [REL #refl,
ROBUST #robust,
UNDERSPEC_ARG #uarg],
LOCAL [CTXT [C-INDICES [ADDRESSEE #add,
SPEAKER #sp],
EMPATHY [EMPER #sp,
EMPEE #emp]],
ARG-S <>]],
ARGS < sign & [SYNSEM [LOCAL [CTXT [C-INDICES [ADDRESSEE #add,
SPEAKER #sp],
EMPATHY [EMPER #sp,
EMPEE #emp]]],
NON-LOCAL [REL #refl,
ROBUST #robust,
UNDERSPEC_ARG #uarg]]],
sign & [SYNSEM [NON-LOCAL [REL #refl,
ROBUST #robust,
UNDERSPEC_ARG #uarg],
LOCAL [CTXT [C-INDICES [ADDRESSEE #add,
SPEAKER #sp],
EMPATHY [EMPER #sp,
EMPEE #emp]]]]] > ].
; (ERB 2002-02-11) Changing embedded-question-rule from a unary rule
; to a binary rule. So now we need an exception to the QUE amalgamation
; in binary rules. Making a super type that has all of the original
; constraints on binary except the QUE passing.
binary-super := binary-phrase.
binary := binary-super & que-princ.
binary-cont-final-type := binary &
[SYNSEM.LOCAL.CONT.HOOK #hook,
ARGS < sign,
sign & [ SYNSEM [LOCAL.CONT.HOOK #hook]] >].
binary-cont-first-type := binary &
[SYNSEM [LOCAL.CONT.HOOK #hook],
ARGS < sign & [ SYNSEM [LOCAL.CONT.HOOK #hook]],
sign >].
binary-modification-type := affix-list & basic-binary-phrase & que-princ & speaker-addr-principle.
binary-type-mod := binary-modification-type & binary-headed-phrase &
[SYNSEM [LOCAL [CAT [VAL #val]],
LEX -],
HEAD-DTR.SYNSEM [LOCAL [CAT [VAL #val]]]].
; (MS 2004-12-22) This shouldn't inherit the LTOP from its second arg.
; (see sentence-te-coordination)
; (ms 2005-12-21) Shouldn't the INDEX come from the second ARG? -> "この香水を少しだけ付けてごらんなさい。"
; (FCB 2006-03-12) If the INDEX is the second ARG then NP semantics are incoherent
; I think it should be the C-ARG from the conjunct, which should be linked to the index of the 1st arg.
binary-type-conj := binary-modification-type &
[LMORPH-BIND-TYPE #lmorph,
RMORPH-BIND-TYPE #rmorph,
SYNSEM.LOCAL [CAT [HEAD #head,
VAL #val]],
ARGS < [LMORPH-BIND-TYPE #lmorph] ,
[RMORPH-BIND-TYPE #rmorph,
SYNSEM.LOCAL [CAT [HEAD #head,
VAL #val]]]
> ].
;;; Added Idiom (CH 060804)
unary-type-super := phrasal_sign &
[IDIOM #idiom,
SYNSEM [LOCAL [CTXT [C-INDICES [ADDRESSEE #add,
SPEAKER #sp],
EMPATHY [EMPER #sp,
EMPEE #emp]],
CONT [HOOK #hook,
RELS [LIST #list,
LAST #last],
HCONS [LIST #sclist,
LAST #sclast]]],
NON-LOCAL #nonloc],
C-CONT mrs & [HOOK #hook,
RELS diff-list & [LIST #list,
LAST #middle],
HCONS diff-list & [LIST #sclist,
LAST #scmiddle]],
ARGS < [IDIOM #idiom,
SYNSEM [LOCAL [CTXT [C-INDICES [ADDRESSEE #add,
SPEAKER #sp],
EMPATHY [EMPER #sp,
EMPEE #emp]],
CONT [RELS [LIST #middle,
LAST #last],
HCONS [LIST #scmiddle,
LAST #sclast]]],
NON-LOCAL #nonloc]] >].
unary-type := unary-type-super &
[ARGS.FIRST.SYNSEM.LOCAL.CAT.VAL saturated,
SYNSEM.LEX - ].
head-final-type := binary-headed-phrase & speaker-addr-principle &
[SYNSEM [NON-LOCAL [ROBUST #rob,
UNDERSPEC_ARG #uarg],
LOCAL.CTXT.BACKGROUND [LIST #list,
LAST #last]],
NON-HEAD-DTR #nh-dtr & [SYNSEM [NON-LOCAL [ROBUST #rob,
UNDERSPEC_ARG #uarg],
LOCAL.CTXT.BACKGROUND [LIST #list,
LAST #middle]]],
HEAD-DTR #head-dtr & [SYNSEM [NON-LOCAL [ROBUST #rob,
UNDERSPEC_ARG #uarg],
LOCAL.CTXT.BACKGROUND [LIST #middle,
LAST #last]]],
ARGS <#nh-dtr,#head-dtr>].
; (ERB 2001-08-06) Adding this for head-initial hcomps in number names.
head-initial-type := binary-headed-phrase &
affix-list &
speaker-addr-principle &
[SYNSEM [NON-LOCAL [ROBUST #rob,
UNDERSPEC_ARG #uarg],
LOCAL.CTXT.BACKGROUND [LIST #list,
LAST #last]],
NON-HEAD-DTR #nh-dtr & [SYNSEM [NON-LOCAL [ROBUST #rob,
UNDERSPEC_ARG #uarg],
LOCAL.CTXT.BACKGROUND [LIST #list,
LAST #middle]]],
HEAD-DTR #head-dtr & [SYNSEM [NON-LOCAL [ROBUST #rob,
UNDERSPEC_ARG #uarg],
LOCAL.CTXT.BACKGROUND [LIST #middle,
LAST #last]]],
ARGS <#head-dtr,#nh-dtr>].
;head-final-type-modconj := binary-modification-type &
; [
; CONJ-DTR #nh-dtr,
; HEAD-DTR #head-dtr,
; ARGS <#nh-dtr,#head-dtr>].
head-first-type-mod := binary-type-mod &
[
NON-HEAD-DTR #nh-dtr,
HEAD-DTR #head-dtr,
ARGS <#head-dtr,#nh-dtr>].
head-final-type-mod := binary-type-mod &
[
NON-HEAD-DTR #nh-dtr,
HEAD-DTR #head-dtr,
ARGS <#nh-dtr,#head-dtr>].
head-first-type := binary-headed-phrase &
affix-list &
speaker-addr-principle &
[SYNSEM [LOCAL.CAT.VAL #val],
NON-HEAD-DTR #nh-dtr,
HEAD-DTR #head-dtr & [SYNSEM.LOCAL.CAT.VAL #val],
ARGS <#head-dtr,#nh-dtr>].
;(MS 2003-12-17) Adapt that to Matrix 0.6
; (MS 2004-12-22) no MOD-IND/MOD-HAND
head-subject-rule := head-final-type &
scp-sbj &
que-princ &
adjacent_subjbind_check &
adjacent_nonhead_check &
affix-list &
[J-NEEDS-AFFIX -,
SYNSEM [LOCAL [CONT.HOOK [INDEX #ind,
LTOP #top],
CAT.POSTHEAD +],
LEX -],
C-CONT [RELS <! !>,
HCONS <! !>],
HEAD-DTR [J-NEEDS-AFFIX -,
SYNSEM [LOCAL [CONT.HOOK [INDEX #ind,
LTOP #top],
BAR +]]]].
; (ERB 2001-08-06) Need two kinds of head-complement rules in order
; to do Jeff Smith style number names.
; (ERB 2001-08-21) Adding $400 to the work done by head-initial
; h-comps rule.
; (MS 2003-07-23) Cleaning this up.
;(MS 2003-12-17) Adapt that to Matrix 0.6
basic-head-complement-type := que-princ &
adjacent_nonhead_check &
speaker-addr-principle &
affix-list &
[SYNSEM [MODIFIED.PERIPH #p,
LEX -,
LOCAL [CONT.HOOK #hook,
NUCL #nucl]],
C-CONT [RELS <! !>,
HCONS <! !>],
NON-HEAD-DTR sign & [J-NEEDS-AFFIX -,
SYNSEM.LOCAL.CAT.HEAD.EMPTY #empt],
HEAD-DTR sign & [J-NEEDS-AFFIX -,
SYNSEM [MODIFIED.PERIPH #p,
LOCAL [CAT.HEAD.EMPTY #empt,
CONT.HOOK #hook,
NUCL #nucl]]]].
head-complement-type := basic-head-complement-type &
scp-obj &
adjacent_objbind_check.
head-complement-hf-type := head-complement-type & head-final-type.
head-complement-hi-type := head-complement-type & head-initial-type.
;(CH 2003-08-26)
; ditransitiveの主辞が必ず[BAR +]になるようにして曖昧性を減らす。
head-complement2-type := basic-head-complement-type &
scp-obj2 &
adjacent_obj2bind_check &
head-final-type &
[HEAD-DTR.SYNSEM.LOCAL.BAR +].
; (ERB 2001-09-13) Trying to go to a system where intersective modifiers themselves
; specify the identity between their handles and the handle of the head. Asked Dan
; why this couldn't work for English. He gave three reasons:
;
; 1. The generation algorithm developed by Carroll, Flickinger et al uses the
; separate rules to speed up generation by leaving intersective modifiers for last.
; Having separate rules facilitates this.
;
; 2. Bob Casper's problem, NPs like:
;
; an apparently unsolvable problem
;
; 3. It's useful for ranking to have separate rules.
;
; We're not worrying about generation for this grammar right now, so problem (1) doesn't
; currently concern us. I've asked Atusko to translate the Casper NP, and she came up
; with these:
;
; 解決不可能そうな問題
; 解決不可能っぽい問題 (younger generation)
; 解決不可能げな問題
;
; In this case, it doesn't look like "apparently" is a modifier of "unsolvable",
; although there may be other analogous cases.
;
; If we do need separate rules for ranking or for generation, that won't be too hard.
; (ERB 2001-10-24) The LTOP for this construction, like the INDEX,
; should come from the non-head daughter. The adjunct takes responsibility
; for passing up the head's LTOP (if it's intersective) or its own
; (if it's scopal).
;
; (Previously, this rule was getting the handle out of the KEY, which
; is coming from the head dtr. I don't know if there's any reason to
; get the key from the non-head dtr, too. For now, I'll just get the
; LTOP value straightened out by taking it from the non-head dtr directly.)
; (MS 2001-10-29) the problem is, that the relative clause rule doesn't scope like this. I'm taking it out and moving it to its daughters.
; (ERB 2001-11-26) The INDEX really should be coming from the non-head
; daughter, but I'm afraid to mess with that right now.
; (ERB 2001-11-26) Scopal and intersective modifiers behave very
; differently with MOD-IND and MOD-HAND, so we have to make
; different types of head-adj rule after all. The general
; strategy is this:
;
; Intersective modifiers take the MOD-IND of the head as their
; ARG and identify the MOD-HAND of the head with their own LTOP.
; This means that we can't have intersective modifiers be the
; semantic head of hadj because LTOP and MOD-HAND would end up
; identified.
;
; Scopal modifiers take the MOD-HAND of the head as their ARG,
; but keep a distinct handle. They do pass up the INDEX (not
; MOD-IND) of the head to the mother. (So the INDEX of the
; head daughter will always be the INDEX of the mother.)
; Scopal modifiers will be the semantic head of their phrases.
;
; Following the LinGO grammar, we use the type of the local
; inside MOD to distinguish intersective from scopal modifiers.
; (ERB 2002-01-02) Allowing relative clauses to attach to either
; NP or N'. To keep from getting spurious ambiguity with the
; quantify-n-infl-rule, I want to restrict the latter to
; UNmodified N's. This means that the head-adjunct rules have
; to change the NUCL value. Previously, NUCL was just being
; copied up from head daughter. Now it will say NUCL - on
; mother. I wonder what this will break...
; (MS 2002-09-16) This breaks sentences like:
; "ハンバーガーのセットを無料にするサービスだ"
; (ERB 2002-01-02) Can't state this categorically here, because
; compounds are head-adjunct rules, and I crucially want them to
; be [NUCL +]... Moving this constraint to subtypes.
;(MS 2003-12-17) Adapt that to Matrix 0.6
; (MS 2004-06-25) XARG should come from Head-Dtr
head-adjunct-rule-type := adjacent_head_check &
adjacent_nonhead_check &
head-adjunct-p &
speaker-addr-principle &
affix-list &
[J-NEEDS-AFFIX -,
SYNSEM [LOCAL [ CONT.HOOK [INDEX #ind,
XARG #xarg],
CTXT.BACKGROUND diff-list & [LIST #1, LAST #2],
CAT [VAL #val]],
NON-LOCAL [REL #rel],
LEX -,
MODIFIED hasmod & [PERIPH #periph]],
HEAD-DTR sign & [J-NEEDS-AFFIX -,
SYNSEM [ LOCAL [ CONT.HOOK [INDEX #ind,
XARG #xarg],
CTXT.BACKGROUND [ LIST #1,
LAST #3 ],
CAT [VAL #val]],
MODIFIED.PERIPH bool]],
NON-HEAD-DTR sign & [ J-NEEDS-AFFIX -,
SYNSEM [ LOCAL [ CTXT.BACKGROUND [ LIST #3,
LAST #2 ]],
NON-LOCAL [REL #rel],
MODIFIED.PERIPH #periph]]].
;(CH 2003-08-22) gap有り関係節のための規則
; without "adjacent_nonhead_check &"
;(MS 2003-12-17) Adapt that to Matrix 0.6
head-adjunct-rule-type-for-rel-cl-gap := adjacent_head_check &
head-adjunct-p &
speaker-addr-principle &
affix-list &
[J-NEEDS-AFFIX -,
SYNSEM [LOCAL [ CONT.HOOK.INDEX #ind,
CTXT.BACKGROUND diff-list & [LIST #1, LAST #2],
CAT [VAL #val]],
NON-LOCAL [REL #rel],
LEX -,
MODIFIED hasmod & [PERIPH #periph]],
HEAD-DTR sign & [J-NEEDS-AFFIX -,
SYNSEM [ LOCAL [ CONT.HOOK.INDEX #ind,
CTXT.BACKGROUND [ LIST #1,
LAST #3 ],
CAT [VAL #val]],
MODIFIED.PERIPH bool]],
NON-HEAD-DTR sign & [ J-NEEDS-AFFIX -,
SYNSEM [ LOCAL [ CTXT.BACKGROUND [ LIST #3,
LAST #2 ]],
NON-LOCAL [REL #rel],
MODIFIED.PERIPH #periph]]].
; (FCB 2004-02-03) redid to factor out shared parts (actual rules in relative-clauses.tdl)
; NOTE without the rel-cl-obj2-gap-rule, this rule can be just rel-cl-gap-rule := hadj-final-i & ...
; and we could lose two rule types. Then we could make this also the supertype for the non-gapping rule...
; (MS 2004-04-01) We decided to give the gap rules a UNDERSPEC_ARG - feature,
; such that this can be selected by the root node type.
; (MWG 2008-12-04) Carry up BAR value instead of constraining to BAR +
rel-cl-gap-rule := hadj-final-i-for-rel-cl-gap &
[SYNSEM [LOCAL [BAR #bar,
NUCL nucl_minus,
CONT.HOOK [INDEX #ind,
LTOP #top]]],
C-CONT [RELS <! !>,
HCONS <! !>],
ARGS <[SYNSEM [LOCAL [CAT [HEAD [J-POSTHEAD rels,
MAIN-PRD bool],
VAL.SPR olist],
CONT.HOOK.LTOP #top ,
BAR +,
NUCL not_fin_conj]]],
[SYNSEM synsem &
[LOCAL [CAT.HEAD noun_head,
BAR #bar,
CONT [HOOK [INDEX #ind,
LTOP #top]]]]]>].
; (ERB 2001-09-13) head-adjunct-rule-final can't have empty C-CONT.RELS &
; HCONS because the relative clause rule is one of its subtypes.
head-adjunct-rule-final := head-final-type-mod & head-adjunct-rule-type.
; (ERB 2002-01-02) [NUCL -] on mother --- see notes at
; head-adjunct-rule-type.
head-adjunct-rule-first := head-first-type-mod & head-adjunct-rule-type &
[ C-CONT [ RELS <! !>,
HCONS <! !>]].
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; (FCB 2006-05-02, egged on by DPF)
; ensure that modifier and modifiee share the same LTOP [then see what breaks]
head-adjunct-rule-intersective := head-adjunct-rule-type &
[ SYNSEM.LOCAL.CONT [ HOOK [LTOP #top,
INDEX #ind]],
NON-HEAD-DTR.SYNSEM.LOCAL [ CAT.HEAD.MOD < [LOCAL intersective-mod ] >,
CONT.HOOK.LTOP #top],
HEAD-DTR.SYNSEM.LOCAL.CONT [ HOOK [LTOP #top,
INDEX #ind] ]].
; (MS 2004-12-22) no MOD-IND/MOD-HAND
head-adjunct-rule-scopal := head-adjunct-rule-type &
[ SYNSEM.LOCAL.CONT [ HOOK [LTOP #top] ],
NON-HEAD-DTR.SYNSEM.LOCAL [ CAT.HEAD.MOD < [LOCAL scopal-mod] >,
CONT [ HOOK.LTOP #top ]]].
; (ERB 2002-01-02) [NUCL -] on mother --- see notes at
; head-adjunct-rule-type.
hadj-final-s := head-adjunct-rule-final & head-adjunct-rule-scopal.
hadj-first-s := head-adjunct-rule-first & head-adjunct-rule-scopal.
hadj-final-i := head-adjunct-rule-final & head-adjunct-rule-intersective.
hadj-first-i := head-adjunct-rule-first & head-adjunct-rule-intersective.
hadj-final-for-rel-cl-topic := head-adjunct-rule-type & head-final-type-mod &
[ SYNSEM.LOCAL.CONT [ HOOK [LTOP #top,
INDEX #ind]],
NON-HEAD-DTR.SYNSEM.LOCAL [ CAT.HEAD.MOD < [LOCAL intersective-mod ] > ],
HEAD-DTR.SYNSEM.LOCAL [CONT [ HOOK [LTOP #top,
INDEX #ind]],
CAT.HEAD noun_head ]].
;(CH 2003-08-22) gap有り関係節のための規則
;(CH 2003-08-22) "HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD noun_head" を追加
; (MS 2004-12-22) no MOD-IND/MOD-HAND
hadj-final-i-for-rel-cl-gap := head-adjunct-rule-type-for-rel-cl-gap & head-final-type-mod &
[ SYNSEM.LOCAL.CONT [ HOOK [LTOP #top,
INDEX #ind]],
NON-HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD.MOD < [LOCAL intersective-mod ] >,
HEAD-DTR.SYNSEM.LOCAL [ CONT [ HOOK [LTOP #top,
INDEX #ind]],
CAT.HEAD noun_head ]].
;sentence coordination with TE
; (ERB 2001-10-11) Temporarily making this have the more
; specific conjunction_rel to see if that helps with k2y conversion.
; (ERB 2001-10-11) subord_rel looks like a better candidate.
; (ERB 2001-12-10) Supertype binary-type-conj says that MOD-IND and MOD-HAND
; come from the head daughter. So, this rule can't identify its own MOD-HAND
; and LTOP, since this leads to circular MRSs. Guessing for now that it's
; true that the MOD-HAND comes from the head daughter. This type won't
; say anything about MOD-IND and MOD-HAND on the mother. Still taking
; the INDEX from the head daughter (effectively identifying INDEX and
; MOD-IND). Don't know if this will be a problem.
; (ERB 2001-12-13) runon_s rule will also be a subtype of this type, but
; head-conj-p isn't appropriate for it. So, reorganizing a bit...
; (ERB 2002-01-14) Grab the LTOP not the KEY.LBL of each conjunct.
; (ERB 2002-01-24) Force low attachment of adverbs & PP modifiers
; wrt to this rule by making mother [NUCL conj]. Further, restrict
; head daughter to [NUCL nucl_bool] to force one order of
; attachment.
; (ERB 2002-01-29) That constraint is too strong for runon_s rule,
; so move to head-adjunct-rule-coord-type.
; (FCB 2008-02-08) made this fully coordination, not subordination.
sentence-coord-type := binary-type-conj & c-cont-1 &
[SYNSEM [LOCAL [CONT [HOOK [INDEX #event,
LTOP #hand]],
CAT.VAL #val,
NUCL te_conj],
LEX -],
C-CONT [RELS <! subord-or-conj-relation &
[LBL #hand,
ARG0 #event,
L-HNDL #lhand,
L-INDEX #lindex,
R-HNDL #rhand,
R-INDEX #rindex ] !>,
HCONS <! !>],
ARGS < [SYNSEM.LOCAL [CONT.HOOK [LTOP #lhand,
INDEX #lindex]]],
[SYNSEM.LOCAL [CONT.HOOK [LTOP #rhand,
INDEX #rindex],
CAT.VAL #val]] > ].
; (ERB 2001-09-06) Trying to get the MARG of the matrix prpstn to QEQ the
; handle of the conjunction in coordinated sentences. The plusmessage utterance
; type is getting the handle out of the KEY (it should be using the feature
; LBL aka LTOP). It looks like the KEY of the mother is unbound here, though,
; so for the moment I'll just take that from the nonhead-dtr too.
; (ERB 2002-01-07) For the purposes of sentences like V-ga V-te kudasai, I'd
; like this to take the KEY from the head-daughter. (Can't (easily) thread
; that through the non-head-dtr, as we use the KEY to specify the PRED values in
; the lexical entries.) So, LTOP from non-hd-dtr, KEY from hd-dtr.
; (ERB 2002-01-24) Force low attachment of adverbs and PPs wrt to
; this rule by making mother here [NUCL conj], which contrasts with
; [NUCL nucl_bool].
; (ERB 2002-01-24) Restrict right daughter to [NUCL not_fin_conj] to force
; one order of composition in sentences with multiple conjunctions.
; (MS 2004-06-22) Taken out the restriction on [NUCL fin_conj] to try if that
; adds massive spurious ambiguity or just corrections.
conj-rule-type := binary-type-conj &
[SYNSEM [LOCAL [CTXT.BACKGROUND diff-list & [LIST #ctxt1, LAST #ctxt2],
CONT [ HOOK [INDEX #index,
LTOP #handle] ],
CAT.VAL #val,
NUCL nucl]],
J-NEEDS-AFFIX -,
C-CONT [RELS <! !>,
HCONS <! !>],
ARGS < sign &
[SYNSEM.LOCAL [CTXT.BACKGROUND [list #ctxt1,last #ctxt3],
CONT.HOOK [ INDEX #index,
LTOP #handle],
CAT [VAL saturated,
HEAD.C-MOD < synsem & [LOCAL [CAT #1,
CONT #3,
BAR #5,
NUCL #6],
LEX #2,
NON-LOCAL #4] >],
NUCL not_fin_conj ],
J-NEEDS-AFFIX -],
sign &
[SYNSEM [LOCAL [CTXT.BACKGROUND [list #ctxt3,last #ctxt2],
CAT #1 & [VAL saturated & #val],
CONT #3,
BAR #5,
NUCL #6],
LEX #2,
NON-LOCAL #4],
J-NEEDS-AFFIX -] > ].
head-specifier-rule-type := head-final-type &
scp-spec &
que-princ &
affix-list &
[C-CONT [RELS <! !>,
HCONS <! !>],
SYNSEM [LOCAL.CONT.HOOK #hook],
RMORPH-BIND-TYPE #rmorph,
HEAD-DTR [SYNSEM [LOCAL [CAT.HEAD #head,
CONT #cont & [HOOK #hook]],
MODIFIED.PERIPH #per],
RMORPH-BIND-TYPE #rmorph],
NON-HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD.J-SPEC < [LOCAL [CAT.HEAD #head,
CONT #cont],
MODIFIED.PERIPH #per] > ].
; (MS 2004-12-22) no MOD-IND/MOD-HAND
head-marker-rule := binary &
scp-marking &
affix-list &
speaker-addr-principle &
[SYNSEM.LOCAL [CAT [VAL #val,
HEAD.FORMAL.SHON #sh],
CONT.HOOK [INDEX #ind,
LTOP #top],
CTXT.BACKGROUND diff-list & [LIST #1, LAST #2]],
C-CONT [RELS <! !>,
HCONS <! !>],
HEAD-DTR #head-dtr & [SYNSEM [LOCAL [CAT.HEAD #5 & [FORMAL.SHON #sh],
CONT.HOOK [INDEX #ind,
LTOP #top],
CTXT.BACKGROUND [LIST #3,LAST #2]],
MODIFIED.PERIPH #per]],
NON-HEAD-DTR #nh-dtr & [SYNSEM.LOCAL [CAT [HEAD.MARK < synsem &
[LOCAL.CAT.HEAD #5,
MODIFIED.PERIPH #per] >,
VAL #val],
CTXT.BACKGROUND [LIST #1,LAST #3]]],
ARGS <#nh-dtr,#head-dtr>].
; (ERB 2001-11-26) This type shouldn't identify MOD-IND and MOD-HAND
; with INDEX and LTOP, as this isn't true of the compound-noun-rule,
; a subtype. (Was identifying them in SYNSEM.LOCAL.CONT).
; (ERB 2001-11-26) It should also get the LTOP from the HEAD-DTR's LTOP,
; not its KEY.LBL.
empty-head-type := headed-phrase &
[SYNSEM [LOCAL [CTXT #1,
CAT.HEAD #head & [EMPTY +],
CONT [HOOK.LTOP #hand,
RELS [LIST #firstliszt,
LAST #lastliszt],
HCONS [LIST #scfirst,
LAST #sclast]]],
NON-LOCAL #nloc],
C-CONT [RELS diff-list & [LIST #middle2liszt,
LAST #lastliszt],
HCONS diff-list & [LIST #scmiddle2,
LAST #sclast]],
J-NEEDS-AFFIX -,
HEAD-DTR [SYNSEM.LOCAL [CAT [HEAD #head,
VAL.COMPS 1-list & [FIRST #nh-synsem]],
CONT [HOOK.LTOP #hand,
RELS [LIST #middle1liszt,
LAST #middle2liszt],
HCONS [LIST #scmiddle1,
LAST #scmiddle2]]]],
NON-HEAD-DTR #nh-dtr & [SYNSEM #nh-synsem &
[LOCAL [CTXT #1,
CONT [RELS [LIST #firstliszt,
LAST #middle1liszt],
HCONS [LIST #scfirst ,
LAST #scmiddle1]],
CAT.VAL saturated],
NON-LOCAL #nloc],
J-NEEDS-AFFIX -],
STEM #stem,
ARGS <#nh-dtr & [STEM #stem]>].
;empty particles:
; (MS 2004-12-14) These shouldn't take a complement
; (FCB&MS 2005-07-04) We aren't using these now
; empty-particle-type := empty-head-type &
; [SYNSEM.LEX +,
; C-CONT [RELS <! !>,
; HCONS <! !>],
; ARGS <[SYNSEM.LOCAL.CAT.HEAD noun_head]>].
; empty-preposition-type := empty-particle-type.
;empty-preposition-type := empty-particle-type &
;[HEAD-DTR.SYNSEM [LOCAL.CAT.VAL.COMPS.FIRST.LOCAL [CONT [HOOK.INDEX #arg]],
; LKEYS.KEYREL [ARG2 #arg]]].
; (FCB 2005-07-04) Not used now
;empty-conjunction-type := empty-preposition-type.
; (ERB 2001-09-12) For bare number names used as ordinals.
; (ERB 2001-09-19) This is vastly overgenerating because it can modify
; anything that's nominal. For now, restricting it to lexical nouns.
; (ERB 2001-09-20) Not quite right, because it can also modify
; compound nouns. Try BAR - instead of LEX plus.
; (ERB 2001-09-21) I don't remember why I made this BAR - on the mother.
; It makes it incompatible with the head-adjunct-2 rule. So, I'll
; take it off for now.
; (ERB 2001-10-29) empty-head-type does not copy up the KEY, so
; I'm going to add that here. (Should it go on the supertype?)
; (ERB 2001-10-29) Trying to let these guys undergo the numcl-noun rule
; without then letting them be in compounds, because that's just really
; ugly. It seems like the only hope is somewhere within the CONT value.
; I'm going to play around with the PRED value and see if I can do it
; that way.
; (ERB 2001-10-29) The PRED names, written 'relation, are actually
; treated as atoms, not strings, by cheap. This means I need to
; move this contrast one level up.
; (MS 2003-09-26) As Matrix Ver.0.5 does not include no-relation any more, I'll erase that here.
; (MS 2003-12-19) Matrix 0.6
; (ERB 2004-1-20) Trying out a new analysis in which these guys
; introduce a named-relation that relates the card-rel to the
; modified noun. Somewhat different from solution in the ERG,
; because I believe they can show up as modifiers. Putting the named-rel
; in at this level allows me to get away with just one nominal-numcl
; rule (I think--ambiguity with compound nouns might force me to
; back off). We probably need to identify some labels in here,
; but I'm not inclined to figure it out right now.
;empty-cardinal-numcl-type := empty-head-type &
;[ SYNSEM [ LOCAL.CAT.VAL saturated,
; LEX + ],
; C-CONT [RELS <! arg12-relation &
; [ PRED 'named_rel,
; ARG1 #noun,
; ARG2 #card ] !>,
; HCONS <! !>],
; HEAD-DTR num-cl-obj-only-nmod-ind-lex-super &
; [ SYNSEM [ LOCAL.CAT [ VAL.COMPS.FIRST.LOCAL.CONT.HOOK.LTOP #card,
; HEAD [MOD < [LOCAL [BAR -,
; CONT.MOD-IND #noun]] > ]]]]].
; (ERB 2002-01-07) CONT.LTOP = CONT.KEY.LBL isn't necessarily
; true for the instances of utterance-message-sap-type. Move this
; constraint down lower in the hierarchy. Likewise for C-CONT.LTOP =
; C-CONT.KEY.LBL.
; (MS 2004-12-20) I want this to inherit its daughter's EMPTY value to be able
; to restrict utterances in the case of quotations: 「前奏曲」の略称
utterance-type := unary-type &
[SYNSEM synsem &
[LOCAL [CAT [HEAD utterance_head & [SMOD marked,
EMPTY #empty],
VAL super-saturated],
CTXT [BACKGROUND diff-list &
[LIST [FIRST addr-honor_rel &
[POLARITY #3,
HONORER #sp,
HONORED #1],
REST #2],
LAST #4],
C-INDICES [SPEAKER #sp,ADDRESSEE #1]],
NUCL nucl_minus],
LEX -,
NON-LOCAL.AFFIX <! !>],
C-CONT [RELS <! !>,
HCONS <! !>],
ARGS.FIRST [SYNSEM [LOCAL [CAT [HEAD [FORMAL.AHON #3,
EMPTY #empty],
VAL saturated],
CTXT.BACKGROUND [LIST #2,
LAST #4],
BAR +],
NON-LOCAL.AFFIX <! !>],
J-NEEDS-AFFIX -]].
;;SSH 2015-06-30
utterance-type :+ [ SYNSEM.LOCAL.CAT.HEAD.UTTERED + ].
utt-type := utterance-type &
[SYNSEM.LOCAL.CONT.HOOK [INDEX #i,
LTOP #top],
ARGS.FIRST.SYNSEM.LOCAL.CONT.HOOK [INDEX #i,
LTOP #top]].
;;; FIXME unify with utt-type etc. (2006-05-05 no-MSG)
utterance-sf-type := utt-type &
[ C-CONT.HOOK #hook,
ARGS.FIRST.SYNSEM.LOCAL [CAT [HEAD verb_head &
[MAIN-PRD +],
VAL saturated],
CONT [HOOK #hook,
RELS diff-list]]].
; type for sentence ending particles
utt-sep-type := utt-type &
[ ARGS.FIRST.SYNSEM.LOCAL.CAT.HEAD s-end_head].
; type for idioms
utt-idiom-type := utterance-type &
[ARGS.FIRST.SYNSEM.LOCAL.CAT.HEAD idiom_head].
turn-type := utterance-type.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; the output of these rules needs and affix (e.g. する → さ)
lexeme-rule := lexeme & inflecting-lex-rule &
[J-NEEDS-AFFIX +,
SYNSEM #synsem,
LMORPH-BIND-TYPE #lmorph,
ARGS <[INFLECTED -,
LMORPH-BIND-TYPE #lmorph,
SYNSEM #synsem]>,
INFLECTED +].
; (ERB 2001-10-17) Added subtypes of lexical_sign. See notes in
; fundamentals.tdl.
; (MS 2004-11-08) Shouldn't that keep the LMORPH-BIND-TYPE?
; (MS 2005-01-06) This should copy ARG-S.
word-rule-basic := lexical_sign-rule &
[SYNSEM [LOCAL [CAT [HEAD [AUX #aux,
COP #cop,
LIGHT #light,
ADJ #adj,
MAIN-PRD #main-prd,
SMOD #smod,
KEYS.KEY #keypred,
FORMAL #formal,
COP-ARG bool,
H-TENSE #tense],
VAL #sc],
CONT #cont & [RELS diff-list,
HOOK.INDEX event &
[E [TENSE #tense]]],
CTXT #ctxt,
ARG-S #args],
LKEYS #keys,
NON-LOCAL #nonloc],
J-NEEDS-AFFIX -,
LMORPH-BIND-TYPE #lmorph,
ARGS < lexical_sign & [SYNSEM [LOCAL [CAT [HEAD [AUX #aux,
COP #cop,
LIGHT #light,
ADJ #adj,
MAIN-PRD #main-prd,
SMOD #smod,
KEYS.KEY #keypred,
FORMAL #formal,
COP-ARG bool,
H-TENSE #tense],
VAL #sc],
CONT #cont,
CTXT #ctxt,
ARG-S #args],
LKEYS #keys,
NON-LOCAL #nonloc],
LMORPH-BIND-TYPE #lmorph,
INFLECTED -]>,
INFLECTED +].
word-rule := word-rule-basic & constant-lex-rule &
[NEEDS-AFFIX -,
SYNSEM.LOCAL.CAT.HEAD [VN #vn,
MODUS #mood],
ARGS <[SYNSEM.LOCAL.CAT.HEAD [VN #vn,
MODUS #mood]]>].
category-change-rels-irule := constant-lex-rule.
;;;
;;; Rules to allow classifiers to float
;;;
num-cl-sbj-float-rule := category-change-rels-irule &
floated-sbj-num-cl-lex &
[SYNSEM.LOCAL.CAT.HEAD num-cl-float_head,
ARGS.FIRST.SYNSEM.LOCAL.CAT.HEAD num-cl-nmod_head].
num-cl-obj-float-rule := category-change-rels-irule &
floated-obj-num-cl-lex &
[SYNSEM.LOCAL.CAT.HEAD num-cl-float_head,
ARGS.FIRST.SYNSEM.LOCAL.CAT.HEAD num-cl-nmod_head].
;;;
;;; V-V rules
;;;
;;constant-lex-rule &
category-change-preds-lrule := sign &
[ STEM #stem,
SYNSEM.LKEYS.KEYREL.PRED #pred,
ARGS < [STEM #stem,
SYNSEM.LKEYS.KEYREL.PRED #pred] > ].
vbar-monotransitivization-v-rule := category-change-preds-lrule &
syn-vv-monotrans-vbar-v-stem-lex &
[ ARGS.FIRST syn-vv-intrans-vbar-v-stem-lex ].
vbar-ditransitivization-v-rule := category-change-preds-lrule &
syn-vv-ditrans-vbar-v-stem-lex &
[ ARGS.FIRST syn-vv-intrans-vbar-v-stem-lex ].
vbar-monotransitivization-c-rule := category-change-preds-lrule &
syn-vv-monotrans-vbar-c-stem-lex &
[ ARGS.FIRST syn-vv-intrans-vbar-c-stem-lex].
vbar-ditransitivization-c-rule := category-change-preds-lrule &
syn-vv-ditrans-vbar-c-stem-lex &
[ ARGS.FIRST syn-vv-intrans-vbar-c-stem-lex].
;;; FIXME: try this as BAR - ? FCB 2009-03-07
;;; breaks (lkb::do-parse-tty "ご 招待 を お 受け でき ない")
j-lexeme-to-word-rule := word-rule-basic & v-lex &
[ARGS < verb-stem-lex-base>].
; (MS 2003-07-11) We have to find another solution for that.
; (ERB 2001-10-15) The potential rule also needs to extend the
; h-cons list when it is applying to itadaku and the like.
; (ERB 2002-01-11) Generalize input from verb-stem-lex to verb-stem-lex-super
; because quasi-light-verbs can't be verb-stem-lex but should be able
; to undergo this rule.
; (FCB 2005-06-15) Added ARG0 to messages
potential-rule := lex-rule & lexeme & c-cont-1 &
[SYNSEM [LOCAL [CAT [HEAD #head & [MODUS potential],
VAL #sc],
CONT [HOOK [LTOP #hand,
INDEX #topind]],
CTXT #ctxt],
LKEYS.KEYREL #key,
NON-LOCAL [QUE #que,
REL #ref,
AFFIX #aff],
MODIFIED.PERIPH #per],
J-NEEDS-AFFIX +,
NEEDS-AFFIX +,
C-CONT [RELS <! rareru-relation & #key &
[LBL #hand,
ARG0 #topind,
ARG1 #subj,
ARG2 #rhand] !>,
HCONS <! qeq & [HARG #rhand, LARG #verb-hd ] !>],
ARGS < verb-stem-lex-super &
[SYNSEM [LOCAL [CAT [HEAD #head,
VAL #sc],
CTXT #ctxt,
CONT verb-sem-type &
[HOOK [LTOP #verb-hd,
XARG #subj]]],
NON-LOCAL [QUE #que,
REL #ref,
AFFIX #aff],
MODIFIED.PERIPH #per],
INFLECTED -]>,
INFLECTED +].
; (ERB 2001-10-15) The potential rule also needs to extend the