next up previous contents index
Next: Helpful Hints Up: The Built-In Knowledge-Base Previous: Fundamental Objects and Relations

Knowledge of Common Things

Distinct from the fundamental ontology of the knowledge base, Algernon has knowledge of a few common everyday objects and relations, mostly added to make our examples work.

Notice that there is no problem with declaring the same objects or relationship twice, if the information is compatible and name references are unambiguous.

          (:taxonomy (things
                        (colors black white red blue green
                                yellow brown orange purple)
                        (genders male female :complete))

The slots relating these objects are the following.

          (:slot color (physical-objects colors)
                   :cardinality 1
                   :comment "(color x c) = The color of x is c.")

          (:slot gender (physical-objects genders)
                   :cardinality 1
                   :comment "(gender x g) = The gender of x is g.")
          (:slot spouse (people people)
                   :cardinality 1
                   :backlink spouse
                   :comment "(spouse a b) = The spouse of a is b.")

          (:slot wife (people people)
                   :cardinality 1
                   :backlink spouse
                   :comment "(wife a b) = The wife of a is b.")

          (:slot husband (people people)
                   :cardinality 1
                   :inverse wife
                   :comment "(husband a b) = The husband of a is b.")

          (:slot friend (people people)
                   :comment "(friend a b) = A friend of a is b.")

          ;; Husband and wife also imply genders:
          (:rules people
           ((wife ?x ?p1) -> (gender ?p1 female)))
          (:rules people
           ((husband ?x ?p1) -> (gender ?p1 male)))

          (:slot super-context (contexts contexts)
                   :comment "(super-context c1 c2) = A super-context of c1 is c2.")

          (:slot sub-context  (contexts contexts)
                   :inverse super-context
                   :comment "(sub-context c1 c2) = A sub-context of c1 is c2.")

          (:slot current (contexts contexts)
                   :cardinality 1
                   :backlink super-context
                   :comment "(current c1 c2) = The current sub-context of c1 is c2.")

          (:slot speaker (contexts people)
                   :cardinality 1
                   :comment "(speaker c s) = The speaker in c is s.")

          (:slot recent (contexts objects)
                   :comment "(recent c r) = A recently mentioned thing in c is r.")

Micheal S. Hewett
Tue Oct 29 11:28:38 CST 1996