;;; File: confirm.lisp
;;; Last saved in emacs: Time-stamp: <97/01/22 21:30:39 jlitchfi>

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The following adds the ability to ask questions like                 ;;;
;;; "blah blah blah, right?"  - Jon                                      ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 


(SYSTEM
 :NAME                   DECLARATIVE-TAG
 :INPUTS                 (AND DECLARATIVE SUBJECT-INSERTED)
 :OUTPUTS                ((0.8 UNTAGGED)
			  (0.1 DECLARATIVE-TAGGED (INSERT MOODTAG)
                               (ORDERATEND MOODTAG) (CLASSIFY TAGFINITE VERB)
                               (INSERT TAGFINITE TAGSUBJECT)
                               (EXPAND MOODTAG TAGFINITE TAGSUBJECT)
                               (ORDER TAGFINITE TAGSUBJECT))
			  (0.1 UNTAGGED-CONFIRMATION (INSERT CONFIRMATION)
			       (ORDERATEND CONFIRMATION) (LEXIFY CONFIRMATION RIGHT)))
 :CHOOSER                DECLARATIVE-TAG-CHOOSER
 :REGION                 TAG
 :METAFUNCTION           INTERPERSONAL
 )


(CHOOSER
 :NAME                   DECLARATIVE-TAG-CHOOSER
 :DEFINITION             ((ASK (CONFIRMATION-REQUEST-Q ONUS)
			       (CONFIRMATIONREQUEST
				(ask (tagged-confirmation-q onus)
				     (tagged
				      (COPYHUB SUBJECT TAGSUBJECT)
				      (CHOOSE DECLARATIVE-TAGGED))
				     (untagged
				      (choose untagged-confirmation))))
			       (NOCONFIRMATIONREQUEST (CHOOSE UNTAGGED))))
 :DATE                   "8-4-1992 15:57:25 at IPSI."
 )

(askoperator
 :name                   tagged-confirmation-q
 :domain                 tp
 :parameters             (item)
 :operatorcode           trivialdefaultcode
 :parameterassociationtypes (modificationset)
 :answerset              (tagged untagged)
 :trivialdefault         tagged
 )

;;; get the punctuation right.

(setf (second (second *pre-punctuation*))
  (append (second (second *pre-punctuation*))
	  '((UNTAGGED-CONFIRMATION CONFIRMATION ","))))

(setf (second (second *post-punctuation*))
  (append (second (second *post-punctuation*))
	  '((UNTAGGED-CONFIRMATION CONFIRMATION "?"))))