;;; File: no-to.systems
;;; This file contains a modification to the system INDIRECT-MOOD-TYPE, plus
;;;   a new system TO-MARKER, which does or does not insert the
;;;    marker "to" in front of an infinitive.  This is useful if we want to
;;;    produce phrases like "I help you make," rather than "I help you to make."
;;;    This file also includes a new chooser and inquiry for the new system.
;;; Susan williams, July 3, 1995

;;; Last saved in emacs: Time-stamp: <95/07/03 16:17:29 swilliam>

(in-package :penman)

(system
   :name INDIRECT-MOOD-TYPE
   :inputs PROJECTION-CLAUSE
   :outputs ((0.5 INDIRECT-INDICATIVE (* PRESELECT PROCESS FINITIVE))
             (0.5 INDIRECT-IMPERATIVE)
	     ;; This formerly inserted the TO-INFINITVE
	     ;; Now the next system down the line will instead
	     )
   :chooser INDIRECT-MOOD-TYPE-CHOOSER
   :selector CHOICE-MASTER
   :old-feature INDIRECT-INDICATIVE
   :region MOOD
   :metafunction INTERPERSONAL)

(system
   :name TO-MARKER
   :inputs INDIRECT-IMPERATIVE
   :outputs ((0.5 USE-TO-MARKER
		  (INSERT TO-INFINITIVE) (LEXIFY TO-INFINITIVE TO)
		  (PARTITION TO-INFINITIVE NONFINITIVE))
             (0.5 NO-TO-MARKER))
   :chooser TO-MARKER-CHOOSER
   :selector CHOICE-MASTER
   :old-feature USE-TO-MARKER
   :region MOOD
   :metafunction INTERPERSONAL)

(chooser
   :name TO-MARKER-CHOOSER
   :definition ((ASK (to-to-or-not-to-to-q ONUS)
                     (no-to (choose no-to-marker))
                     (use-to (choose use-to-marker))))
   :comments ""
   :editor "WW"
   :date "July 3, 1995 at UW.")

(askoperator 
   :name to-to-or-not-to-to-q
   :domain KB
   :mode IMPLEMENTED
   :parameters (ACTION)
   :english ("Do you want the word \"to\" in or not?")
   :operatorcode TRIVIALDEFAULTCODE
   :parameterassociationtypes (CONCEPT)
   :answerset (no-to use-to)
   :trivialdefault use-to)

(set-grammar-keyword-types)

(defvar sample-no-to-sentence
  '(help / liking
	:lex help
	:in-order-q noinorder
	:senser ((cart / substance
		       :lex cartilage
		       :property-ascription (smooth / quality 
						    :lex smooth))
		 (bone / object
		       :lex bone
		       :determiner zero))
	:phenomenon (walk / nondirected-action 
			  :lex walk  
			  :actor (hearer / person) 
			  :command-offer-q notcommandoffer   ;; necessary for "you"
			  :to-to-or-not-to-to-q no-to
			  :manner (eas / quality 
				       :lex easily)
			  :exclusive (pain / abstraction
					   :lex pain
					   :determiner zero))))
