Primitive Relation Type

Cat on Mat

The following forms in CG, KIF, RDF, and IFF represent the English sentence taken from an early version of the CGIF (Conceptual Graph Interchange Format) Standard.

“A cat is on a mat.”

CG

Display Form

Linear Form

[Cat]<-(On)->[Mat]

 

Interchange Format

[Cat: *x] [Mat: *y] (On ?x ?y)

IFF

<on first=“Cat#” second=“Mat#”/>

KIF

(exists ((?x cat) (?y mat)) (On ?x ?y))

RDF with Schemas

Schema

(schema located at http://www.cg.org/example/)

<?xml version="1.0"?>

<RDF:RDF xml:lang="en"

   xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

   xmlns:RDFS="http://www.w3.org/2000/01/rdf-schema#">

  <RDFS:comment>A simple example schema.</RDFS:comment>

  <RDFS:Class ID="Entity"/>  

  <RDFS:Class ID="Cat">

    <RDFS:subClassOf resource="#Entity"/>

    <RDFS:allowedPropertyType>

      <RDF:PropertyType ID="On">

        <RDFS:comment>The preposition "On".</RDFS:comment>

        <RDFS:range resource="#Mat"/>

      </RDF:PropertyType>

    </RDFS:allowedPropertyType>

  </RDFS:Class>

  <RDFS:Class ID="Mat">  

    <RDFS:subClassOf resource="#Entity"/>

  </RDFS:Class>

</RDF:RDF>

(object: inline version)

<?xml version="1.0"?>

<RDF:RDF xml:lang="en"

  xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

  xmlns:EG="http://www.cg.org/example/">

  <RDF:Description>

    <RDF:instanceOf resource="EG#Cat"/>

    <EG:On>

      <RDF:Description>

        <RDF:instanceOf resource="EG#Mat"/>

      </RDF:Description>

    </EG:On>

  </RDF:Description>

</RDF:RDF>

(object: distributed version)

<?xml version="1.0"?>

<RDF:RDF xml:lang="en"

  xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

  xmlns:EG="http://www.cg.org/example/">

  <RDF:Description ID="y">

    <RDF:instanceOf resource="EG#Mat"/>

  </RDF:Description>

  <RDF:Description>

    <RDF:instanceOf resource="EG#Cat"/>

    <EG:On resource="#y"/>

  </RDF:Description>

</RDF:RDF>

IFF

Language

(language located at http://www.cg.org/example/)

<IFF>

  <Language id="Example" version="1.0">

    <comment>A simple example ontological language.</comment>

    <extends language="IFF" href="http://www.ontologos.org/IFF/language/"/>

    <Object name="Cat"/>  

    <Object name="Mat"/>  

    <Relation name="on">

      <comment>The preposition "On"</comment>

      <sign pos="1" name="agent"  entity="Cat"/>

      <sign pos="2" name="object" entity="Mat"/>

    </Relation>

  </Language>

</IFF>

(model: inline version)

<IFF>

  <Model language="http://www.cg.org/example/">

    <Classification kind="rel">

      <on>

        <agent><Cat#/></agent>

        <object><Mat#/></object>

      </on>

    </Classification>

  </Model>

</IFF>

(model: distributed version)

<IFF>

  <Model language="http://www.cg.org/example/">

    <Classification kind="ent">

      <Cat id="x"/>

      <Mat id="y"/>

    </Classification>

    <Classification kind="rel">

      <on src="x" tgt="y"/>

    </Classification>

  </Model>

</IFF>

 

 

between

The following forms in CG, KIF, RDF and IFF represent the English sentence taken from the current CGIF (Conceptual Graph Interchange Format) Standard.

“A person is between a rock and a hard place.”

CG

Display Form

Linear Form

[Person]<-(Betw)-

 <-1-[Rock]

 <-2-[Place]->(Attr)->[Hard]

IFF

The ontology is omitted.

<between>

  <agent><Person#/></agent>

  <object1><Rock#/></object1>

  <object2><Place id="o2"></object2>

</between>

<attribute src="o2">

  <Hard#/>

</attribute>

going to

The following forms in CG, KIF, RDF and IFF represent the English sentence taken from the current CGIF (Conceptual Graph Interchange Format) Standard.

“John is going to Boston by bus.”

CG

Display Form

Linear Form

[Go]-

(Agnt)->[Person: John]

(Dest)->[City: Boston]

(Inst)->[Bus]

Interchange Format

There are two sub-forms: direct and canonical. The canonical sub-form is more KIF-like. In the canonical, all concept nodes are moved to the front and all arcs are represented by bounded variables.

direct

canonical

[Go *x]

(Agnt ?x [Person 'John'])

(Dest ?x [City 'Boston'])

(Inst ?x [Bus])

[Go *x] [Person 'John' *y] [City 'Boston' *z] [Bus *w]

(Agnt ?x ?y) (Dest ?x ?z) (Inst ?x ?w)

KIF

(exists ((?x Go) (?y Person) (?z City) (?w Bus))

(and (Name ?y John) (Name ?z Boston)

(Agnt ?x ?y) (Dest ?x ?z) (Inst ?x ?w)))

IFF

Ontology

<Object name="Person"/>

<Object name="City"/>  

<Object name="Bus"/>  

<Relation name="go">  

  <sign pos="1" name="agent"      entity="Person"/>

  <sign pos="2" name"destination" entity="City"/>

  <sign pos="3" name="instrument" entity="Bus"/>

</Relation>

Model

There are two sub-forms: direct and distributed. The IFF inline sub-form is like the CGIF direct sub-form, and the IFF distributed sub-form is like the CGIF canonical sub-form, except that object type attributes are inline in IFF.

inline

distributed

<go>

  <agent><Person name="John"/></agent>

  <destination><City name="Boston"/></destination>

  <instrument><Bus#/></instrument>

</go>

<Person id="y" name="John"/>

<City   id="z" name="Boston"/>

<Bus    id="w"/>

<go>

  <agent       value="y"/>

  <destination value="z"/>

  <instrument  value="w"/>

</go>

 

 

                                   

é

Please send questions, comments and suggestions about this page to: Robert E. Kent rekent@ontologos.org

Copyright © 2000 TOC (The Ontology Consortium). All rights reserved. Revised: July 2000