;;; File: ordering-fix.lisp
;;; Last saved in emacs: Time-stamp: <97/01/22 23:01:07 jlitchfi>

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Add gate to permit "to <adverbial> <nonfinitive>",                   ;;; 
;;; eg. "I want to slowly begin."                                        ;;;
;;; Might want to disallow some (most?) of these?                        ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(gate
 :name medial-ORDER-after-to-infinitive
 :inputs (and (or medial-accompaniment
                  medial-manner
                  medial-matter
                  medial-temporal-extent
                  medial-spatial-extent
                  medial-role
                  medial-spatial-location
                  medial-temporal-location)
	      (or INDIRECT-IMPERATIVE
		  MOOD-PROSPECTIVE
		  MODULATED-NONFINITE-ELABORATING
		  NONFINITE-NONWH-SUBJECT-ELABORATING
		  NONFINITE-PURPOSE-DEPENDENT-inorder
		  NONFINITE-PURPOSE-DEPENDENT-no-inorder))
 :outputs ((1.0 medial-ORDER-after-to-infinitive
                (order-anchor-first to-infinitive medial)))
 :selector CHOICE-MASTER
 :old-feature THEME-ORDER
 :region THEME
 :metafunction TEXTUAL)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; fix this gate to allow :medial to work with dependent clauses properly. ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(gate
 :name medial-ORDER-after-subject
 :inputs (and 
	  (or medial-accompaniment
	      medial-manner
	      medial-matter
	      medial-temporal-extent
	      medial-spatial-extent
	      medial-role
	      medial-spatial-location
	      medial-temporal-location)
          not-auxed
          positive
          (or declarative 
	      indirect-indicative 
	      expansion-clause))
 :outputs ((1.0 medial-ORDER-after-subject
        (order-anchor-first subject medial)))
 :selector CHOICE-MASTER
 :old-feature THEME-ORDER
 :region THEME
 :metafunction TEXTUAL)


(chooser 
 :name nominal-mood-type-chooser
 :definition ((ask (wh-nominal-q thing)
		   (wh (choose wh-nominal))
		   (nonwh (choose nonwh-nominal))))
 :date "96Apr16"
 )

(askoperator
 :name wh-nominal-q
 :domain tp
 :parameters (thing)
 :english ("Is "
	   THING
	   " a wh-nominal or nonwh-nominal?")
 :operatorcode trivialdefaultcode
 :parameterassociationtypes (concept)
 :answerset (wh nonwh)
 :trivialdefault nonwh
 :preselectionguidance ((wh-nominal . wh)
			(nonwh-nominal . nonwh))
 )