;;; File: conjunctives.lisp
;;; Time-stamp: <97/01/22 21:36:30 jlitchfi>


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The following adds a few conjunctives - as, but, for example         ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; old systems and choosers from redefined


(SYSTEM
  :NAME                   JOINTLY-REGARDED-TYPE
  :INPUTS                 JOINTLY-REGARDED
  :OUTPUTS                ((0.1 EXEMPLIFYING (LEXIFY CONJUNCTIVE FOR-EXAMPLE))
			   (0.1 CONTRASTIVE 
				(LEXIFY CONJUNCTIVE ALTERNATIVELY))
			   (0.2 COMPARATIVE ;; (LEXIFY CONJUNCTIVE SIMILARLY)
				)
			   (0.2 CORRECTIVE (LEXIFY CONJUNCTIVE BESIDES))
			   (0.2 DISJUNCTIVE ;; (LEXIFY CONJUNCTIVE HOWEVER)
				)
			   (0.2 ADDITIVE ;; (LEXIFY CONJUNCTIVE ALSO)
				))
  :CHOOSER                JOINTLY-REGARDED-TYPE-CHOOSER
  :REGION                 CONJUNCTION
  :METAFUNCTION           TEXTUAL
  )


(CHOOSER
 :NAME                   JOINTLY-REGARDED-TYPE-CHOOSER
 :DEFINITION             ((ask (exemplifying-q conjunctive)
			       (example (choose exemplifying))
			       (notexample
				(ASK (CONTRASTIVE-Q CONJUNCTIVE)
				     (CONTRASTIVE (CHOOSE CONTRASTIVE))
				     (NOTCONTRASTIVE
				      (ASK (SIMILARITY-Q CONJUNCTIVE)
					   (SIMILARITY (CHOOSE COMPARATIVE))
					   (NOTSIMILARITY
					    (ASK
					     (CORRECTION-Q CONJUNCTIVE)
					     (CORRECTION (CHOOSE CORRECTIVE))
					     (NOTCORRECTION
					      (ASK
					       (DISJUNCTIVE-Q CONJUNCTIVE)
					       (DISJUNCTIVE (CHOOSE DISJUNCTIVE))
					       (NOTDISJUNCTIVE
						(CHOOSE ADDITIVE))))))))))))
 :DATE                   "8-4-1992 15:49:29 at IPSI."
 )


(SYSTEM
 :NAME                   NONJOINTLY-REGARDED-TYPE
 :INPUTS                 NONJOINTLY-REGARDED
 :OUTPUTS                ((0.5 PRESENTATIONAL)
			  (0.5 NEGATIVE-CONDITIONAL
			       ;; (LEXIFY CONJUNCTIVE HOWEVER)
			       ))
 :CHOOSER                NONJOINTLY-REGARDED-TYPE-CHOOSER
 :REGION                 CONJUNCTION
 :METAFUNCTION           TEXTUAL
 )

;;; new system, chooser, inquiry

(system 
 :name also-as-well
 :inputs additive
 :outputs ((0.5 also (lexify conjunctive also))
	   (0.5 as-well (lexify conjunctive as-well)))
 :chooser also-as-well-chooser
 :region conjunction
 :metafunction textual
 )

(system 
 :name but-however 
 :inputs (or disjunctive negative-conditional)
 :outputs ((0.5 however (lexify conjunctive however)) 
	   (0.5 but (lexify conjunctive but))) 
 :chooser but-however-chooser
 :region conjunction
 :metafunction textual
 )

(system 
 :name as-similarly 
 :inputs comparative
 :outputs ((0.5 as (lexify conjunctive as))
	   (0.5 similarly (lexify conjunctive similarly)))
 :chooser as-similarly-chooser
 :region conjunction
 :metafunction textual
 )

(chooser 
 :name also-as-well-chooser
 :definition ((ask (also-as-well-q conjunctive)
		   (also (choose also))
		   (as-well (choose as-well))))
 :date "96Apr16"
 )

(chooser 
 :name but-however-chooser
 :definition ((ask (but-however-q conjunctive)
		   (but (choose but))
		   (however (choose however))))
 :date "96Apr16"
 )

(chooser 
 :name as-similarly-chooser
 :definition ((ask (as-similarly-q conjunctive)
		   (as (choose as))
		   (similarly (choose similarly))))
 :date "96Apr16"
 )

(askoperator
 :name exemplifying-q
 :domain tp
 :parameters (relation)
 :english ("Is the sentence giving an example?")
 :operatorcode trivialdefaultcode
 :parameterassociationtypes (modificationset)
 :answerset (example notexample)
 :trivialdefault notexample
 )

(askoperator
 :name also-as-well-q
 :domain tp
 :parameters (relation)
 :english ("Do you want the conjunctive to be presented as also or as well?")
 :operatorcode trivialdefaultcode
 :parameterassociationtypes (modificationset)
 :answerset (also as-well)
 :trivialdefault also
 )

