Ontological examples


This file illustrates how to represent various kinds of objects: time, space, physical entities, states, processes, descriptions, characteristics, etc. Depending on the nature of the object you want to represent (or search), different kinds of relations may or may not be used. For example, if you are thinking about a certain "illustration" that is a process, you have to find or create a type that is subtype of pm#process in order to be able to express who is doing the action, what is the result, when does it occurs, what are its purpose and consequences, etc. On the other hand, if the "illustration" you are thinking about is the result of a descriptive process, you have to find or create a type that is subtype of pm#description in order to describe its content, the document that it is written in, etc. Using "relations from processes" on an object that is not a process has no meaning. The signatures associated to relation types prevent such misuse. As a rule of thumb, if you hesitate about how to represent what you have in mind, use processes since they permit representations that are more detailed / extendible / re-usable / comparable.
In the examples below, we use our top-level ontology of about 150 basic relations types (click here for an indented list).

You can make WebKB-2 load this file and execute the commands in it, by entering the command
  run http://www.webkb.org/doc/webkb2OntologicalExamples.html;
in the "Add, remove or search statements" tool or simply click here.
Commands are in the courier font. They are enclosed within the XHTML marks <KR> and </KR> to permit WebKB-2 to distinguish them from regular text.



Table of contents

  1. States and processes, thematic/temporal relations
  2. Descriptions and indexations
  3. Characteristics/attributes and measures
  4. Temporal entities/relations
  5. Spatial entities/relations



1.  States and processes, thematic/temporal relations

user u; //the commands below are done in the name of the user "u"
b012NoStorage:= 1; //no need to store the representations in the KB
noRedundancyWarning:= false; 

The following example illustrates relations from situations (i.e. states or processes). It represents the fact that:
On the 21/01/2001, and during 2 hours, I (spamOnly@phmartin.info) modified this file in order to improve it. I used an Emacs text editor. The modification was permitted by the fact that I had writing permissions on this file. During this modification, I added examples to this file (a co-temporal process was to design the examples; another process was to test them; ...).


[an #alteration,
   agent: spamOnly@phmartin.info,
   modified_object: http://www.webkb.org/doc/webkb2OntologicalExamples.html,
   precondition: (a #permit, beneficiary: spamOnly@phmartin.info,
                   object: [any #alteration, modified_object: http://www.webkb.org/doc/webkb2OntologicalExamples.html]),
   instrument: an Emacs_text_editor,
   sub_process of: (an #augmentation, agent: spamOnly@phmartin.info,
                      modified_object: http://www.webkb.org/doc/webkb2OntologicalExamples.html,
                      material: several #example),
   purpose: (an #improvement, agent: spamOnly@phmartin.info,
               modified_object: http://www.webkb.org/doc/webkb2OntologicalExamples.html),
   time: 21/01/2001,
   duration: 2 hrs];



2.  Descriptions and indexations

The following example shows how any part of any Web-accessible document can be represented / indexed. Here, to make things more interesting, the represented sentence is itself a kind of document represention / indexation:
This file illustrates how to represent various kinds of objects
We have not represented it litterally (the "various kinds of objects" part is a difficult one), we have given a partial description (but still a description). If this statement was stored in the knowledge base and printed by WebKB-2 with hyperlinked categories, you could click on the string part to go to (a copy of) this document with the string highligted in fuschia.

["This file illustrates how to represent various kinds of objects",
    part of: http://www.webkb.org/doc/webkb2OntologicalExamples.html,
    descr: [http://www.webkb.org/doc/webkb2OntologicalExamples.html,
              descr_container of: 
                (some pm#description, result of:
                    (an exemplification, object: some pm#knowledge_representation))]];



3.  Characteristics/attributes and measures

WordNet includes a lot of categories for representing attributes, e.g. #height for the "natural height of a person or animal in an upright position". An explicit way to represent attributes and their measures would be to write a graph such as
[spamOnly@phmartin.info, attribute: (a #height, measure: 1.78 m)] .
However, most people prefer to write:  [spamOnly@phmartin.info, #height: 1.78 meters)].
WebKB-2 accepts it but is not yet capable of recognizing that the two forms are equivalent. We therefore advise to avoid the first form. Click here for a more detailed discussion of how and why some WordNet types may be used as relation types and click here to read how and why you should avoid adjectives as names for attribute categories.

[spamOnly@phmartin.info, #height: 1.78 m, body_weight: 75 kg];


Below is an example of measure comparison. The represented sentence is:
"most leopards can run faster than any rabbit can".

[most leopards, able to be agent of: (some #running, attribute: (a velocity
         >= (the velocity, attribute of: (some #running, able to agent: any rabbit))))];



4.  Temporal entities/relations

We have seen two relations from situations to temporal entities: time and duration. Temporal entities may also be connected together as in the following graph which states that this document has been created before 21/01/2001. Alternatively, a relation of type pm#before_time could have been used for directly connecting the concept of type #creation to the date. Date constants may be written using the format DD/MM/YYYY or, for a year, an integer. Time constants (within a day) may be written using the format HH:MM:SS.

[http://www.webkb.org/doc/webkb2OntologicalExamples.html,
    object of: (a #creation, time: (a #date, pm#before: 21/01/2001 23:59:59))];



5.  Spatial entities/relations

Here are two examples about spatial relations. In the first, the relations are from a spatial entity ("most computers are on a table in a room"). In the second, the relations are from a process ("On the 24/07/2000, I travelled from France to Australia via London and Singapore").

[most electronic_computers, on: a #table, in: a room];

[a #travel, agent: spamOnly@phmartin.info,
            from_place: #France, to_place: #Australia,
            via_place: {#London, #Singapore}, time: 24/07/2000];