;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; grule-types-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) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; <<>> ----- GRAMMAR RULE DEFINITIONS ----- ;dtr-type :< synsem-struc. ;nh1-dtr-type := dtr-type & ; [ NH1 synsem-struc ]. ;nh2-dtr-type := dtr-type & ; [ NH2 synsem-struc ]. ;head-dtr-type := dtr-type & ; [ H synsem-struc ]. ;grule :< phrase. ;head-feature-principle := grule & head-dtr-type & ; [ SYN [ HEAD #head ], ; ; H [ SYN [ HEAD #head ] ] ]. ;valence-principle :< grule. ;;; CCB when we introduce defaults we should add the following ;;; constraints as the default for headed-rules. ; & head-dtr-type & ; [ SYN [ SPR #spr, ; COMPS #comps ], ; ; H [ SYN [ SPR #spr, ; COMPS #comps ] ] ]. ;semantic-inheritance-principle := grule & head-dtr-type & ; [ SEM [ MODE #mode, ; INDEX #index ], ; ; H [ SEM [ MODE #mode, ; INDEX #index ] ] ]. ;headed-rule := head-feature-principle & ; semantic-inheritance-principle. ;semantic-compositionality-unary := grule & ;[ SEM [ RESTR #restr ], ; ; ARGS < [ SEM [ RESTR #restr ] ] > ]. ;semantic-compositionality-binary := grule & ;[ SEM [ RESTR [ LIST #restr_first, ; LAST #restr_last ] ], ; ; ARGS < [ SEM [ RESTR [ LIST #restr_first, ; LAST #restr_middle ] ] ], ; ; [ SEM [ RESTR [ LIST #restr_middle, ; LAST #restr_last ] ] ] > ]. ;semantic-compositionality-trinary := grule & ;[ SEM [ RESTR [ LIST #restr_first, ; LAST #restr_last ] ], ; ; ARGS < [ SEM [ RESTR [ LIST #restr_first, ; LAST #restr_second ] ] ], ; ; [ SEM [ RESTR [ LIST #restr_second, ; LAST #restr_third ] ] ], ; ; [ SEM [ RESTR [ LIST #restr_third, ; LAST #restr_last ] ] ] > ]. #| GAP-principle-unary := grule & [ SYN [ GAP #gap ], ARGS < [ SYN [ GAP #gap ] ] > ]. GAP-principle-binary := grule & [ SYN [ GAP [ LIST #gap_first, LAST #gap_last ] ], ARGS < [ SYN [ GAP [ LIST #gap_first, LAST #gap_middle ] ] ], [ SYN [ GAP [ LIST #gap_middle, LAST #gap_last ] ] ] > ]. GAP-principle-trinary := grule & [ SYN [ GAP [ LIST #gap_first, LAST #gap_last ] ], ARGS < [ SYN [ GAP [ LIST #gap_first, LAST #gap_second ] ] ], [ SYN [ GAP [ LIST #gap_second, LAST #gap_third ] ] ], [ SYN [ GAP [ LIST #gap_third, LAST #gap_last ] ] ] > ]. unary-grule-type-textbook := GAP-principle-unary & semantic-compositionality-unary & [ ORTH #orth, ARGS < [ ORTH #orth ] > ]. binary-grule-type-textbook := GAP-principle-binary & nh1-dtr-type & semantic-compositionality-binary & [ ORTH [ LIST #first, LAST #last ], ARGS < [ ORTH [ LIST #first, LAST #middle ] ], [ ORTH [ LIST #middle, LAST #last] ], ... > ]. trinary-grule-type-textbook := GAP-principle-trinary & nh1-dtr-type & nh2-dtr-type & semantic-compositionality-trinary & [ ORTH [ LIST #first, LAST #last], ARGS < [ORTH [ LIST #first, LAST #second ] ], [ORTH [ LIST #second, LAST #third ] ], [ORTH [ LIST #third, LAST #last] ] > ]. |# #| unary-COMPS-rule-textbook := unary-grule-type-textbook & headed-rule & [ H #1, ARGS < #1 & word+arg_real+ana_agr > ]. binary-COMPS-rule-textbook := binary-grule-type-textbook & headed-rule & [ H #1, NH1 #2, ARGS < word+arg_real+ana_agr & #1, phrase & #2 > ] . trinary-COMPS-rule-textbook := trinary-grule-type-textbook & headed-rule & [ H #1, NH1 #2, NH2 #3, ARGS < word+arg_real+ana_agr & #1, phrase & #2, phrase & #3 > ]. |# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #| unary-grule-textbook := nh1-dtr-type & unary-grule-type-textbook & [ NH1 #1, ARGS < phrase & #1 > ]. unary-grule-headed-textbook := headed-rule & unary-grule-textbook & [ H #1, ARGS < phrase & #1 > ]. birule-headfirst-textbook := binary-grule-type-textbook & headed-rule & [ H #1, NH1 #2, ARGS < phrase & #1, phrase & #2 > ] . birule-headfinal-textbook := binary-grule-type-textbook & headed-rule & [ NH1 #1, H #2, ARGS < phrase & #1, phrase & #2 > ] . birule-minusGAP-textbook := semantic-compositionality-binary & nh1-dtr-type & [ ORTH [ LIST #first, LAST #last ], ARGS < [ ORTH [ LIST #first, LAST #middle ] ], [ ORTH [ LIST #middle, LAST #last] ] > ]. birule-headfinal-minusGAP-textbook := birule-minusGAP-textbook & headed-rule & [ NH1 #1, H #2, ARGS < phrase & #1, phrase & #2 > ] . trirule-nonheaded-textbook := trirule-nonheaded & trinary-grule-type-textbook & [ NH1 #1, NH2 #2, NH3 #3, ARGS< phrase & #1, phrase & #2, phrase & #3> ]. |#