;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: Penman -*-
;;;; Time-stamp: <96/07/16 19:04:23 jlitchfi>

;;;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;;;;
;;;;       File:  new-macros.lisp
;;;;     Author:  Bruce Jakeway
;;;;       Date:  1995 January
;;;;
;;;;    Project:  HealthDoc
;;;; Supervisor:  Chrysanne DiMarco
;;;;
;;;; PURPOSE
;;;; -------
;;;; This file adds macro values to existing macros.  It also adds new macros.
;;;;
;;;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;COPYRIGHT (C) UNIVERSITY OF SOUTHERN CALIFORNIA, 1987                         ;
;UNIVERSITY OF SOUTHERN CALIFORNIA, INFORMATION SCIENCES INSTITUTE             ;
;4676 ADMIRALTY WAY                                                            ;
;MARINA DEL REY, CALIFORNIA 90292                                              ;
;                                                                              ;
;THIS SOFTWARE WAS PARTIALLY DEVELOPED UNDER NATIONAL SCIENCE FOUNDATION       ;
;GRANT IST-8408726, FEDERAL CONTRACT NUMBERS MDA903-81-C-0335,                 ;
;MDA903-87-C-0641, F49620-84-C-0100, AND F49620-87-C-0005, AND THE             ;
;GOVERNMENT HOLDS LICENSE RIGHTS UNDER DAR 7-104.9 (A)(C)(1).  IT IS           ;
;TRANSMITTED OUTSIDE OF THE UNIVERSITY OF SOUTHERN CALIFORNIA ONLY UNDER       ;
;WRITTEN LICENSE AGREEMENTS OR SOFTWARE EXCHANGE AGREEMENTS, AND ITS USE       ;
;IS LIMITED BY THESE AGREEMENTS.  AT NO TIME SHALL ANY RECIPIENT USE THIS      ;
;SOFTWARE IN ANY MANNER WHICH CONFLICTS OR INTERFERES WITH THE                 ;
;GOVERNMENTAL LICENSE RIGHTS OR OTHER PROVISIONS OF THE GOVERNING              ;
;AGREEMENT UNDER WHICH IT IS OBTAINED.  IT IS SUPPLIED "AS IS," WITHOUT        ;
;ANY WARRANTIES OF ANY KIND.  IT IS FURNISHED ONLY ON THE BASIS THAT ANY       ;
;PARTY WHO RECEIVES IT INDEMNIFIES AND HOLDS HARMLESS THE PARTIES WHO          ;
;FURNISH AND ORIGINATE IT AGAINST ANY CLAIMS, DEMANDS OR LIABILITIES           ;
;CONNECTED WITH USING IT, FURNISHING IT TO OTHERS OR PROVIDING IT TO A         ;
;THIRD PARTY.  THIS NOTICE MUST NOT BE REMOVED FROM THE SOFTWARE, AND IN       ;
;THE EVENT THAT THE SOFTWARE IS DIVIDED, IT SHOULD BE ATTACHED TO EVERY        ;
;PART.                                                                         ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(in-package :penman)

