;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; grule-types.tdl ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; <<>> ----- GRAMMAR RULE DEFINITIONS ----- dtr-type :< synsem-struc. head-dtr-type := dtr-type & [ H synsem-struc ]. nh1-dtr-type := dtr-type & [ NH1 synsem-struc ]. nh2-dtr-type := dtr-type & [ NH2 synsem-struc ]. ;;for grammar rules grule :< phrase. head-feature-principle := grule & head-dtr-type & [ SYN [ HEAD #head ], H [ SYN [ HEAD #head ] ] ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;the semantic-inheritace-principle was taken from the textbook grammar 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 ] ] ] > ]. ;;;;;;semantic compositionality added 02/24. unary-grule-type := semantic-compositionality-unary & [ ORTH #orth, ARGS < [ ORTH #orth ] > ]. binary-grule-type := 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 := 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 := unary-grule-type & headed-rule & [ H #1, ARGS < #1 & word+arg_real > ]. binary-COMPS-rule := binary-grule-type & headed-rule & [ H #1, NH1 #2, ARGS < word+arg_real & #1, phrase & #2 > ] . trinary-COMPS-rule := trinary-grule-type & headed-rule & [ H #1, NH1 #2, NH2 #3, ARGS < word+arg_real & #1, phrase & #2, phrase & #3 > ]. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; unary-grule := nh1-dtr-type & unary-grule-type & [ NH1 #1, ARGS < phrase & #1 > ]. unary-grule-headed := headed-rule & unary-grule & [ H #1, ARGS < phrase & #1 > ]. birule-headfirst := binary-grule-type & headed-rule & [ H #1, NH1 #2, ARGS < phrase & #1, phrase & #2 > ] . birule-headfinal := binary-grule-type & headed-rule & [ NH1 #1, H #2, ARGS < phrase & #1, phrase & #2 > ] . trirule-nonheaded := trinary-grule-type & [ NH1 #1, NH2 #2, NH3 #3, ARGS< phrase & #1, phrase & #2, phrase & #3> ].