(askoperator
 :name as-similarly-q
 :domain tp
 :parameters (relation)
 :english ("Do you want the conjunctive to be presented as as or similarly?")
 :operatorcode trivialdefaultcode
 :parameterassociationtypes (modificationset)
 :answerset (as similarly)
 :trivialdefault similarly
 )	   

(askoperator
 :name but-however-q
 :domain tp
 :parameters (relation)
 :english ("Do you want the conjunctive to be presented as but or however?")
 :operatorcode trivialdefaultcode
 :parameterassociationtypes (modificationset)
 :answerset (but however)
 :trivialdefault however
 )

;;; new lex item

(LEXICAL-ITEM
 :NAME                   AS-WELL
 :SPELLING               "as well"
 :SAMPLE-SENTENCE        "she danced; she sang also"
 :FEATURES               (NOT-SENTENCECONJUNCTION ADDITIVE CONJUNCTIVE
			  NOT-PUNCTUATION NOT-SUBORDINATOR LINKER)
 )

;;; redefine SPL macro definition from 
;;; ~nlu/KPML-1.0/R3-beta-9/ENGLISH/basic-spl-macros.lisp

(defspl-macro :conjunctive
	      ((also
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q notcontrastive
		 :similarity-q notsimilarity
		 :correction-q notcorrection
		 :disjunctive-q notdisjunctive)
	       (alternatively
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q contrastive)
	       (as
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q notcontrastive
		 :similarity-q similarity
		 :as-similarly-q as)
	       (as-well
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q notcontrastive
		 :similarity-q notsimilarity
		 :correction-q notcorrection
		 :disjunctive-q notdisjunctive
		 :also-as-well-q as-well)
	       (before
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q notsequence
		 :presentation-q notpresentational
		 :time-relation-q timerelation
		 :time-precedence-q precedence
		 :time-precede-q notsubsequent
		 :time-separation-q immediate) 
	       (besides
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q notcontrastive
		 :similarity-q notsimilarity
		 :correction-q correction)
	       (but 
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q notjoint
		 :but-however-q but
		 :presentational-relation-q notpresentational
		 :hypothesis-opposition-q hypothesisopposition)
	       (for-example
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :exemplifying-q example)
	       (further
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q sequence
		 :absolute-position-q notabsolute
		 :relative-position-q immediate)
	       (generally
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q notjoint
		 :presentational-relation-q presentational
		 :reexpression-q notreexpression
		 :abstraction-q abstraction
		 :generalization-direction-q generalization)
	       (however
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q notjoint
		 :presentational-relation-q notpresentational
		 :hypothesis-opposition-q hypothesisopposition)
	       (immediately
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q notsequence
		 :presentation-q notpresentational
		 :time-relation-q timerelation
		 :time-precedence-q precedence
		 :time-precede-q subsequent
		 :time-separation-q immediate)
	       (in-fact
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q notjoint
		 :presentational-relation-q presentational
		 :reexpression-q reexpression)
	       (in-particular
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q notjoint
		 :presentational-relation-q presentational
		 :reexpression-q notreexpression
		 :abstraction-q abstraction
		 :generalization-direction-q example)
	       (joint-however
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q notcontrastive
		 :similarity-q notsimilarity
		 :correction-q notcorrection
		 :disjunctive-q disjunctive)
	       (previously
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q notsequence
		 :presentation-q notpresentational
		 :time-relation-q timerelation
		 :time-precedence-q precedence
		 :time-precede-q notsubsequent
		 :time-separation-q separate
		 :small-separation-q small
		 :tense past)
	       (secondly
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q sequence
		 :absolute-position-q absolute
		 :extremal-position-q notextremal)
	       (similarly
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q notprocessregulated
		 :joint-regard-q joint
		 :contrastive-q notcontrastive
		 :similarity-q similarity)
	       (simultaneously
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q notsequence
		 :presentation-q notpresentational
		 :time-relation-q timerelation
		 :time-precedence-q noprecedence)
	       (spatial-besides
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q notsequence
		 :presentation notpresentational
		 :time-relation-q nottimerelation
		 :spatial-relation-q spacerelation)	       
	       (then
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q notsequence
		 :presentation-q notpresentational
		 :time-relation-q timerelation
		 :time-precedence-q precedence
		 :time-precede-q subsequent
		 :time-separation-q separate
		 :small-separation-q notsmall)
	       (therefore
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q necessity)
	       (ultimately
		 :conjunctive-relation-q conjunctive
		 :conjunctive-relation-id (?rr / rhetorical-relation)
		 :process-regulated-q processregulated
		 :necessity-q nonecessity
		 :sequence-q sequence
		 :absolute-position-q absolute
		 :extremal-position-q extremal)
	       ))

;;; Don't want comma before "as".
;;; Probably a better way to do this.

(setf (second (second *post-punctuation*))
  (append (second (second *post-punctuation*))
	  '((AS CONJUNCTIVE ""))))