(defspl-macro :determiner
  ((a
    :identifiability-q  notidentifiable
    :multiplicity-q     unitary
    :amount-attention-q minimalattention)
   ; a/some added 95Jan28 11:33:00 by Bruce Jakeway.
   ; This macro value is meant to blur the distinction between singular and
   ;   plural so that the object number decides which of these to choose.
   (a/some :deictic-quantity-q lowquantity)
   (all 
    :identifiability-q  notidentifiable  ;; added by Jon Litchfield 13/05/96
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :set-totality-q (?s1 ?s2) total
    ;; shouldn't be multiple - Jon 16/07/96
    ;; :multiplicity-q multiple
    :singularity-q nonsingular
    :set-totality-individuality-q collection
    :amount-attention-q nonminimalattention)
   (another
    :identifiability-q  notidentifiable
    :multiplicity-q     unitary
    :amount-attention-q minimalattention
    :identicality-comparison-modification-q comparison)
   (any 
    :identifiability-q notidentifiable
    :amount-attention-q nonminimalattention)
   (both
    :number plural  ; This line added by Susan Williams, June 2, 1995.
                    ; This ensures adding both gives a plural verb.
    :set-totality-q total
    :set-totality-polarity-q positive
    :duality-q dual)
   (each 
	:identifiability-q notidentifiable ; added by Jon 07/96
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :set-totality-q (?s1 ?s2) total
    :multiplicity-q unitary
    :singularity-q singular
    :set-totality-individuality-q individual
    :amount-attention-q nonminimalattention)
   (every 
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :set-totality-q (?s1 ?s2) total
    :multiplicity-q unitary
    :singularity-q singular
    :set-totality-individuality-q collection
    :amount-attention-q nonminimalattention)
   ; either added 95Jan27 15:13:30 by Bruce Jakeway
   (either
    :set-totality-q total
    :set-totality-polarity-q negative
    :full-negative-q notfull
    :amount-attention-q minimalattention
    :presuppose-existence-q notpresupposed
    :duality-q dual)
   (much 
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :set-totality-q (?s1 ?s2) partial
    :multiplicity-q unitary
    :singularity-q nonsingular
    :high-quantity-q high
    :amount-attention-q minimalattention
    :diminished-q diminished)
   ; neither added 95Jan27 15:13:30 by Bruce Jakeway
   (neither
    :set-totality-q total
    :set-totality-polarity-q negative
    :full-negative-q full
    :amount-attention-q minimalattention
    :presuppose-existence-q notpresupposed
    :duality-q dual)
   (no
    :set-totality-q total
    :set-totality-polarity-q negative
    :full-negative-q full
    :duality-q nondual)
   (one
    :amount-attention-q nonminimalattention
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :presuppose-existence-q presupposed
    :selection-particularity-q particular
    :set-totality-q (?s1 ?s2) partial)
   (some 
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :set-totality-q (?s1 ?s2) partial
    :singularity-q nonsingular
    :deictic-quantity-q lowquantity
    :amount-attention-q minimalattention)
   (the
    :identifiability-q  identifiable
    :amount-attention-q nonminimalattention)
   (that
    :identifiability-q  identifiable
    :proximity-modification-q proximity
    :proximity-mod-id (hearer / person
			      :distance-q distant))
   (that/those  ; plural added 95Jul11 10:45 by Bruce Jakeway
    :identifiability-q  identifiable
    :proximity-modification-q proximity
    :proximity-mod-id (hearer / person
			      :distance-q distant))
   (this
    :identifiability-q  identifiable
    :proximity-modification-q proximity
    :proximity-mod-id (speaker / person
			       :distance-q nondistant))
   (this/these  ; plural added by 95Jul11 10:45 Bruce Jakeway
    :identifiability-q  identifiable
    :proximity-modification-q proximity
    :proximity-mod-id (speaker / person
			       :distance-q nondistant))
   (zero
    :identifiability-q notidentifiable
    :current-representative-id ?s1
    :potential-representative-id ?s2
    :set-totality-q (?s1 ?s2) partial
    :singularity-q nonsingular
    :deictic-quantity-q noquantity
    :amount-attention-q minimalattention)))


;  This macro added by Susan Williams, July 11, 1995.
;  This macro is used to instensify adjectives with other adjectives.
(defspl-macro :intensified-by
  ((?
    :intensify-adjective-q intensified
    :intensifier-ID ?)))


; The negations are redefined to work properly with RST statements.
(defspl-macro :modality
  ((can
    :modality-q modal
    :modality-id (?m / (nonconditional ability)))
   (cant
    :modality-q modal
    :modality-id (?m / (nonconditional ability)
		     :modality-polarity negative))
   (could
    :modality-q modal
    :modality-id (?m / (conditional ability)))
   (couldnt
    :modality-q modal
    :modality-id (?m / (conditional ability)
		     :modality-polarity negative))
   (may 
    :modality-q modal
    :modality-id (?m / (nonconditional general-possibility)))
   ; maynt added 95Jul19 15:00 by Bruce Jakeway.
   ; This macro value is meant to produce the negative of may.
   (maynt
    :modality-q modal
    :modality-id (?m / (nonconditional general-possibility)
		     :modality-polarity negative))
   (might 
    :modality-q modal
    :modality-id (?m / (conditional general-possibility)))
   ; migntnt added 95Jul19 15:00 by Bruce Jakeway.
   ; This macro value is meant to produce the negative of might.
   (mightnt 
    :modality-q modal
    :modality-id (?m / (conditional general-possibility)
		     :modality-polarity negative))
   (must
    :modality-q modal
    :modality-id (?m / (nonconditional necessity)))
   (neednt
    :modality-q modal
    :modality-id (?m / (nonconditional necessity)
		     :modality-polarity negative))
   (should
    :modality-q modal
    :modality-id (?m / (conditional necessity)))
   (shouldnt
    :modality-q modal
    :modality-id (?m / (conditional necessity)
		     :modality-polarity negative))
   (will
    :modality-q modal
    :modality-id (?m / (nonconditional volitional)))
   (wont
    :modality-q modal
    :modality-id (?m / (nonconditional volitional)
		     :modality-polarity negative))
   (would
    :modality-q modal
    :modality-id (?m / (conditional volitional)))
   (wouldnt
    :modality-q modal
    :modality-id (?m / (conditional volitional)
		     :modality-polarity negative))))


