;;; Reduced relative clauses 
;;; Time-stamp: <97/01/22 19:48:33 jlitchfi>

(in-package :penman)


;;;
;;; system, chooser, inquiry to determine if beaux is to be ellided.
;;;

(system                  
 :name                   lexify-beaux
 :inputs                 passive-process
 :outputs                ((0.5 beaux)
			  (0.5 beaux-zero (lexify voice ellipsiszero)))
 :chooser                lexify-beaux-chooser
 :region                 voice
 :metafunction           textual
 )

(chooser                 
 :name                   lexify-beaux-chooser
 :definition             ((ask (beaux-q process)
			       (beaux (choose beaux))
			       (beaux-zero (choose beaux-zero))))
 :date                   "10July96 15:15"
 )

(ASKOPERATOR
 :NAME                   beaux-q
 :DOMAIN                 KB
 :PARAMETERS             (ITEM)
 :ENGLISH                ("Is" ITEM "to be lexified as beaux or beaux-zero?")
 :OPERATORCODE           TRIVIALDEFAULTCODE
 :PARAMETERASSOCIATIONTYPES      (CONCEPT)
 :ANSWERSET              (beaux beaux-zero)
 :TRIVIALDEFAULT         beaux
 )

;;;
;;; systems, choosers, inquiries to ellide relative pronouns.
;;;

(system                  
 :name                   wh-complement-mention
 :inputs                 wh-relative-nominal
 :outputs                ((0.5 wh-mention
			       (preselect wh not-reduced))
			  (0.5 no-wh-mention
			       (preselect wh reduced)))
 :chooser                wh-complement-mention-chooser
 :region                 clausecomplex
 :metafunction           textual
 )

(chooser                 
 :name                   wh-complement-mention-chooser
 :definition             ((ask (mention-wh-q onus)
			       (mention (choose wh-mention))
			       (withhold (choose no-wh-mention))))
 :date                   "9Jul96 16:00"
 )

(ASKOPERATOR
 :NAME                   mention-wh-q
 :DOMAIN                 KB
 :PARAMETERS             (ITEM)
 :ENGLISH                ("Is" ITEM "to be mentioned?")
 :OPERATORCODE           TRIVIALDEFAULTCODE
 :PARAMETERASSOCIATIONTYPES      (CONCEPT)
 :ANSWERSET              (mention withhold)
 :TRIVIALDEFAULT         mention
 )		 

(system                  
 :name                   reduced-relative
 :inputs                 relative-nominal
 :outputs                ((0.5 reduced)
			  (0.5 not-reduced))
 :chooser                reduced-relative-chooser
 :metafunction           textual
 )

(chooser 
 :name                   reduced-relative-chooser
 :definition             ((defaultchoose not-reduced))
 :date                   "10July96 15:15"
 )

(SYSTEM
 :NAME                   RELATIVE-PRONOUN-TYPE-I
 :INPUTS                 (and NONPERSONAL-RELATIVE not-reduced)
 :OUTPUTS                ((0.25 RELATIVE-THAT
				(LEXIFY THING THATRELATIVE))
			  (0.25 RELATIVE-WHICH 
				(LEXIFY THING WHICH))
			  (0.25 ANTECEDENTLESS-RELATIVE
			       (LEXIFY THING WHAT)))
 :CHOOSER                RELATIVE-PRONOUN-TYPE-I-CHOOOSER
 :REGION                 PRONOUN
 :METAFUNCTION           TEXTUAL
 )

(CHOOSER
 :NAME                   RELATIVE-PRONOUN-TYPE-I-CHOOOSER
 :DEFINITION             ((ASK (ANTECEDENT-Q THING)
			       (ANTECEDENT
				(ASK (RELATIVE-PRONOUN-SELECTION-Q THING)
				     (THAT (CHOOSE RELATIVE-THAT))
				     (WHICH (CHOOSE RELATIVE-WHICH))))
			       (NOANTECEDENT
				(CHOOSE ANTECEDENTLESS-RELATIVE)))
			  (* LP " 9-Nov-86 18:03:41"))
:DATE                   "8-4-1992 15:56:4 at IPSI."
 )

(gate
 :NAME                   RELATIVE-WHO
 :INPUTS                 (AND (OR PERSONAL-RELATIVE PERSONAL-QUESTIONING)
			      NOMINATIVE)
 :OUTPUTS                ((1.0 RELATIVE-WHO (LEXIFY THING WHO)))
 :REGION                 PRONOUN
 :METAFUNCTION           UNIFYING
 )

(gate
 :NAME                   lexify-reduced-pronominal-relative
 :INPUTS                 (and (or nonpersonal-relative
				  personal-relative)
			      reduced)
 :OUTPUTS                ((1.0 pronominal-reduced-zero
			       (lexify thing ellipsiszero)))
 :REGION                 PRONOUN
 :METAFUNCTION           UNIFYING
 )

(gate
 :NAME                   lexify-reduced-nominal-relative
 :INPUTS                 (and NOMINAL-RELATIVE reduced)
 :OUTPUTS                ((1.0 nominal-reduced-zero
			       (lexify deictic ellipsiszero)))
 :REGION                 determination
 :METAFUNCTION           UNIFYING
 )

(SYSTEM
 :NAME                   RELATIVE-DETERMINER-TYPE
 :INPUTS                 (and NOMINAL-RELATIVE not-reduced)
 :OUTPUTS                ((0.5 POSSESSIVE-RELATIVE-DETERMINER
                               (LEXIFY DEICTIC WHOSE))
			  (0.5 DEMONSTRATIVE-RELATIVE-DETERMINER
                               (LEXIFY DEICTIC WHICH)))
 :CHOOSER                RELATIVE-DETERMINER-TYPE-CHOOSER
 :REGION                 DETERMINATION
 :METAFUNCTION           INTERPERSONAL
 )

;;;
;;; macro to combine inquiries and make the SPL look pretty.
;;;

(defspl-macro :reduced
    ((? 
      :mention-wh-q withhold
      :beaux-q beaux-zero)))
    
(reset-system-network)
(set-grammar-keyword-types)