;;; File: new-circumstantial-exntesions.lisp
;;; Last saved in emacs: Time-stamp: <97/01/22 22:43:07 jlitchfi>

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; extensions to the system CIRCUMSTANTIAL-DEPENDENT-TYPE and others.   ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(in-package :penman)


;;; new subordinators "why", "how", "even if", "unless", "even though"

;;; redefined system from
;;; ~nlu/KPML-1.0/R3-beta-9/ENGLISH/Grammar/DEPENDENCY.systems

(system
   :name CIRCUMSTANTIAL-DEPENDENT-TYPE
   :inputs ENHANCING-CLAUSE
   :outputs 
            ((0.1 TEMPORAL-DEPENDENT)
              (0.1 SPATIAL-DEPENDENT
                          (LEXIFY SUBORDINATOR WHERERELATIVE))
              (0.1 MANNER-DEPENDENT)
              (0.1 CAUSE-DEPENDENT)
              (0.1 PURPOSE-DEPENDENT)
              (0.1 CONCESSION-DEPENDENT
		   ) ;;      (LEXIFY SUBORDINATOR ALTHOUGH)
              (0.1 CONDITIONAL-DEPENDENT
		   )	;;   (LEXIFY SUBORDINATOR IFCONJCT)
	      (0.1 reason-dependent
		   (lexify subordinator why))
	      (0.2 method-dependent 
		   (lexify subordinator how))
	      )
   :chooser CIRCUMSTANTIAL-DEPENDENT-TYPE-CHOOSER
   :selector CHOICE-MASTER
   :region DEPENDENCY
   :metafunction LOGICAL
   :comments "(INCREASE IN DELICACY AND NO OF OPTIONS)"
   )

;;; redefined system from
;;; ~nlu/KPML-1.0/R3-beta-9/ENGLISH/Grammar/CLAUSECOMPLEX.systems

(system
   :name EXTENDING-CLAUSE-TYPE
   :inputs EXTENDING-CLAUSE
   :outputs ((0.33333334 ADDITIVE-EXTENDING) 
	     (0.33333334 VARYING-EXTENDING)
	     (0.33333334 ALTERNATIVE-EXTENDING
			)); (LEXIFY SUBORDINATOR IFCONJCT)
   :chooser EXTENDING-CLAUSE-TYPE-CHOOSER
   :selector CHOICE-MASTER
   :region CLAUSECOMPLEX
   :metafunction LOGICAL)



;;; new systems

(system 
 :name conditional-dependent-polarity
 :inputs (or CONDITIONAL-DEPENDENT
	     alternative-extending)
 :outputs ((0.5 POSITIVE-CONDITIONAL-DEPENDENT
		;; (LEXIFY SUBORDINATOR IFCONJCT)
		)
	   (0.5 NEGATIVE-CONDITIONAL-DEPENDENT
		(lexify subordinator unless)))
 :chooser conditional-dependent-polarity-chooser
 :selector CHOICE-MASTER
 :region DEPENDENCY
 :metafunction LOGICAL
 )

(system
 :name concession-markedness
 :inputs concession-dependent
 :outputs ((0.5 concession-unmarked
		(lexify subordinator although))
	   (0.5 concession-marked
		(lexify subordinator even-though)))
 :chooser concession-markedness-chooser
 :selector CHOICE-MASTER
 :region DEPENDENCY
 :metafunction LOGICAL
 )


(system 
 :name concessive-conditional-dependent
 :inputs POSITIVE-CONDITIONAL-DEPENDENT
 :outputs ((0.5 nonconcessive-CONDITIONAL-DEPENDENT
		(LEXIFY SUBORDINATOR IFCONJCT))
	   (0.5 concessive-CONDITIONAL-DEPENDENT
		(lexify subordinator even-if)))
 :chooser concessive-conditional-dependent-chooser
 :selector CHOICE-MASTER
 :region DEPENDENCY
 :metafunction LOGICAL
 )


;;; redefined chooser from:
;;; ~nlu/KPML-1.0/R3-beta-9/ENGLISH/Grammar/DEPENDENCY.choosers

(CHOOSER
 :NAME                   CIRCUMSTANTIAL-DEPENDENT-TYPE-CHOOSER
 :DEFINITION             ((IDENTIFY SUBORDINATOR
				    (CONJUNCTIVE-RELATION-ID ONUS))
			  (IDENTIFY SUBORDINATOR
				    (CONCEPTUAL-CORRELATE-ID SUBORDINATOR))
			  (ASK (LOCATION-Q SUBORDINATOR)
			       (LOCATION
				(ASK (SPATIO-TEMPORAL-TYPE-Q SUBORDINATOR)
				     (SPATIAL (CHOOSE SPATIAL-DEPENDENT))
				     (TEMPORAL
				      (CHOOSE TEMPORAL-DEPENDENT))))
			       (NONLOCATION
				(ASK (CONDITIONAL-RELATION-Q SUBORDINATOR)
				     (CONDITION
				      (CHOOSE CONDITIONAL-DEPENDENT))
				     (NOTCONDITION
				      (ASK
				       (CONCESSIVE-RELATION-Q SUBORDINATOR)
				       (CONCESSION
					(CHOOSE CONCESSION-DEPENDENT))
				       (NOTCONCESSION
					(ASK
					 (CAUSAL-RELATION-Q SUBORDINATOR)
					 (CAUSALRELATION
					 (ask 
					  (PURPOSE-RELATION-Q SUBORDINATOR)
					  (PURPOSE 
					   (CHOOSE PURPOSE-DEPENDENT))
					  (NOTPURPOSE
					   (ASK
					    (reason-relation-q subordinator)
					    (reason
					     (choose reason-dependent))
					    (notreason
					     (ASK
					      (method-relation-q subordinator)
					      (method
					       (choose method-dependent))
					      (notmethod
					       (CHOOSE CAUSE-DEPENDENT))))))))
					 (NOTCAUSALRELATION
					  (ASK
					   (MANNER-Q SUBORDINATOR PROCESS)
					   (NONMANNER)
					   (MANNER
					    (CHOOSE
					     MANNER-DEPENDENT)))))))))))
			  (* LP "11-Nov-86 09:34:59"))
 :DATE                   "8-4-1992 15:49:51 at IPSI."
 )