(defspl-macro :scaling
    ((more   :scalability-q scalable
	     :scaling-q scaled
	     :proper-subset-q proper
	     :exceed-q exceed)
     (most   :scalability-q scalable
	     :scaling-q scaled
	     :proper-subset-q nonproper)
     (less   :scalability-q scalable 
	     :scaling-q scaled
	     :item-value-id ?item
	     :standard-id ?standard
	     :standard-mention-q withhold
	     :exceed-q (?item ?standard) nonexceed
	     :exceed-q (?standard ?item) exceed)
     (as     :scalability-q scalable 
	     :scaling-q scaled
	     :exceed-q nonexceed)
     (enough :scalability-q scalable 
	     :scaling-q scaled
	     :proper-subset-q proper
	     :threshhold-value-q threshholdvalue
	     :maximum-q nonmaximum)
     ; so added 95Aug1 21:15 by Bruce Jakeway.
     (so     :scaling-q scaled
	     :process-q process
	     :maximum-q nonmaximum
	     :marked-property-q marked)
     (too    :scalability-q scalable 
	     :scaling-q scaled
	     :proper-subset-q proper
	     :threshhold-value-q threshholdvalue
	     :maximum-q maximum)))

; Nigel doesn't allow the pronouns "I", "we", "you", and "you-pl" to work
;   properly.
(defspl-macro :pronoun
  ((he 
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :gender-q male
    :identifiability-q identifiable)
#|
   ; I added 95Aug4 by Bruce Jakeway and John Wilkinson
   (i
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :identifiability-q identifiable
    :member-set-q included)
|#
   (it 
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :gender-q neutral
    :identifiability-q identifiable)
   (that 
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :proximity-modification-q proximity
    :proximity-mod-id ?prox
    :distance-q distant
    :identifiability-q identifiable)
   (those  ;; added by Jon 19/05/96
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q multiple
    :singularity-q nonsingular
    :proximity-modification-q proximity
    :proximity-mod-id ?prox
    :distance-q distant
    :identifiability-q identifiable)
   (this 
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :proximity-modification-q proximity
    :proximity-mod-id ?prox
    :distance-q nondistant
    :identifiability-q identifiable)
   (these  ;; added by Jon 19/05/96
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q multiple
    :singularity-q nonsingular
    :proximity-modification-q proximity
    :proximity-mod-id ?prox
    :distance-q nondistant
    :identifiability-q identifiable)
   (she 
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :gender-q female
    :identifiability-q identifiable)
   (they 
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q multiple
    :singularity-q nonsingular
    :identifiability-q identifiable)
#|
   ; we added 95Aug4 by Bruce Jakeway and John Wilkinson
   (we
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q multiple
    :singularity-q nonsingular
    :identifiability-q identifiable
    :member-set-q included)
   ; you added 95Aug4 by Bruce Jakeway and John Wilkinson
   (you
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q unitary
    :singularity-q singular
    :identifiability-q identifiable
    :member-set-q notincluded
    :member-set-qq included)
   ; you-pl added 95Aug4 by Bruce Jakeway and John Wilkinson
   (you-pl
    :empty-number-q empty
    :empty-gender-multiplicity-q empty
    :multiplicity-q multiple
    :singularity-q nonsingular
    :identifiability-q identifiable
    :member-set-q notincluded
    :member-set-qq included)
|#
   ))
