;;; File: new-comparisons.lisp
;;; Last saved in emacs: Time-stamp: <95/08/02 10:37:06 williams>
;;; Susan Williams, August 1, 1995 (at FAW)

;;; This file contains a new upper-model concept,
;;; SIMILARITY-COMPARISON, which is similar to GREATER-THAN-COMPARISON
;;; and LESS-THAN-COMPARISON, but produces the phrase "as <x> as..."

(in-package :penman)

(penman-kb::defreified-relation Similarity-Comparison
  :is (:and penman-kb::Scaled-Comparison :primitive))

(penman::annotate-concept SIMILARITY-COMPARISON
  :doc-strings
  ("The scaled comparison that compares by stating that a quality holds about the same."))

;;; This fixes what I feel is a long-standing bug in the
;;; greater-than/less-than comparisons. WW - July 18, 1995
(defun Exceed-Q-Code (one two)
  "Depends on the kind of parent relation."
  (if (or (eq (term-graph-type (symbol-value one)) 'greater-than-comparison)
	  (eq (term-graph-type (symbol-value two)) 'less-than-comparison))
      'exceed
    'nonexceed))

(defvar sample-similarity-comparison-spl
 '(compare / similarity-comparison
	   :tense present
	   :domain (computer / object
			     :lex computer
			     :determiner the)
	   :standard (p / person
			:lex person
			:determiner a)
	   :range (eff / behavioral-quality
		       :lex efficient)))
;;; "The computer is as efficient as a person."