;;; new choosers

(chooser
 :name conditional-dependent-polarity-chooser
 :definition ((ASK (if-unless-q subordinator)
		   (if (choose positive-conditional-dependent))
		   (unless (choose negative-conditional-dependent))))
 :comments ""
 :editor "WW"
 :date "July 21, 1995 at FAW.")


(chooser
 :name concession-markedness-chooser
 :definition ((ASK (although-even-though-q subordinator)
		   (although (choose concession-unmarked))
		   (even-though (choose concession-marked))))
 :comments ""
 :editor "WW"
 :date "July 21, 1995 at FAW.")


(chooser
 :name concessive-conditional-dependent-chooser
 :definition ((ASK (concessive-conditional-relation-q subordinator)
		   (nonconcessive 
		    (choose nonconcessive-CONDITIONAL-DEPENDENT))
		   (concessive 
		    (choose concessive-CONDITIONAL-DEPENDENT))))
 :comments ""
 :editor "JLL"
 :date "96Apr24"
 )


;;; new inquiries

(ASKOPERATOR
 :NAME                   REASON-RELATION-Q
 :DOMAIN                 KB
 :PARAMETERS             (RELATION1)
 :ENGLISH                ( " Is the relation" RELATION1 "  one of reason?")
 :OPERATORCODE           trivialdefaultcode
 :PARAMETERASSOCIATIONTYPES      (CONCEPT)
 :ANSWERSET              (REASON NOTREASON)
 :TRIVIALDEFAULT         NOTREASON
 )

(ASKOPERATOR
 :NAME                   METHOD-RELATION-Q
 :DOMAIN                 KB
 :PARAMETERS             (RELATION1)
 :ENGLISH                ( " Is the relation" RELATION1 "  one of method?")
 :OPERATORCODE           trivialdefaultcode
 :PARAMETERASSOCIATIONTYPES      (CONCEPT)
 :ANSWERSET              (method notmethod)
 :TRIVIALDEFAULT         notmethod
 :PRESELECTIONGUIDANCE   ((PURPOSE-DEPENDENT . NOTmethod)
			  (CAUSE-DEPENDENT . NOTmethod))
 )

(askoperator 
 :name if-unless-q
 :domain TP
 :mode IMPLEMENTED
 :parameters (ITEM)
 :english ("Do you wish to express " ITEM " as the word IF or the word UNLESS?")
 :operatorcode TRIVIALDEFAULTCODE
 :parameterassociationtypes (CONCEPT)
 :answerset (if unless)
 :trivialdefault if)

(askoperator
 :name although-even-though-q
 :domain TP
 :mode IMPLEMENTED
 :parameters (ITEM)
 :english ("Do you wish to express " ITEM " as the word ALTHOUGH or the phrase EVEN THOUGH?")
 :operatorcode TRIVIALDEFAULTCODE
 :parameterassociationtypes (CONCEPT)
 :answerset (although even-though)
 :trivialdefault although)


(askoperator 
 :name concessive-conditional-relation-q
 :domain TP
 :mode IMPLEMENTED
 :parameters (ITEM)
 :english ("Does the relation" ITEM "express a state of concession as well as condition?")
 :operatorcode TRIVIALDEFAULTCODE
 :parameterassociationtypes (CONCEPT)
 :answerset (concessive nonconcessive)
 :trivialdefault nonconcessive
 )


;;; new lex items

(lexical-item
 :name UNLESS
 :spelling "unless"
 :sample-sentence  "I won't do it unless you do, too."
 :features  (LINKER SUBORDINATOR NOT-PUNCTUATION 
		    NONE-OF-CONJUNCT-CONJUNCTIVE 
		    NOT-SENTENCECONJUNCTION)
 :date  "July 21, 1995, at FAW"
 :editor  "WW")

(lexical-item
 :name EVEN-IF
 :spelling "even if"
 :sample-sentence  "I won't do it even if you do."
 :features  (LINKER SUBORDINATOR NOT-PUNCTUATION 
		    NONE-OF-CONJUNCT-CONJUNCTIVE 
		    NOT-SENTENCECONJUNCTION)
 :editor "JLL"
 :date "96Apr24"
 )


;;; gate to allow "how to <infinitive>"

(GATE
 :NAME                   NONFINITE-method-DEPENDENT
 :INPUTS                 (AND method-DEPENDENT NONFINITE-ENHANCING)
 :OUTPUTS                ((1.0 NONFINITE-method-DEPENDENT
			       (INFLECTIFY NONFINITIVE STEM)
			       (INSERT TO-INFINITIVE) 
			       (LEXIFY TO-INFINITIVE TO)
			       (ORDER TO-INFINITIVE NONFINITIVE)))
 :REGION                 DEPENDENCY
 :METAFUNCTION           LOGICAL
 )

