;;; file no-inorder.lisp
;;; This file contains a new system so that can be used to get rid of "in order to"
;;;    so we can just get "to instead.
;;; A sample SPL is included.  To test it type:
;;;       (say-spl sample-no-inorder-sentence)
;;; Susan Williams May, 1995.


(in-package :penman)

(system
 :name NONFINITE-PURPOSE-DEPENDENT
 :inputs (AND PURPOSE-DEPENDENT NONFINITE-ENHANCING)
 :outputs ((0.5 NONFINITE-PURPOSE-DEPENDENT-inorder
		(LEXIFY SUBORDINATOR INORDER)
		(INFLECTIFY NONFINITIVE STEM) (INSERT TO-INFINITIVE)
		(LEXIFY TO-INFINITIVE TO)
		(ORDER TO-INFINITIVE NONFINITIVE))
	   (0.5 NONFINITE-PURPOSE-DEPENDENT-no-inorder
		(lexify subordinator empty-lex)
		(INFLECTIFY NONFINITIVE STEM) (INSERT TO-INFINITIVE)
		(LEXIFY TO-INFINITIVE TO)
		(ORDER TO-INFINITIVE NONFINITIVE)))
 :chooser nonfinite-purpose-dependent-chooser
 :selector CHOICE-MASTER
 :old-feature NONFINITE-PURPOSE-DEPENDENT
 :region DEPENDENCY
 :metafunction LOGICAL)

(chooser
 :name nonfinite-purpose-dependent-chooser
 :definition ((ASK (in-order-q onus)
		   (inorder (choose NONFINITE-PURPOSE-DEPENDENT-inorder))
		   (noinorder (choose NONFINITE-PURPOSE-DEPENDENT-no-inorder))))
 :comments ""
 :editor "WW"
 :date "15-mar-95")

(askoperator
 :name in-order-q
 :domain TP
 :mode IMPLEMENTED
 :parameters (SPEC)
 :english ("Do you want 'in order to' or just 'to' with " spec " ?")
 :operatorcode trivialdefaultcode
 :parameterassociationtypes (CONCEPT)
 :answerset (inorder noinorder)
 :activedefault inorder
 :trivialdefault inorder)

(set-grammar-keyword-types)

(defvar sample-no-inorder-sentence
  '(rst / rst-purpose   
	:domain (fly / nondirected-action
		     :actor (speaker / person) 
		     :lex fly-verb)
	:range (see / perception
		    :senser (hearer / person)
		    :in-order-q noinorder
		    :lex see)))
;;;"I fly, to see."
