-
Notifications
You must be signed in to change notification settings - Fork 5
/
japgram.tdl
1158 lines (931 loc) · 38.5 KB
/
japgram.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: japgram
;;; module:
;;; version: %I%
;;; written by: Melanie Siegel/Emily Bender
;;; last update: %G% --- %U%
;;; updated by:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; author | date | modification
;;; ------------------|-------------|------------------------------------------
;;;Melanie Siegel (MS)| | Emily Bender (ERB), Francis Bond (FCB),
;;; | | Chikara Hashimoto (CH),
;;; | | Takaaki Tanaka (TT), Akira Ohtani (AO),
;;; | | Michael Goodman(MWG)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Rules for sentence chains or single sentences
utterance_rule-decl-finite := utterance-sf-type &
"""
declarative sentence, finite verb
<ex> 食べる
"""
[SYNSEM.LOCAL.CAT.HEAD.SMOD decl,
C-CONT.HOOK.INDEX.SF prop,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
FIN +],
NON-LOCAL.QUE <! !>]].
utterance_rule-wh-without-ka := utterance-sf-type &
"""
wh-question without ka
<ex> 何 を 食べる
"""
[SYNSEM.LOCAL.CAT.HEAD.SMOD quest,
C-CONT.HOOK.INDEX.SF ques,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
FIN +],
NON-LOCAL.QUE <! [] !>]].
; added J-POSTHEAD coord to block te-adjunct
; FIXME, I would prefer the tense to be present, not te
; C-CONT.HOOK.INDEX.E.TENSE present,
utterance_rule-imp := utterance-sf-type &
"""
Imperative (request) て
Informal (ROBUST +)
<ex> 食べ て
"""
[SYNSEM.LOCAL.CAT.HEAD.SMOD imp,
C-CONT.HOOK.INDEX.SF comm,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
FIN -,
H-TENSE te,
VN -,
COP -,
J-SPEC 1-list,
J-POSTHEAD coord],
NON-LOCAL [QUE <! !>,
ROBUST +]]].
; (ERB 2002-01-14) Don't want VN+kudasai to use this one anymore,
; so adding SMOD imp.
; (MS 2002-01-16) introduces simple-imperative vs. polite-imperative to divide utterance_rule10 and utterance_rule2e.
; (MS 2003-12-17) Adapting to Matrix 0.6
; (MS 2005-12-08) We don't want the NONLOCAL.QUE <! !> condition on the argument, as embedded sentences; could have some QUE left in their storage: "誰が行くか教えて下さい。"
; (FCB 2009-01-05) Taking out the MOOD, as we don't need it and it stops generation.
; put it back in due to spurious ambiguity with (do-parse-tty "食べ ます")
utterance_rule-command := utterance-sf-type &
"""
Polite imperative
<ex> 食べ て 下さい
<nex> 食べ て なさい
"""
[SYNSEM.LOCAL.CAT.HEAD.SMOD imp,
C-CONT.HOOK.INDEX.SF comm,
ARGS.FIRST [SYNSEM [LOCAL [CAT.HEAD [MODUS simple-imperative,
H-TENSE present,
FIN +],
CONT.HOOK.INDEX.E.MOOD imperative],
NON-LOCAL.QUE <! !>],
RMORPH-BIND-TYPE imp-morph]].
; (MS 2004-12-14) an utterance rule for sentences with an infinite ending, like "偽りなく",
; at the moment restricted to adjectives.
;;; FIXME --- move to Fragments
utterance_rule-decl-infinite := utterance-sf-type &
[SYNSEM.LOCAL.CAT.HEAD.SMOD decl,
C-CONT.HOOK.INDEX.SF prop,
ARGS.FIRST.SYNSEM [LOCAL.CAT.HEAD [MODUS uttmodus,
H-TENSE te,
FIN -,
ADJ +,
VN -,
COP -],
NON-LOCAL [QUE <! !>,
ROBUST +]]].
; (FCB 2006-05-09) Pass up SMOD, assume particle sets the mood
; this allows many rules to be collapsed
utterance_rule-sep := utt-sep-type &
"""
sentence with sentence end particle, finite verb
"""
[SYNSEM.LOCAL.CAT.HEAD.SMOD #1,
ARGS.FIRST.SYNSEM.LOCAL.CAT.HEAD.SMOD #1].
; (ERB 2001-11-05) These idioms probably shouldn't get the prpstn_rel.
; Also, this was turing up with unbound HCONS lists.
;;; FIXME: doesn't scope, harmonize with ERG (FCB 2006-05-08)
;;; (do-parse-tty "お早う")
utterance_rule-idiom := utt-idiom-type &
"""
Idiomatic utterance
<ex> お早う
"""
[SYNSEM.LOCAL.CAT.HEAD.SMOD decl].
;; end of utterances
; (ERB 2001-10-03) Rule that adds unspec-loc-rel to temporal
; nouns, and makes them modifiers.
adv_np_rule := adv_np_rule-type.
; (FCB 2005-06-30) moved supertype into rule-types.
;compound-noun-rule := compound-noun-rule-type &
; [SYNSEM.LOCAL.CAT.HEAD.MOD < [LOCAL.CAT.HEAD ordinary-or-date-noun_head] > ].
;expanded from ordinary_noun_head to noun_head: dore kurai.
; (ERB 2001-10-10) For constructing k2ys it's helpful to have
; the unspecified relation between nouns in an nn compound not
; be an instance of prep_mod_rel.
; (ERB 2001-10-29) Trying to keep integers promoted to NumClPs
; promoted to NPs out of this rule. Trying the hack of giving them a
; REL value that is not a string. So, constraining this guy to
; be REL string.
; (ERB 2001-10-29) The REL names, written 'relation, are actually
; treated as atoms, not strings, by cheap. This means I need to
; move this contrast one level up.
; (MS 2001-11-26) Changed the modification from ordinary-noun_head to noun_head in order to allow compounds with exceptional nouns (mitai).
; (MS 2001-12-19) This solution gave too many ambiguities. I'll introduce a special rule for exceptional nouns.
; (ERB 2001-11-26) Like other modifiers, this should grab the MOD-IND
; and MOD-HAND.
; (ERB 2001-11-26) But it should pass up the LTOP and INDEX of its MOD value.
; (ERB 2001-11-26) Experimenting (as we so desire) with using
; a prep-mod-rel again here to allow compounds with nominalizations
; as the head.
; (ERB 2001-11-28) I don't think we need to worry about the INDEX and
; LTOP on the mother here. These only show up as non-head daughters of the
; compounds-rule, which is an intersective head-adj rule and therefore
; takes the head daugther as the semantic head.
; (ERB 2001-12-03) ARG3 should be the INDEX of the daughter, not
; the MOD-IND.
; (ERB 2002-01-28) MOD...HEAD is ordinary-or-date-noun_head to allow
; nouns like TOKI as head of compounds. (Was just ordinary_noun_head)
; (MS 2002-06-11) The POSTHEAD is unified with the POSTHEAD of the argument. Thus, I can prevent
; words like 間 from being the first argument in a compound.
; (MS 2003-09-26) Changed no_nmod to unspec-compound-relation, as defined in Matrix.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; (MS 2005-04-11) If the LKEYS.KEYREL.PRED is atom, we cannot parse more than two nouns in a compound.
; So, I'll take this restriction out.
;compound-noun-rule := empty-head-type &
;[SYNSEM [LOCAL [CAT [HEAD empty-nmod-p_head &
; [MOD < [LOCAL [CAT [HEAD ordinary-or-date-noun_head,
; VAL.SPR 1-list],
; CONT.HOOK [LTOP #hhand,
; INDEX #hinst]],
; MODIFIED.PERIPH -]>,
; J-POSTHEAD #ph],
; VAL saturated],
; BAR -],
; MODIFIED.PERIPH +],
; C-CONT [RELS <! !>,
; HCONS <! !>],
; HEAD-DTR.SYNSEM [LOCAL [CONT nncompound-sem-type &
; [RELS <! #key !>,
; HCONS <! !>]],
; LKEYS.KEYREL #key & unspec-compound-relation &
; [LBL #hhand,
; PRED "no",
; ARG0.E.TENSE no_tense,
; ARG2 #hinst,
; ARG1 #nhinst]],
; NON-HEAD-DTR.SYNSEM [LOCAL [CAT [HEAD noun_head & [J-POSTHEAD #ph],
; VAL saturated],
; CONT [ HOOK.INDEX #nhinst],
; BAR -]]].
; (MS 2003-09-26) Changed no_nmod to unspec-compound-relation, as defined in Matrix.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
;compound-exceptional-noun-rule := empty-head-type &
;[SYNSEM [LOCAL [CAT [HEAD empty-nmod-p_head & [MOD < [LOCAL [CAT [HEAD exceptional_noun_head,
; VAL.SPR 1-list],
; CONT.HOOK [LTOP #hhand,
; INDEX #hinst]],
; MODIFIED.PERIPH -] > ],
; VAL saturated],
; BAR -],
; MODIFIED.PERIPH +],
; C-CONT [RELS <! !>,
; HCONS <! !>],
; HEAD-DTR.SYNSEM [LOCAL [CONT nncompound-sem-type &
; [RELS <! #key !>,
; HCONS <! !>]],
; LKEYS.KEYREL #key & unspec-compound-relation &
; [LBL #hhand,
; PRED "no",
; ARG0.E.TENSE no_tense,
; ARG2 #hinst,
; ARG1 #nhinst]],
; NON-HEAD-DTR.SYNSEM [LOCAL [CAT [HEAD noun_head,
; VAL saturated],
; CONT [ HOOK.INDEX #nhinst],
; BAR -],
; LKEYS.KEYREL.PRED atom]].
; (ERB 2001-11-28) Grab MOD-IND and MOD-HAND.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; (MS 2005-03-15) Grab CONT.HOOK.INDEX instead of LKEYS.KEYREL.ARG0!
;compound-name-rule := empty-head-type &
; [SYNSEM [LOCAL [CAT [HEAD empty-nmod-p_head & [MOD < [LOCAL [CAT [HEAD name_head,
; VAL.SPR 1-list],
; CONT.HOOK [LTOP #hhand,
; INDEX #hinst]],
; MODIFIED.PERIPH -] > ],
; VAL saturated],
; BAR -],
; MODIFIED.PERIPH +],
; C-CONT [RELS <! !>,
; HCONS <! !>],
; HEAD-DTR.SYNSEM [LOCAL [CONT appos-id-sem-type &
; [RELS <! #key !>,
; HCONS <! !>]],
; LKEYS.KEYREL #key &
; [LBL #hhand,
; ARG0 event,
; ARG1 #nhinst,
; ARG2 #hinst]],
; NON-HEAD-DTR.SYNSEM [LOCAL [CAT [HEAD name_head,
; VAL saturated],
; CONT.HOOK.INDEX #nhinst,
; BAR -]]].
; (ERB 2001-08-06) Disallowing numbers from compounds.
; (ERB 2001-08-21) Changed type nonint_head to final_head.
; (ERB 2001-09-13) Changed type from head-adjunct-rule1-type to head-adjunct-rule-final,
; since I'm trying to get rid of head-adjunct-rule1-type. This looses the constraint
; that the mother's INDEX is identified with the non-head dtr's INDEX, so I'm adding
; that in here.
; (MS 2001-10-17) Taking the saturated restriction on the head-dtr out, such that it is possible to
; add a determiner to the compound.
; (ERB 2001-11-26) I don't want the INDEX/LTOP to be identified
; with MOD-IND/MOD-HAND on the mother of this rule, because it
; may be headed by a nominalization. As a first stab, say that
; INDEX and LTOP come from NON-HEAD-DTR and MOD-IND/MOD-HAND come
; from HEAD-DTR.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (TT 2003-08-05) add "J-POSTHEAD right"
; (TT 2003-08-27) delete "J-POSTHEAD right" because it disabled lkb to parse NNN.
; (MS 2005-07-04) so, let's try with J-POSTHEAD compound
; (FCB 2006-06-06) moved the meat into rule-types.
compounds-rule := compound-rule.
;;;;;;;;;;;;;;;;;;;;;;;;N-> QUANTIFIED N;;;;;;;;;;;;;;;;;;;;
; (ERB 2001-08-16) Changed the following:
;
; ARGS.FIRST.SYNSEM.LOCAL.CONT.KEY.LBL #h
;
; to
;
; ARGS.FIRST.SYNSEM.LOCAL.CONT.LBL #h
;
; So that it works properly with NumCl phrases.
; (ERB 2001-09-19) Somewhat surprisingly, this isn't restricted
; to things that are LEX +. For the moment, I'll just have it
; copy up the LEX value. Perhaps it should be restricted to
; LEX + daughters.
; (ERB 2001-09-20) Of course it can't be restricted to things
; that are LEX +, because it has to apply to NumCl phrases that
; are built up of an integer and a NumCl. But copying up the
; LEX value is still a good idea.
; (ERB 2001-09-24) Experimenting with forcing this to apply
; after all other valence requirements are satisfied. (I'm
; getting spurious ambiguity in the date expressions otherwise.)
; (MS 2002-09-05) Inserted UNSAT + on the daughter to prevent the rule to be cyclic (actually a hint from Dan F.)
;;; FCB this shouldn't be a lexical-rule (it applies after syntactic rules)
; (MWG 2008-11-27) Moved to japgram.tdl from lrules.tdl because compounds could
; not be quantified in generation. Compare:
; 死星が帝国の武器である parses, does not generate
; この死星が帝国の武器である parses and generates due to the explicit quantifier
quantify-n-rule := quantify-n-rule-type.
; (TT 2003-08-29) experimental rules for dealing with prefix and suffix correctly
; compounds-rule-nn := hadj-final-i &
; [C-CONT [RELS <! !>,
; HCONS <! !>],
; ARGS <[SYNSEM [LOCAL [CAT [HEAD final_head &
; [
; MAIN-PRD -,
; MOD < [MODIFIED.PERIPH #periph] > ],
; VAL saturated],
; BAR -],
; LEX -]],
; [SYNSEM [LOCAL [CAT [HEAD final_head ],
; BAR -],
; LEX -,
; MODIFIED.PERIPH #periph]]>].
; compounds-rule-prefix-n := hadj-final-i &
; [C-CONT [RELS <! !>,
; HCONS <! !>],
; ARGS <[SYNSEM [LOCAL [CAT [HEAD final_head &
; [J-POSTHEAD left,
; MAIN-PRD -,
; MOD < [MODIFIED.PERIPH #periph] > ],
; VAL saturated],
; BAR -],
; LEX +]],
; [SYNSEM [LOCAL [CAT [HEAD final_head ],
; BAR -],
; LEX -,
; MODIFIED.PERIPH #periph]]>].
; compounds-rule-n-suffix := hadj-final-i &
; [SYNSEM.LOCAL.CAT.HEAD.J-POSTHEAD posthead,
; C-CONT [RELS <! !>,
; HCONS <! !>],
; ARGS <[SYNSEM [LOCAL [CAT [HEAD final_head &
; [
; MAIN-PRD -,
; MOD < [MODIFIED.PERIPH #periph] > ],
; VAL saturated],
; BAR -],
; LEX -]],
; [SYNSEM [LOCAL [CAT [HEAD final_head & [J-POSTHEAD right]],
; BAR -],
; LEX +,
; MODIFIED.PERIPH #periph]]>].
head_subj_rule := head-subject-rule & [SYNSEM.LOCAL.BAR +].
; (ERB 2001-08-06) Splitting this in two for Smith-style number names.
; (MS 2001-11-14) Took the BAR + restriction out in order to make compounds with subcategorizing nouns possible (振込先指定). Let's see if that overgenerates.
; (MS 2001-11-19) It does. Let's take the BAR from the head-dtr.
; (MS 2001-11-20) Still too much ambiguity. Everything is BAR + again.
; (ERB 2002-02-11) Making embedded-question-rule a binary rule, akin
; to head-complement rules because unary version was relying on LKB
; cycle detection to keep from overgenerating. As a result, need to
; block comp-int-lex heads from head-complement-hf-rule. Will do this
; with a hack: require MESSAGE.LIST e-list on head daughter. This hack
; should cease to work round about when it becomes unnecessary: when
; we overhaul the analysis of clauses in this grammar.
; (MS 2003-07-11) Changed the MESSAGE hack now.
hf-complement-rule := head-complement-hf-type &
[SYNSEM [LOCAL.BAR +,
NON-LOCAL.AFFIX #afflist],
HEAD-DTR.SYNSEM [LOCAL [CAT.HEAD final_head,
BAR +],
NON-LOCAL.AFFIX <! !>],
NON-HEAD-DTR.SYNSEM [NON-LOCAL.AFFIX #afflist,
LOCAL.BAR +]].
hi-complement-rule := head-complement-hi-type &
[SYNSEM.LOCAL.BAR +,
HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD init_head].
head-complement-affixbind-rule := head-complement-hf-type &
[SYNSEM [LOCAL.BAR +,
NON-LOCAL.AFFIX 0-dlist ],
ARGS < [SYNSEM.NON-LOCAL.AFFIX 1-dlist &
[LIST [FIRST #aff,
REST < > & #last],
LAST #last]],
[SYNSEM.LOCAL.CAT.HEAD p_head & [PTYPE #aff]] >].
head-complement2-rule := head-complement2-type & [SYNSEM.LOCAL.BAR +].
; (ERB 2001-09-29) I need a 2obl complements rule that works for
; date expressions, so I'm making one general one. Since elements with
; two obligatory complements are barred from the ordinary head-complements
; rules, I don't think there will be any ambiguity introduced.
;kara-made-rule := head-2obl-complements-type &
; [SYNSEM.LOCAL.BAR +,
; ARGS <[SYNSEM.LOCAL.CAT.HEAD noun_head],
; [SYNSEM.LOCAL.CAT.HEAD postp_head & [PTYPE made]]>].
;parenthesis-rule := head-2obl-complements-type &
; [SYNSEM.LOCAL.BAR +,
; ARGS <[SYNSEM.LOCAL.CAT.HEAD noun_head],
; [SYNSEM.LOCAL.CAT.HEAD parent-end_head]>].
;head-2obl-complements-rule := head-2obl-complements-type &
; [ SYNSEM [LOCAL.BAR +,
; NON-LOCAL.QUE <! !>]].
;this is a test: can one say that the modifier must always be saturated?
; (ERB 2001-09-13) Trying to move to a system where there are only two
; HMRs, one for prehead and one for posthead modifiers. The intersective
; modifiers themselves take care of the necessary handle identities.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (ERB 2002-01-02) [NUCL -] on mother - see notes at
; head-adjunct-rule-type.
; took out
; FCB 2017-11-29 changed ADJ to bool
;;; to allow its use to distinguish adverbs dervied from adjectives
hf-adj-i-rule := hadj-final-i &
[SYNSEM.LOCAL.BAR +,
C-CONT [RELS <! !>,
HCONS <! !>],
ARGS <[SYNSEM.LOCAL [CAT [HEAD [J-POSTHEAD left,
ADJ bool,
MAIN-PRD -],
VAL saturated],
BAR +]],
[SYNSEM synsem & [LOCAL.BAR +]]>].
; (ERB 2001-11-07) I think this is part of analysis of low attachment
; of adverbs wrt ba/tara/etc.
; (ERB 2001-11-28) I think we don't need this anymore with MOD-IND and
; MOD-HAND and separate rules for scopal and intersective modifiers.
; (ERB 2001-09-21) I want to restrict NumClPs made out of intergers only
; (i.e., mother nodes of the empty-cardinal-numcl-rule) to modify plain
; nouns or compound nouns, but not NPs. This is particularly crucial because
; they are posthead modifiers. However, the head-adjunct-rule-2 is requiring
; both daughters to be BAR +. I'm going to try removing the BAR +
; constraint on the head daughter and see what happens.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (MS 2005-09-30) The BAR + status on this gave us problems when having nominal suffixes
; in compounds, such as: "汎用機用"
; (MS 2005-10-18) So, we need prefix and suffix rules.
; (MS 2005-10-06) Playing around with VAL saturated on the second argument, to avoid
; spurious ambiguity in 前年三月
hi-adj-i-rule := hadj-first-i &
[SYNSEM.LOCAL.BAR +,
ARGS <[SYNSEM synsem],
[SYNSEM.LOCAL [CAT [HEAD [J-POSTHEAD right,
MAIN-PRD -],
VAL saturated],
BAR +]]>].
; (ERB 2001-11-28) Rule for scopal modifiers.
; For some reason, 新しい could be the modifier here until I put
; in the constraint [VAL saturated]. I don't see why that should
; change things. (If I type the MOD.LOCAL of everything, it will
; be doubly ruled out, but that's a separate issue.)
hf-adj-s-rule := hadj-final-s &
[SYNSEM.LOCAL [BAR +],
C-CONT [ RELS <! !>,
HCONS <! !> ],
ARGS <[SYNSEM.LOCAL [CAT [ HEAD [J-POSTHEAD left,
MAIN-PRD -],
VAL saturated ],
BAR +]],
[SYNSEM synsem &
[LOCAL.BAR +]]>].
; (MS 2003-06-11) Rule for scopal modifiers - head first
; (MS 2005-12-22) Let's try to take the BAR status from the head:
; "探しばかりする"
hi-adj-s-rule := hadj-first-s &
[SYNSEM.LOCAL [BAR #bar],
C-CONT [ RELS <! !>,
HCONS <! !> ],
ARGS <[SYNSEM synsem &
[LOCAL.BAR #bar]],
[SYNSEM.LOCAL [CAT [ HEAD [J-POSTHEAD right,
MAIN-PRD -],
VAL saturated ],
BAR +]]>].
; (MS 2005-10-18) Prefixes and suffixes have a different BAR status. When we want a prefixed noun
; to be in a compound, it should not be BAR +: "政界再編成"
prefix-rule := hadj-final-i &
[C-CONT [RELS <! !>,
HCONS <! !>],
ARGS <[SYNSEM.LOCAL [CAT [HEAD noun_mod_head &
[J-POSTHEAD left,
ADJ -,
MAIN-PRD -],
VAL saturated],
BAR -]],
[SYNSEM synsem & [LOCAL [BAR +]]]>].
suffix-rule := hadj-first-i &
[ARGS <[SYNSEM synsem],
[SYNSEM.LOCAL [CAT [HEAD noun_mod_head &
[J-POSTHEAD right,
MAIN-PRD -],
VAL saturated],
BAR -]]>].
; (ERB 2001-11-26) The hallucinated topic-rel should take the MOD-IND
; of the head noun as its ARG3, not the INDEX.
; (ERB 2001-11-28) See notes at head-adjunct-rule-type.
; (ERB 2002-01-02) Allowing relative clauses to attach to either
; NP or N'. Need to constrain the quantify-n-infl-rule so that
; it only applies to unmodified elements, to avoid spurious ambiguity.
; (ERB 2002-01-02) [NUCL -] on mother - see notes at
; head-adjunct-rule-type.
; (ERB 2002-01-14) It may be desirable to split the relative clause rule in two
; to prefer low attachment of relative clauses: rel-cl-rule-1 requires a [NUCL
; +] head daughter, while rel-cl-rule-2 requires a [NUCL -] head
; daughter.
;(CH 2003-08-15) 主名詞を関係節のどこにも関連づけない (non gapped)
; *** 2003-08-14 の Melanie Siegel さんの情報に基づく修正 ***
; there are three thing to change on the first daughter:
; 1) MAIN-PRD bool
; 2) NUCL not_fin_conj
; 3) The co-indexing of #adjevent to CONT.HOOK.INDEX instead of ARG0.
;
;(CH 2003-08-22)
; "ARGS.REST.FIRST.SYNSEM.LOCAL.CAT.HEAD noun_head" を追加
; (MS 2004-12-13) This had [ADJ -] on its argument, preventing the correct
; reading for 目が美しい猫.
; (FCB 2005-06-15) Added ARG0 to messages
rel-cl-rule := hadj-final-for-rel-cl-topic &
[SYNSEM.LOCAL [BAR #bar,
NUCL nucl_minus],
C-CONT [RELS <! prep-mod-relation & [PRED "rel_p_rel",
ARG0.E.TENSE no_tense,
LBL #adjhand,
ARG1 #adjevent,
ARG2 #ind] !>,
HCONS <! !>],
ARGS <[SYNSEM [LOCAL [CAT [HEAD [ADJ bool,
J-POSTHEAD rels,
MAIN-PRD bool],
VAL saturated],
CONT.HOOK [ INDEX #adjevent,
LTOP #adjhand],
BAR +,
NUCL not_fin_conj]]],
[SYNSEM synsem & [LOCAL [CAT.HEAD noun_head,
BAR #bar,
CONT.HOOK.INDEX #ind]]]>].
rel-cl-sbj-gap-rule := rel-cl-gap-rule &
[SYNSEM.NON-LOCAL.UNDERSPEC_ARG -,
ARGS <[SYNSEM.LOCAL.CAT [HEAD.ADJ bool,
VAL [SUBJ opt-1-arg &
[FIRST.LOCAL.CONT.HOOK.INDEX #sbjind],
COMPS zlist]]],
[SYNSEM.LOCAL.CONT.HOOK.INDEX #sbjind ]>].
rel-cl-obj1-gap-rule := rel-cl-gap-rule &
[SYNSEM.NON-LOCAL.UNDERSPEC_ARG -,
ARGS <[SYNSEM.LOCAL.CAT.VAL [SUBJ zlist,
COMPS opt-1-arg &
[FIRST.LOCAL.CONT.HOOK.INDEX #obj1ind,
REST zlist]]],
[SYNSEM.LOCAL.CONT.HOOK.INDEX #obj1ind ]>].
rel-cl-obj2-gap-rule := rel-cl-gap-rule &
[SYNSEM.NON-LOCAL.UNDERSPEC_ARG -,
ARGS <[SYNSEM.LOCAL.CAT.VAL [SUBJ zlist,
COMPS 1-plus-list &
[REST.FIRST.LOCAL.CONT.HOOK.INDEX #obj2ind]]],
[SYNSEM.LOCAL.CONT.HOOK.INDEX #obj2ind ]>].
; (ERB 2002-01-02) [NUCL +] on head daughter seems overly
; restrictive (esp. since I'm trying to make all head-adjunct rules
; [NUCL -] on the mother). I'm guessing it was here to reduce
; ambiguity in sentences with multiple te clauses. Perhaps something
; similar could be achieved by distinguishing te-coordination on
; finite clauses and te-coordination on other te-clauses.
; (ERB 2002-01-14) Allow comma-headed conjuncts in this rule by
; generalizing to verb_head-super.
; (ERB 2002-01-22) NUCL conj now on supertype.
; (MS 2003-12-19) Matrix 0.6
; (MS 2004-06-25) [HEAD.EMPTY -] to prevent spuriou ambiguity on 食べているご飯
sentence-te-coordination-rule := sentence-coord-type &
[SYNSEM [LOCAL [BAR +,
CONT.HOOK.XARG #xarg]],
C-CONT.RELS.LIST.FIRST.PRED "coord_c_rel",
ARGS <[SYNSEM.LOCAL [CAT [HEAD verb_head-super &
[J-POSTHEAD coord,
C-MOD < synsem & [LOCAL [CAT #1,
CONT #3,
BAR #5,
NUCL #6],
LEX #2,
NON-LOCAL #4] > ],
VAL saturated],
CONT.HOOK.XARG #xarg,
BAR +],
J-NEEDS-AFFIX -],
[SYNSEM synsem & [LOCAL [BAR +,
CAT #1 & [VAL saturated, HEAD.EMPTY -],
CONT #3,
BAR #5,
NUCL #6,
NUCL nucl_plus],
LEX #2,
NON-LOCAL #4],
J-NEEDS-AFFIX -] > ].
; (MS 2004-06-25) We need something for the XARG. Try the XARG of the second conjunct.
; (FCB 2006-03-12) FIXME: I am pretty sure it shouldn't be that, but I don't know what it should be.
conj-rule := conj-rule-type &
[SYNSEM [LOCAL [BAR +,
CONT.HOOK.XARG #xarg],
MODIFIED.PERIPH +],
ARGS <[SYNSEM.LOCAL [CAT [HEAD [J-POSTHEAD left,
C-MOD < [MODIFIED.PERIPH #periph] >],
VAL saturated],
BAR +]],
[SYNSEM synsem & [LOCAL [BAR +,
CONT.HOOK.XARG #xarg],
MODIFIED.PERIPH #periph]]>].
; ERB (2001-09-03) Redefining the vn-light-rule to be a kind of a head-specifier rule.
; This is so that the light verbs can have some say in the valence of the whole
; combination. In particular, I want dekiru to be able to ga-mark the object.
; ERB (2001-09-03) Turns out we don't need a special subtype of the h-spr rule, as
; the ordinary one will do the work (of course!).
; (MS 2003-12-19) Matrix 0.6
; (MS 2004-01-09) grab the KEYS from the VN.
;;; FCB made J-NEEDS-AFFIX BOOl to annoy Melanie 2009-03-13
;;; also allows : (lkb::do-parse-tty "勉強 さ せ た")
; try making the infl rule pass up LIGHT (to block head-specifier)
; try making the output of this LIGHT - (didn't work)
vn-light-rule := head-marker-rule &
[SYNSEM [LOCAL [BAR bool,
CAT.HEAD [KEYS #keys,
LIGHT bool],
CONT.HOOK #hook],
LEX +],
J-NEEDS-AFFIX #affix,
RMORPH-BIND-TYPE #morphbind,
ARGS <[SYNSEM synsem & [LOCAL [CAT.HEAD vn_head & [KEYS #keys],
CONT.HOOK #hook,
BAR -]]],
[SYNSEM synsem & [LOCAL [CAT.HEAD light-verb_head &
[AUX aux_minus, LIGHT +]]],
INFLECTED +,
J-NEEDS-AFFIX #affix,
RMORPH-BIND-TYPE #morphbind]>].
; (ERB 2002-01-02) Adding a rule for VN+vends (esp. VN + kudasai).
; Pulled out similarities between new rule and vstem-vend-rule to
; supertype vstem-vend-rule-type.
; (MS 2005-11-14) MAIN-PRD should come from the stem, otherwise we get
; spurious ambiguity with the ga-no-conversion rule.
;;; CH+FCB+TK added LEX +
;;(lkb::do-parse-tty "投げ た")
;;; VN-play
;;;
;;; try just using vstem-vend --- link specifiers, HEAD verb-stem_head
;;; don't pass up MODIFIED.PERIPH
vstem-vend-rule := stem-end-rule-type &
[ SYNSEM [LOCAL.CAT [ HEAD verb_head,
VAL.SPR #spr]],
ARGS < [ SYNSEM [LOCAL.CAT [HEAD verb-stem_head &
[LIGHT #light,
MAIN-PRD #main],
VAL.SPR #spr ],
LEX bool],
J-NEEDS-AFFIX + ],
[SYNSEM.LOCAL.CAT.HEAD verb_head & [LIGHT #light,
MAIN-PRD #main]] >].
;;; FCB changed verbend_head to verb_head
; [SYNSEM.LOCAL.CAT.HEAD verbend_head & [LIGHT #light,
; MAIN-PRD #main]] >].
;;(lkb::do-parse-tty "投げ そこなっ た")
;;; CH+FCB+TK added LEX +
;;;「た」が「投げ そこなっ」と「そこなっ」のどちらに結び付くかの曖昧性をなくすため
; aux-vend-rule := stem-end-rule-type &
; [ SYNSEM [LOCAL.CAT.VAL.SPR #spr,
; MODIFIED.PERIPH #per],
; J-NEEDS-AFFIX #aff,
; ARGS < [ SYNSEM [LOCAL.CAT [HEAD other-verb-stem_head &
; [COP -,
; H-TENSE #tense],
; VAL.SPR #spr],
; LEX +],
; J-NEEDS-AFFIX + ],
; [J-NEEDS-AFFIX #aff,
; SYNSEM [LOCAL.CAT.HEAD verb_head & [H-TENSE #tense],
; MODIFIED.PERIPH #per]] >].
na-vend-rule := stem-end-rule-type &
[ SYNSEM.LOCAL.CAT.VAL.SPR null,
J-NEEDS-AFFIX #aff,
ARGS < [ SYNSEM.LOCAL.CAT.HEAD na-adj_head],
[J-NEEDS-AFFIX #aff,
SYNSEM.LOCAL.CAT.HEAD verbend_head] >].
; (MS 2004-11-08) This one should keep the LMORPH-BIND-TPYE: 来やすい
; (MS 2004-12-21) This doesn't necessarily have to be FIN +: 偽りなく
; (S 2005-01-06) Copy up ARG-S.
unary-vstem-vend-rule := unary-type-super &
[SYNSEM [LOCAL [CAT #cat,
CONT #cont,
CTXT #ctxt,
ARG-S #args,
BAR +]],
J-NEEDS-AFFIX -,
LMORPH-BIND-TYPE #lmorph,
ARGS < [SYNSEM [LOCAL [CAT #cat & [HEAD verb-stem_head & [FIN bool,
VN -,
LIGHT -,
EMPTY -]],
CONT #cont,
CTXT #ctxt,
ARG-S #args,
BAR -],
LEX +],
LMORPH-BIND-TYPE #lmorph,
J-NEEDS-AFFIX -] >].
; (ERB 2002-01-02) Getting double parses for "お送りいただきたい"
; because いただきたい is compatible with the head of hsr and the
; vend of vn-vend-rule. (Similar problems don't arise with
; 食べていただきたい because 食べて is also [HEAD v-end_head] and
; therefore incompatible with the vstem-vend rule.) This is a
; bit of a hack, but keep the vn-vend-rule from appying in these
; cases by requiring vend to be [AUX -].
; (MS 2002-11-29) Do we need this rule???
;vn-vend-rule := stem-end-rule-type &
;[ ARGS < [SYNSEM.LOCAL.CAT.HEAD vn_head],
; [SYNSEM.LOCAL.CAT.HEAD.AUX -] >].
; (MS 2003-12-19) Matrix 0.6
; FCB & DPF make the specifier empty
vend-vend-rule := head-marker-rule &
[SYNSEM [LOCAL [NUCL nucl_plus,
CONT.HOOK #hook,
BAR #bar],
LEX +,
MODIFIED.PERIPH #per],
J-NEEDS-AFFIX #aff,
LMORPH-BIND-TYPE #lmorph,
RMORPH-BIND-TYPE #rmorph,
ARGS <[SYNSEM synsem & [LOCAL [CAT [HEAD verbend_head & [MODUS #mod],
VAL.SPR <>],
BAR #bar]],
J-NEEDS-AFFIX +,
RMORPH-BIND-TYPE #mt,
LMORPH-BIND-TYPE #lmorph,
INFLECTED +],
[SYNSEM synsem & [LOCAL [CAT.HEAD verbend_head & [MODUS #mod],
CONT.HOOK #hook],
MODIFIED.PERIPH #per],
J-NEEDS-AFFIX #aff,
LMORPH-BIND-TYPE #mt,
RMORPH-BIND-TYPE #rmorph,
INFLECTED +]>].
;seminaa ga ichinichijuu haitte orimashite
; (ERB 2002-01-02) For some reason, we weren't copying up the
; MOD-IND and MOD-HAND in this rule. It might be a more general
; problem, but fixing it here for now.
; (MS 2004-12-22) no MOD-IND/MOD-HAND
; FCB removing the modified peripheral link
;
head-specifier-rule := head-specifier-rule-type &
adjacent-spr-check &
[SYNSEM [LOCAL [BAR #bar,
CAT [VAL [UNSAT -,
SPR null],
HEAD.FIN #bool],
CONT.HOOK [XARG #xarg,
INDEX #mind,
LTOP #mhand]],
LEX -,
MODIFIED.PERIPH bool],
ARGS <[SYNSEM synsem & [MODIFIED.PERIPH bool],
J-NEEDS-AFFIX -],
[SYNSEM synsem & [LOCAL [ CAT.HEAD.FIN #bool,
BAR #bar,
CONT.HOOK [XARG #xarg,
INDEX #mind,
LTOP #mhand]]]]>].
; (MS 2005-06-20) AHON needs to be copied, because the prefixes are often honorific.
prefix-attach-rule := prefix-rule &
[SYNSEM.LOCAL.CAT.HEAD.FORMAL.AHON #ahon,
ARGS < [SYNSEM.LOCAL [BAR -,
CAT.HEAD hon-prefix_head & [FORMAL.AHON #ahon] ],
J-NEEDS-AFFIX -],
[SYNSEM.LOCAL.BAR bool,
J-NEEDS-AFFIX -] >].
; (MS 2003-12-19) Matrix 0.6
; (do-parse-tty "ビール が 飲み たい")
tai-obj-change-rule := obj-casechange-rule &
[SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST [OPT - ,
LOCAL.CAT.HEAD overt-case-p_head &
[CASE ga]],
ARGS < [SYNSEM [LOCAL [CAT [HEAD v-op-end_head & [KEYS.KEY tai_v_want_rel],
VAL [SPR null,
SUBJ null]]]]] >].
;; 機関の変更したい
;
; I would prefer to delete these
;
; vn-light-obj-change-rule-case-p := obj-casechange-rule &
; [SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST [OPT - ,
; LOCAL.CAT.HEAD overt-case-p_head &
; [CASE no-case]],
; RMORPH-BIND-TYPE #rmorph,
; ARGS < [SYNSEM.LOCAL.CAT [HEAD light-verb_head,
; VAL.SPR null],
; RMORPH-BIND-TYPE #rmorph] >].
; vn-light-obj-change-rule-noun := obj-casechange-rule &
; [SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST [OPT - ,
; LOCAL.CAT [HEAD noun_head,
; VAL saturated]],
; RMORPH-BIND-TYPE #rmorph,
; ARGS < [SYNSEM.LOCAL.CAT [HEAD light-verb_head,
; VAL.SPR null],
; RMORPH-BIND-TYPE #rmorph] >].
; (ERB 2001-09-26) Constraining head-dtr to be [HEAD verb_head-avm]
; so that this rule can't apply after the vstem-vend-rule.
; (FCB 2006-08-09) Constraining things to be BAR - for the same reason
; FIXME why do this and tai-obj-change-rule come on opposite sides of the vend-rule
; (do-parse-tty "ビール が 飲める")
; (do-parse-tty "犬 が 食べ られる")
rareru-obj-change-rule := obj-casechange-rule &
[SYNSEM.LOCAL [CAT.VAL [COMPS.FIRST.LOCAL [ CAT.HEAD overt-case-p_head &
[CASE ga]]],
BAR +],
ARGS < [SYNSEM [LOCAL [ CAT [HEAD verb_head & [KEYS.KEY rareru_v_can_rel,
MODUS potential],
VAL.SUBJ null],
BAR +]]] >].
; (MS 2004-12-10) I don't want this to apply to copula verbs (generation).
; FIXME doesn't apply now
;(do-parse-tty "犬 を 欲し がる")
garu-sbj-change-rule := subj-casechange-rule &
[SYNSEM.LOCAL.CAT.VAL [SUBJ.FIRST [LOCAL.CAT.HEAD overt-case-p_head &
[CASE wo]]],
ARGS < [SYNSEM [LOCAL.CAT [HEAD [KEYS.KEY garu_v_seem_rel,
COP -],
VAL.SUBJ.FIRST.LOCAL.CAT.HEAD.CASE ga]]] >].
; (ERB 2001-09-20) We want currency NumClPs at least to be possible
; left daughters of compounds for things like 百円ノート or
; 二万ドル車. That these are actually compounds is shown by the
; pronunciation of the latter (niman doru guruma), which involves rendaku.
; (MS 2001-10-10) But if you restrict them to be BAR -, they can (e.g.) not be modified. Let them be BAR bool and everything is possible?
; (ERB 2001-11-01) Breaking this up into three rules. See notes
; in ruletypes.tdl.
; (ERB 2004-1-20) Trying to conflate the two noncards.
;nominal-numcl-rule-nomod := nominal-numcl-rule-nomod &
; [ SYNSEM.LOCAL.BAR bool ].
;nominal-numcl-rule-mod := nominal-numcl-rule-mod &
; [ SYNSEM.LOCAL.BAR bool ].
nominal-numcl-rule := nominal-numcl-rule-type-noncard.
; (ERB 2004-1-20) Try getting rid of this one in favor of
; always jusing the noncard variant.
;nominal-numcl-rule-card := nominal-numcl-rule-card &
; [ SYNSEM.LOCAL.BAR + ].
; ERB (2001-09-24) Overhauling the date expressions. They will be
; nouns to start with, so we don't need this.
;nominal-date-rule := nominal-date-rule-type &
; [ SYNSEM.LOCAL.BAR + ].
; (ERB 2004-1-20) This seems to be working now, but it's creating
; huge amounts of ambiguity. I suggest leaving it out until we
; have a means of putting in sortal constraints to keep these guys