Motivation Dynamically identify and understand information sources Provide interoperability between agents in a semantic manner Enable distributed extensible network of ontologies Current tools such as HTML, XML not sufficient to express semantics, relationships between classes
DAML+OIL RDF DAML+OIL ontology is a set of RDF statements – Ontology can actually include arbitrary RDF statements RDF schema uses XML syntax, but could theoretically use any other syntax
XML Makes use of tags just like HTML, but arbitrary with inside it and and an d... Tags can be defined semantically in a DTD
RDF RDF document is a collection of assertions in subject verb object (SVO) form Within the obligatory RDF declaration (typically a tag that begins something like <rdf:RDF...), each topmost element is the subject of a sentence. The next level of enclosed elements represent verb/object pairs for this sentence: Male is a subclass of Animal.
Female is a subclass of Animal AND Female is disjoint from Male. The single subject -- Female -- is used to begin each of the verb-object assertions and
Basic RDF object types Resources –All things being described by RDF expressions –Identified by URI plus optional anchor id –E.g., Properties –A specific aspect, characteristic, attribute, or relation used to describe a resource –has a specific meaning, defines its permitted values, the types of resources it can describe, and its relationship with other properties
Basic RDF object types cont. Statements –A specific resource together with a named property plus the value of that property for that resource is an RDF statement –Called the subject, the predicate, and the object –property value can be another resource or it can be a literal(string or other primitive data type) –
Simple Example Ora Lassila is the creator of the resource Ora Lassila
Simple Example cont.1 Now, consider the case that we want to say something more about the characteristics of the creator of this resource. In prose, such a sentence would be: The individual whose name is Ora Lassila, , is the creator of The intention of this sentence is to make the value of the Creator property a structured entity. In RDF such an entity is represented as another resource. The sentence above does not give a name to that resource; it is anonymous, so in the diagram below we represent it with an empty oval:
Simple Example cont.2 The structured entity of the previous example can also be assigned a unique identifier. To continue the example, imagine that an employee id is used as the unique identifier for a "person" resource. The URIs that serve as the unique keys for each employee (as defined by the organization) might then be something like Now we can write the two sentences: The individual referred to by employee id is named Ora Lassila and has the address The resource was created by this individual.
Abbreviated Syntax Form 1 Usable for properties that are not repeated within a description and where the values of those properties are literals the properties may be written as XML attributes Side effect: might be viewed differently in browser
Abbreviated Syntax Form 2 Works for nested Description elements Ora Lassila equal to
Abbreviated Syntax Form 3 description element containing a type property Ora Lassila equal to Ora Lassila
Basic Serialization Syntax Basic RDF serialization syntax takes the form: [1] RDF ::= [' '] description* [' '] [2] description ::= ' ' propertyElt* ' ' [3] idAboutAttr ::= idAttr | aboutAttr [4] aboutAttr ::= 'about="' URI-reference '"' [5] idAttr ::= 'ID="' IDsymbol '"' [6] propertyElt ::= ' ' value ' ' | ' ' [7] propName ::= Qname [8] value ::= description | string [9] resourceAttr ::= 'resource="' URI-reference '"' [10] Qname ::= [ NSprefix ':' ] name [11] URI-reference ::= string, interpreted per [URI]URI [12] IDsymbol ::= (any legal XML name symbol)XML name symbol [13] name ::= (any legal XML name symbol) [14] NSprefix ::= (any legal XML namespace prefix)XML namespace prefix [15] string ::= (any XML text, with " ", and "&" escaped)
RDF/XML Ora Lassila is the creator of the resource is represented in RDF/XML as: Ora Lassila
RDF schema Different from XML DTD: syntax vs. semantics Defines Class, Property, subClassOf, subPropertyOf, domain, range, and some others
Why RDF Is Not Enough Only range/domain constraints on properties (need others) No properties of properties (unique, transitive, inverse, etc.) No equivalence, disjointness, etc. No necessary and sufficient conditions (for class membership) No defined semantics
DAML basics Setting up the namespaces <rdf:RDF xmlns:rdf = syntax-ns# syntax-ns# xmlns:rdfs= schema# schema# xmlns:daml= +oil# +oil# xmlns =“ ex#”
DAML basics cont.1 Assert an ontology $Id: daml+oil-ex.daml,v /01/11 20:33:52 mdean Exp $ An example ontology
DAML basics cont.2 Define classes Animal This class of animals is illustrative of a number of ontological idioms.
DAML basics cont.3 Define classes
DAML basics cont.4 Define properties
DAML basics cont.5 Define restrictions scope difference
DAML basics cont.6 About tag Animals have exactly two parents, ie: If x is an animal, then it has exactly 2 parents (but it is NOT the case that anything that has 2 parents is an animal).
DAML basics cont.7 Max, min cardinality (min default=0)
DAML basics cont.8 UniqueProperty (cardinality=1), Transitive hasAncestor
DAML basics cont.9 one of
DAML basics cont.10 hasValue, intersectionOf
DAML basics cont.11 instances Adam Adam is a person.