;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; grules-textbook.tdl ;;; ;;; SYNTACTIC THEORY by Sag and Wasow -- Textbook Grammar ;;; implementation by Chris Callison-Burch & Scott Guffey ;;; ;;; (adapted for the use with the Spanish grammar) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; The head verb phrase was put int to prevent pdp's from taking specifiers ;; as with "There was a book on the table". All we lose is absolutives. ;:begin :instance. ;head-specifier-rule-textbook := birule-headfinal-textbook & ; [ SYN [ SPR < > ], ; ; NH1 #1, ; H [ SYN [ HEAD norv, ; SPR < #1 & [ SYN [ SPR < > ] ] > ] ] ]. ;:end :instance. ;; Do we really want three head compliment rules? Does this also require ;; two head-filler rules? Why don't we go back to just one binary branching ;; rule? ;:begin :instance. ;head-complement-rule-0 := unary-COMPS-rule & ; [ SYN [ SPR #spr, ; COMPS < > ], ; ; H [ SYN [ SPR #spr, ; COMPS < > ] ] ]. ;:end :instance. ;:begin :instance. ;head-complement-rule-1 := binary-COMPS-rule & ; [ SYN [ SPR #spr, ; COMPS < > ], ; ; H [ SYN [ SPR #spr, ; COMPS < #1 > ] ], ; NH1 #1 ]. ;:end :instance. ;:begin :instance. ;head-complement-rule-2 := trinary-COMPS-rule & ; [ SYN [ SPR #spr, ; COMPS < > ], ; ; H [ SYN [ SPR #spr, ; COMPS < #1, #2 > ] ], ; NH1 #1, ; NH2 #2 ]. ;:end :instance. ;:begin :instance. ;head-modifier-rule := birule-headfirst & ; [ SYN [ SPR < #spr > ], ; ; H #1 & [ SYN [ SPR < #spr > ] ], ; NH1 [ SYN [ HEAD [ MOD < #1 > ] ] ] ]. ;:end :instance. :begin :instance. imperative-rule-textbook := unary-grule & [ SYN [ HEAD verb-textbook & [ FORM fin ], SPR < > ], SEM [ MODE dir, INDEX #ind ], NH1 [ SYN [ HEAD verb-textbook & [ FORM inf ], SPR < [ SYN [ HEAD noun-textbook & [ AGR [ PER 2nd ] ] ] ] > ], SEM [ INDEX #ind ] ] ]. :end :instance. :begin :instance. bare-plural-rule-textbook := unary-grule-headed & [ SYN [ SPR < >, COMPS #comps], SEM #sem, H [SYN [HEAD noun & [AGR [NUM plur] ], SPR < [ ] >, COMPS #comps], SEM #sem ] ]. :end :instance. ;; See Change File #9 :begin :instance. bare-mass-noun-rule-textbook := unary-grule-headed & [ SYN [ SPR < >, COMPS #comps], SEM #sem, H [SYN [ SPR < [SYN [HEAD [COUNT false] ] ] >, COMPS #comps], SEM #sem ] ]. :end :instance. ;; See Changes File #10 #| ;;; This head filler rule allows for multiple extractions. :begin :instance. head-filler-rule := birule-headfinal-minusGAP & [ SYN [ SPR < >, COMPS < >, GAP [ LIST #rest, LAST #last] ], NH1 #1 & [ SYN [ GAP ] ], H [ SYN [ HEAD verb & [ FORM fin ], SPR < >, COMPS < >, GAP [ LIST *cons* & < #1 . #rest>, LAST *null* & #last ] ], SEM [MODE prop ] ] ]. :end :instance. |# :begin :instance. head-filler-rule-textbook := birule-headfinal-minusGAP & [ SYN [ SPR < >, COMPS < >, GAP ], NH1 #1 & [ SYN [ GAP ] ], H [ SYN [ HEAD verb-textbook & [ FORM fin ], SPR < >, COMPS < >, GAP ], SEM [MODE prop ] ] ]. :end :instance. ;; This version of the noun coordination rule does not account for binding... ;; I'm not even sure the book accounts for it since it seems to want the ;; index for conjuctions to be a sit-index, not a ref-index. :begin :instance. noun-coordination-rule-textbook := trirule-nonheaded & [ SYN [ HEAD noun-textbook & [ AGR non-3sing & [ NUM plur ], CASE #case ], SPR #spr, COMPS #comps], SEM [ INDEX #and-index ], NH1 [ SYN [ HEAD noun-textbook & [CASE #case ], SPR #spr, COMPS #comps ]], NH2 [ SYN [ HEAD conj-textbook ], SEM [ INDEX ref-index & #and-index ] ], NH3 [ SYN [ HEAD noun-textbook & [CASE #case ], SPR #spr, COMPS #comps ]]]. :end :instance. ;; In order for it to be accurate we need to add a list of ANDARGS to NH2. :begin :instance. verb-coordination-rule-textbook := trirule-nonheaded & [ SYN [ HEAD verb-textbook & [FORM #form], SPR #spr, COMPS #comps, GAP #gap ], SEM [ MODE prop, INDEX #and-sit-index ], NH1 [ SYN [ HEAD verb-textbook & [FORM #form], SPR #spr, COMPS #comps, GAP #gap ], SEM [ MODE prop ] ], NH2 [ SYN [ HEAD conj-textbook ], SEM [ INDEX sit-index & #and-sit-index ] ], NH3 [ SYN [ HEAD verb-textbook & [FORM #form], SPR #spr, COMPS #comps, GAP #gap ], SEM [ MODE prop ] ] ]. :end :instance. ; INDEX #1 ] ], ; RESTR ] !>] ], ; INDEX #2 ] ] ]. #| :begin :instance. verb-coordination-rule2 := trirule-nonheaded-textbook & [ SYN #syn, SEM [ MODE #mode, INDEX #sit-index ], NH1 [ SYN #syn, SEM [ MODE #mode ] ], NH2 [ SYN [ HEAD conj ], SEM [ INDEX #sit-index ] ], NH3 [ SYN #syn, SEM [ MODE #mode ] ] ]. :end :instance. |#