;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; SYNTACTIC THEORY by Sag and Wasow -- Textbook Grammar ;;; implementation by Chris Callison-Burch & Scott Guffey ;;; ;;; grules.tdl ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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. head-specifier-rule := birule-headfinal & [ SYN [ SPR < > ], NH1 #1, H [ SYN [ HEAD norv, SPR < #1 & [ SYN [ SPR < > ] ] > ] ] ]. ;; 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? head-complement-rule-0 := unary-COMPS-rule & [ SYN [ SPR #spr, COMPS < > ], H [ SYN [ SPR #spr, COMPS < > ] ] ]. head-complement-rule-1 := binary-COMPS-rule & [ SYN [ SPR #spr, COMPS < > ], H [ SYN [ SPR #spr, COMPS < #1 > ] ], NH1 #1 ]. head-complement-rule-2 := trinary-COMPS-rule & [ SYN [ SPR #spr, COMPS < > ], H [ SYN [ SPR #spr, COMPS < #1, #2 > ] ], NH1 #1, NH2 #2 ]. head-modifier-rule := birule-headfirst & [ SYN [ SPR < #spr > ], H #1 & [ SYN [ SPR < #spr > ] ], NH1 [ SYN [ HEAD [ MOD < #1 > ] ] ] ]. imperative-rule := unary-grule & [ SYN [ HEAD verb & [ FORM fin ], SPR < > ], SEM [ MODE dir, INDEX #ind ], NH1 [ SYN [ HEAD verb & [ FORM inf ], SPR < [ SYN [ HEAD noun & [ AGR [ PER 2nd ] ] ] ] > ], SEM [ INDEX #ind ] ] ]. bare-plural-rule := unary-grule-headed & [ SYN [ SPR < >, COMPS #comps], SEM #sem, H [SYN [HEAD noun & [AGR [NUM plur] ], SPR < [ ] >, COMPS #comps], SEM #sem ] ]. ;; See Change File #9 bare-mass-noun-rule := unary-grule-headed & [ SYN [ SPR < >, COMPS #comps], SEM #sem, H [SYN [ SPR < [SYN [HEAD [COUNT false] ] ] >, COMPS #comps], SEM #sem ] ]. ;; See Changes File #10 #| ;;; This head filler rule allows for multiple extractions. 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 ] ] ]. |# head-filler-rule := birule-headfinal-minusGAP & [ SYN [ SPR < >, COMPS < >, GAP ], NH1 #1 & [ SYN [ GAP ] ], H [ SYN [ HEAD verb & [ FORM fin ], SPR < >, COMPS < >, GAP ], SEM [MODE prop ] ] ]. ;; 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. noun-coordination-rule := trirule-nonheaded & [ SYN [ HEAD noun & [ AGR non-3sing & [ NUM plur ], CASE #case ], SPR #spr, COMPS #comps], SEM [ INDEX #and-index ], NH1 [ SYN [ HEAD noun & [CASE #case ], SPR #spr, COMPS #comps ]], NH2 [ SYN [ HEAD conj ], SEM [ INDEX ref-index & #and-index ] ], NH3 [ SYN [ HEAD noun & [CASE #case ], SPR #spr, COMPS #comps ]]]. ;; In order for it to be accurate we need to add a list of ANDARGS to NH2. verb-coordination-rule := trirule-nonheaded & [ SYN [ HEAD verb & [FORM #form], SPR #spr, COMPS #comps, GAP #gap ], SEM [ MODE prop, INDEX #and-sit-index ], NH1 [ SYN [ HEAD verb & [FORM #form], SPR #spr, COMPS #comps, GAP #gap ], SEM [ MODE prop ] ], NH2 [ SYN [ HEAD conj ], SEM [ INDEX sit-index & #and-sit-index ] ], NH3 [ SYN [ HEAD verb & [FORM #form], SPR #spr, COMPS #comps, GAP #gap ], SEM [ MODE prop ] ] ]. ; INDEX #1 ] ], ; RESTR ] !>] ], ; INDEX #2 ] ] ]. #| verb-coordination-rule2 := trirule-nonheaded & [ 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 ] ] ]. |#