semantic web and knowledge representation l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Semantic Web and Knowledge Representation PowerPoint Presentation
Download Presentation
Semantic Web and Knowledge Representation

Loading in 2 Seconds...

play fullscreen
1 / 74

Semantic Web and Knowledge Representation - PowerPoint PPT Presentation


  • 148 Views
  • Uploaded on

Semantic Web and Knowledge Representation . Why Semantic Web. The current web is a worldwide network a huge information repository But made for human consumption only because information cannot be processed by machines Semantic Web making web-content machine-processable

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Semantic Web and Knowledge Representation' - jolie


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
why semantic web
Why Semantic Web
  • The current web is
    • a worldwide network
    • a huge information repository
  • But
    • made for human consumption only because
    • information cannot be processed by machines
  • Semantic Web
    • making web-content machine-processable
    • turning the Internet from a huge, world-wide repository of information for human consumption into a device for distributed, automated information processing
    • has to understand semantics or ontologies
why knowledge representation
Why Knowledge Representation
  • Separate domain knowledge module from the operational module
  • Configurable knowledge module
  • Share and reuse domain knowledge
  • Analyze domain knowledge
what is ontology

A formal, explicit specification of a shared conceptualization

commonly accepted

understanding

What is ontology

unambiguous definition

of all concepts, attributes

and relationships

conceptual model

of a domain

machine-readability

what s inside an ontology
What’s inside an ontology?
  • Concepts: Classes + Class-hierarchy
    • instances
  • Properties: often also called “Roles” or “Slots”
    • labeled instance-value-pairs
  • Axioms/Relations:
    • relations between classes (disjoint, covers)
    • inheritance (multiple? defaults?)
    • restrictions on slots (type, cardinality)
    • Characteristics of slots (symm., trans., …)
  • reasoning tasks:
    • Classification: Which classes does an instance belong to?
    • Subsumption: Does a class subsume another one?
    • Consistency checking: Is there a contradiction in my axioms/instances?
why rdf
Why RDF
  • XML Schema is not enough for semantics
    • only describe Grammar, i.e. syntax of single documents
    • can not express inheritance for concepts
    • no means to express complex integrity constraints
    • in an unambigous way

The author of ‘page.html‘ is Peter Morris

<author>

<fistName>Peter</fistName>

<lastName>Morris</lastName>

<documents>

<uri>page.html</uri>

</documents>

</author>

<document href=”page.html”>

<author>Peter Morris</author>

</document>

What is the “correct” way of expressing it?

Resource Description Framework (RDF)

an infrastructure for the encoding, exchange and reuse of structured metadata

rdf idea
RDF Idea
  • RDF is intended to provide a simple way for making statements about resources
  • Resourcesobjects that are uniquely identified by an URI (Uniform Resource Identifier)
    • Anything can have a URI.
      • an entire Web page,
      • a whole collection of pages e.g. an entire Website,
      • object that is not directly accessible via the Web such as a printed book.
  • Propertyaspecific aspect, characteristic, attribute, or relation used to describe a resource has a specific meaning, defines its permitted values
    • Lives-In, CarColor, WorkFor, HasA, IncludedIn, hasAuthor…
  • Statementa specific resource together with a named property plus the value of that property for that resource. Each RDF statement can be written down as a triple(Subject, Property, Object) or a graph

Value

property

Resource

Resource

a rdf example

http://purl.org/dc/elements/1.1/creator

http://www.polleres.net/page.html

creationDate

http://purl.org/dc/elements/1.1/language

http://www.polleres.net/peter

April 1,2004

English

hasName

Peter Morris

A RDF Example

<?xml version="1.0"?>

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

xmlns:dc = “http://purl.org/dc/elements/1.1/”>

<rdf:Description rdf:about = “http://www.polleres.net/page.html”>

<dc:creator>

<rdf:Description rdf:about = “http://www.polleres.net/peter”>

<hasName>Peter Morris</hasName>

</rdf:Description>

</dc:creator>

</rdf:Description>

</rdf:RDF>

a general rdf format

<?xml version="1.0"?>

<Resource-A>

<property-A>

<Resource-B>

<property-B>

<Resource-C>

<property-C>

Value-C

</property-C>

</Resource-C>

</property-B>

</Resource-B>

</property-A>

</Resource-A>

value of

property-B

A General RDF Format

value of

property-A

Convention:

  • A capital letter to start a type (class) name
  • A lowercase letter to start a property name
blank node

http://www.w3c.org/TR/rdf-syntax-grammar

http://purl.org/dc/elements/1.1/title

http://www.example.org/terms#editor

RDF/XML Synatx Specification (Revised)

http://www.example.org/terms#fullName

http://www.example.org/terms#homePage

http://purl.org/net/dajobe

Dave Beckett

Blank Node

<?xml version="1.0"?>

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

xmlns:dc=“http://purl.org/dc/elements/1.1/”

xmlns:exterms=“http://www.example.org/terms#”>

<rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar">

<dc:title>RDF/XML Syntax Specification (Revised)</dc:title>

<exterms:editor rdf:nodeID="abc"/>

</rdf:Description>

<rdf:Description rdf:nodeID="abc">

<exterms:fullName>Dave Beckett</exterms:fullName>

<exterms:homePage rdf:resource="http://purl.org/net/dajobe/"/>

</rdf:Description>

</rdf:RDF>

typed node and rdf type

<?xml version="1.0"?>

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

xmlns:dc = “http://purl.org/dc/elements/1.1/”

xmlns:exterms="http://www.example.org/terms#“>

<rdf:Description rdf:about = “http://www.polleres.net/page.html”>

<dc:creator>

<rdf:Description rdf:about = “http://www.polleres.net/peter”>

<rdf:type rdf:resource="http://www.example.org/terms#Person"/>

<name>Peter Morris</name>

</rdf:Description>

</dc:creator>

</rdf:Description>

</rdf:RDF>

mississippi.xml

Typed Node and rdf:type

There is a Description about the resource http://www.plleres.net/peter.

This resource is an instance of the Person type (class),

This resource has the name Peter Morris .

a simpler format

<?xml version="1.0"?>

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

xmlns:dc = “http://purl.org/dc/elements/1.1/”

xmlns:exterms="http://www.example.org/terms#“>

<rdf:Description rdf:about = “http://www.polleres.net/page.html”>

<dc:creator>

<exterms:Person rdf:about =“http://www.polleres.net/peter”>

<name>Peter Morris</name>

</exterms:Person>

</dc:creator>

</rdf:Description>

</rdf:RDF>

mississippi.xml

A Simpler Format
rdf id

<?xml version="1.0"?>

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

xmlns:dc = “http://purl.org/dc/elements/1.1/”

xmlns:exterms="http://www.example.org/terms/#”

xmlns:base=“http://www.geongrid.org#”>

<rdf:Description rdf:about = “index.html”>

<dc:creator>

<exterms:Person rdf:id =“nancy”>

<name>Nancy</name>

</exterms:Person>

</dc:creator>

</rdf:Description>

</rdf:RDF>

mississippi.xml

rdf:ID

Define a new resource

http://www.geongrid.org#nancy

rdf:ID for introducing a resource

rdf:about for extending the information about a resource

rdf containers
RDF Containers
  • RDF provides 3 types of containers for a collection resources
  • rdf:Bag Unordered list of resources or literals as multiple values of a Property.
  • rdf:Sequence Sequence, ordered list of resources or literals as multiple values of Property.
  • rdf:Alt list of resources or literals that are alternatives for the (single) value of a Property.
  • Bag Example
  • The students in course 6.001 are Amy, Tim, and John

rdf:Bag

<rdf:Description about="http://.../courses/6.001">

<s:students>

<rdf:Bag>

<rdf:li resource=“http://.../students/Amy"/>

<rdf:li resource="http://.../students/Tim"/>

<rdf:li resource="http://.../students/John"/>

</rdf:Bag>

</s:students>

</rdf:Description>

rdf:type

/course/6.001

/Student/Amy

student

rdf:_1

/Student/Tim

rdf:_2

rdf:_3

/Student/John

rdf collection type
RDF Collection Type

<?xml version="1.0"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/stuff/1.0/">

<rdf:Description rdf:about="http://example.org/basket">

<ex:hasFruit rdf:parseType="Collection">

<rdf:Description rdf:about="http://example.org/banana"/>

<rdf:Description rdf:about="http://example.org/apple"/>

<rdf:Description rdf:about="http://example.org/pear"/>

</ex:hasFruit>

</rdf:Description>

</rdf:RDF>

http://www.w3.org/1999/02/22-rdf-syntax-ns#first

Resource

Collection

Collection

http://www.w3.org/1999/02/22-rdf-syntax-ns#rest

rdf schema rdfs
RDF Schema (RDFS)

Core Class

  • rdfs:Resource
  • rdfs:Literal
  • rdf:XMLLiteral
  • rdfs:Class
  • rdfs:Property
  • rdfs:DataType
  • rdfs:Container

RDFS is a simple ontology language

Name Space: http://www.w3.org/2000/01/rdf-schema

Core Property

  • rdf:type
  • rdfs:subClassOf
  • rdfs:subPropertyOf
  • rdfs:domain
  • rdfs:range
  • rdfs:label
  • rdfs:comment
rdfs example
RDFS Example

Property

Resource

Class

type

type

subClassOf

Vehicle

producedBy

Company

subClassOf

subClassOf

LandVehicle

SeaVehicle

subClassOf

subClassOf

numberOfEngine

Number

HoverVehicle

rdfs example cont
RDFS Example (cont.)

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

xmlns:rdfs = “http://www.w3.org/2000/01/rdf-schema#” >

<rdfs:Class rdf:ID=“Vehicle” >

<rdfs:subClassOf rdf:resource=“http://www.w3.org/2000/01/rdf-schema#Resource”/>

</rdfs:Class>

<rdfs:Class rdf:ID=“LandVehicle”>

<rdfs:subClassOf rdf:resource=“#Vehicle”/>

</rdfs:Class>

<rdfs:Class rdf:ID=“SeaVehicle”>

<rdfs:subClassOf rdf:resource=“#Vehicle”/>

</rdfs:Class>

<rdf:Description rdf:id=“Hovercraft”>

<rdf:type resource=“http://www.w3.org/2000/01/rdf-schema#Class”/>

<rdfs:subClassOf rdf:resource=“#LandVehicle”/>

<rdfs:subClassOf rdf:resource=“#SeaVehicle”/>

</rdf:Description>

<rdfs:Class rdf:ID=“Company” />

<rdfs:Property rdf:ID=“producedBy”>

<rdfs:domain rdf:resource=“#Vehicle” />

<rdfs:range rdf:resource=“#Company” />

</rdfs:Property>

</rdf:RDF>

rdf rdfs
RDF/RDFS

Recall from last lecture: RDF + RDFS:

  • RDF: triples for making assertions about resources
  • RDFS extends RDF with “schema vocabulary”, e.g.:
    • Class, Property
    • type, subClassOf, subPropertyOf
    • range, domain

 representing simple assertions, taxonomy + typing

Vehicle

producedBy

subClassOf

subClassOf

Company

LandVehicle

SeaVehicle

subClassOf

subClassOf

Number

Hovercraft

NumberOfEngines

limitations of rdfs
Limitations of RDFS
  • RDFS too weak to describe resources in sufficient detail:
    • No localised range and domain constraints
      • Can’t say that the range of hasChild is person when applied to persons and elephant when applied to elephants
    • No existence/cardinality constraints
      • Can’t say that all instances of person have a mother that is also a person, or that persons have exactly 2 parents
    • No transitive, inverse or symmetrical properties
      • Can’t say that isPartOf is a transitive property, that hasPart is the inverse of isPartOf or that touches is symmetrical
    • No in/equality
      • Can’t say that a class/instance is the same as some other class/instance, can’t say that some classes/instances are definitely disjoint/different.
    • No boolean algebra
      • Can’t say that that one class is the union, intersection, complement of other classes, etc.
owl rdfs relationship
OWL-RDFS Relationship
  • Both use the same data model:
  • OWL extends the vocabulary and adds axioms
  • beware of the semantics!

hasAuthor

page.html

“Dieter Fensel“

Resource(subject)

Property (predicate)

Value (object)

origins of owl

DAML

OIL

RDF

DAML+OIL

OWL

Origins of OWL
owl language overview
OWL Language - Overview
  • Three species of OWL
    • OWL DL stays in Description Logic fragment
    • OWL Lite is “easier to implement” subset of OWL DL
    • OWL Full is union of OWL syntax and RDF
  • OWL DL based on Description Logic
    • In fact it is equivalent to SHOIN(Dn) DL
  • OWL DL Benefits from many years of DL research
    • Well defined semantics
    • Formal properties well understood (complexity, decidability)
    • Known reasoning algorithms
    • Implemented systems (highly optimised)
  • OWL full has all that and all the possibilities of RDF/RDFS which destroy decidability

Full

DL

Lite

description logic family
Description Logic Family
  • DLs are a family of logic based KR formalisms
  • Particular languages mainly characterized by:
    • Set of constructors for building complex concepts and roles from simpler ones
    • Set of axioms for asserting facts about concepts, roles and individuals
  • Examples:
    • “Female persons”
      • Person ⊓ Female
    • “Non-female persons”
      • Person ⊓Female
    • “Persons that have a child”
      • Person ⊓hasChild.Person
    • “Persons all of whose children are female”
      • Person ⊓hasChild.Female
    • “Persons that are employed or self-employed”
      • Person ⊓ (Employee ⊔ SelfEmployed)
    • “Persons the have at most one father“
      • Person ⊓ ≤1.hasFather
necessary and sufficient conditions

concept ≡ definition{

concept ⊑ definition and

definition ⊑ concept

Necessary and Sufficient Conditions
  • Inclusion axioms provide necessary conditions:
    • concept ⊑ definition
  • Equivalence axioms provide necessary and sufficient conditions:
classes owl vs rdfs
Classes: OWL vs. RDFS
  • OWL allows greater expressiveness, but
  • OWL (DL/Lite) puts certain constraints on the use of RDF
    • For instance: a class may not act as an instance of another (meta)class (the same holds for properties)

 OWL has got its own Class identifier

OWL

RDFS

<rdfs:Class rdf:ID="River">

<rdfs:subClassOf rdf:resource="#Stream"/>

</rdfs:Class>

<owl:Class rdf:ID="River">

<rdfs:subClassOf rdf:resource="#Stream"/>

</owl:Class>

rdf constructs
RDF constructs

What can you express in RDF/RDFS? Not too much…

  • rdfs:subClassOf … class hierarchy, necessary conditions (also equivalence is expressible because A ⊑ B and B ⊑ A  A ≡ B)
  • rdf:type … class membership

… OWL provides more expressive constructs to express the DL features!

Employee ⊑ Person

Employee(axel)

union of classes
Union of Classes

Instances of the Union of two Classes are either the instance of one or both classes

Person ≡ Man ⊔ Woman

<owl:Class rdf:ID=“Person">

<owl:unionOf rdf:parseType="Collection">

<owl:Class rdf:about="#Woman" />

<owl:Class rdf:about="#Man" />

</owl:unionOf>

</owl:Class>

intersection of classes
Intersection of Classes

Instances of the Intersection of two Classes are simultaneously instances of both class

Man ≡ Person ⊓ Male

<owl:Class rdf:ID=“Man">

<owl:intersectionOf rdf:parseType="Collection">

<owl:Class rdf:about="#Person" />

<owl:Class rdf:about="#Male" />

</owl:intersectionOf>

</owl:Class>

oneof enumerated classes
oneOf: Enumerated Classes

Specify a class via a direct enumeration of its members:

WhineColor ≡ {White, Rose, Red}

<owl:Class rdf:ID="WineColor">

<owl:oneOf rdf:parseType="Collection">

<owl:Thing rdf:about="#White"/>

<owl:Thing rdf:about="#Rose"/>

<owl:Thing rdf:about="#Red"/>

</owl:oneOf>

</owl:Class>

necessary vs necessary sufficient conditions in owl
Necessary vs. Necessary & Sufficient Conditions in OWL
  • Necessary condition (⊑) via

rdfs:subclass

  • Necessary and sufficient (≡) either by ⊑ + ⊒ or:

owl:equivalentClasss

property restrictions
Property Restrictions
  • Defining a Class by restricting its possible instances via their property values
  • OWL distinguishes between the following two:
    • Value constraint
      • (Mother ≡ Woman ⊓hasChild.Person)
    • Cardinality constraint
      • (MotherWithManyChildren ≡ Mother ⊓ ≥3hasChild)
  • Property restrictions are local
    • RDFS allows only global properties
somevaluesfrom property restrictions
someValuesFrom Property Restrictions
  • A Mother is a Woman that has a child (some Person)

<owl:Class rdf:ID=“Mother">

<rdfs:subClassOf rdf:resource="#Woman" />

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#hasChild" />

<owl:someValuesFrom rdf:resource="#Person" />

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

Mother ⊑ Woman ⊓hasChild.Person

allvaluesfrom property restrictions
allValuesFrom Property Restrictions
  • To express the set of parents that only have female children (daughters) you would write:

<owl:Class rdf:ID=“ParentsWithOnlyDaughters">

<rdfs:subClassOf rdf:resource="#Person" />

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#hasChild" />

<owl:allValuesFrom rdf:resource="#Woman" />

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

ParentsWithOnlyDaughters ⊑ Person ⊓hasChild.Woman

hasvalue property restrictions
hasValue Property Restrictions
  • hasValue allows to define classes based on the existence of particular property values, their must be at least one matching property value

The set of all childs of the woman MARRY:

MarysChildren ⊑ Person П hasParent.{MARRY}

<owl:Class rdf:ID=“MarysChildren">

<rdfs:subClassOf rdf:resource="#Person" />

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#hasParent" />

<owl:hasValue rdf:resource="#MARRY" />

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

cardinality property restrictions
Cardinality Property Restrictions
  • Definition of cardinality: the number of occurrences,
    • maximum (maxCardinality)
    • minimum (minCardinality)
    • exact (cardinality)

HalfOrphan ⊑ Person П =1hasParent.Person

<owl:Class rdf:ID=“HalfOrphan">

<rdfs:subClassOf rdf:resource="#Person" />

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty rdf:resource="#hasParent"/>

<owl:cardinality rdf:datatype="&xsd;NonNegativeInteger">1</owl:cardinality>

</owl:Restriction>

</rdfs:subClassOf>

</owl:Class>

classes as restrictions on properties
Classes as Restrictions on Properties:

In summary:define a class using LOCAL restrictions on a specific Property

rdfs:Class

owl:Class

owl:Restriction

  • Properties:
    • allValuesFrom: rdfs:Class (lite/DL owl:Class)
    • hasValue: specific Individual
    • someValuesFrom: rdfs:Class (lite/DL owl:Class)
    • cardinality: xsd:nonNegativeInteger (in lite {0,1})
    • minCardinality: xsd:nonNegativeInteger (in lite {0,1})
    • maxCardinality: xsd:nonNegativeInteger (in lite {0,1})
properties owl vs rdf
Properties: OWL vs. RDF
  • RDF Schema provides a couple of pre defined properties:
    • rdfs:range the range of values for a property.
    • rdfs:domain associate a property with a class.
    • rdfs:subPropertyOf specialize a property.
  • OWL provides additional poperty classes, which allow reasoning and inferencing, i.e.
    • owl:functionalProperty
    • owl:transitiveProperty
    • owl:symetricProperty
properties owl vs rdf41
Properties OWL vs. RDF
  • OWL (DL and Lite) distinguishes between data typeproperties and object properties (RDFS does not)

An ObjectProperty relates one Resource to another Resource:

ObjectProperty

Resource

Resource

A DatatypeProperty relates a Resource to a Literal or an XML

Schema data type:

DatatypeProperty

Resource

Value

datatype properties example
Datatype Properties Example
  • for instance, usage of XSD datatypes:

… object properties in OWL allow for some more sophisticated definitions than only domain and range

<owl:DatatypeProperty rdf:ID="yearValue">

<rdfs:domain rdf:resource="#Car" />

<rdfs:range rdf:resource="&xsd;positiveInteger"/>

</owl:DatatypeProperty>

transitive property
Transitive Property

If person A is a ancestor of person B and B is a ancester of C then A is also an ancestor of C.

ancestor+ ancestor

<owl:TransitiveProperty rdf:ID=“ancesotor">

<rdfs:domain rdf:resource="#Person" />

<rdfs:range rdf:resource="#Person" />

</owl:ObjectProperty>

symmetric property
Symmetric Property

If Mary is a friend of John, then John is also a friend of Mary

friendOf- friendOf and friendOf friendOf-

<owl:SymmetricProperty rdf:ID="friendOf">

<rdfs:domain rdf:resource="#Human"/>

<rdfs:range rdf:resource="#Human"/>

</owl:SymmetricProperty>

inverse property
Inverse Property

If Mary is a child of John, then John is the Father of Mary

hasChild  hasParent-

<owl:ObjectProperty rdf:ID=“hasChild">

<owl:inverseOf rdf:resource="hasParent" />

</owl:ObjectProperty>

functional properties
Functional Properties

A functional property states that the value of range for a certain object in the domain is always the same

A child has always the same Father (biological)

Person 1hasFather

<owl:ObjectProperty rdf:ID=“hasFather">

<rdf:tyoe rdf:resource="&owl;FunctionalProperty"/>

</owl:ObjectProperty>

<owl:FunctionalProperty rdf:ID=“hasFather“ />

subsumption

A

B

Subsumption
  • The presented examples contain a number of classes and properties intended to illustrate particular aspects of reasoning in OWL.
  • We can make inferences about relationships between classes, in particular subsumption between classes

A subsumes B if any instance of B is an instance of A

a subsumption example
A Subsumption Example
  • Woman ≡ Person ⊓ Female
  • Man ≡ Person ⊓Woman
  • Mother ≡ Woman ⊓hasChild.Person
  • Father ≡ Man ⊓hasChild.Person
  • Parent ≡ Father ⊔ Mother
  • Grandmother ≡ Mother ⊓hasChild.Parent

We can further infer (though not explicitely stated):

 Grandmother ⊑ Person

Grandmother ⊑ Woman

etc.

inconsistency
Inconsistency
  • You may define Classes were no individual can fulfill its definition. Via reasoning engines such a definition can be found also in big ontologies.
    • Cow ≡ Animal ⊓ Vegetarian
    • Sheep ⊑ Animal
    • Vegetarian ≡eats  Animal
    • MadCow ≡ Cow ⊓eats.Sheep
open close world assumption
Open/Close World Assumption

Close World Assumption

  • The fact in the ontology describe completely what I know, all that is not in the ontology is assumed to be false..

Open World Assumption (used in OWL)

  • There are something not described by the ontology

An ontology says:

There is a train at 14:00

There is a train at 15:00

Is there a train at 17:00?

no by Close World Assumption

unknown by Open World Assumption

no unique name assumption
No Unique Name Assumption

A Child has two parents, but Marry hasParents {John Doe, Lissa Doe, Lissa Minelly}

family:Marry rdf:type family:person.

family:Marry ex:hasParent family:JohnDoe.

family:Marry ex:hasParent family:LissaDoe.

family:Marry ex:hasParent family:LissaMinelly.

family:person ⊑ 2 hasParent.T

There is no unique name assumption, this means that JohnDoe, LissaDoe and LissaMinelly are not necessarily different objects.

Three possible options from the above example::

family:LissaDoe = family:LissaMinelly

family:JohnDoe = family:LissaMinelly

family:JohnDoe = family:LissaMinelly

If we add facts and axioms that

JohnDoe is male

LissaMinelly and LissaDoe are female

female are disjoint from male

then

family:LissaDoe = family:LissaMinelly.

owl layers lite dl full

OWL Light

    • (sub)classes, individuals
    • (sub)properties, domain, range
    • intersection
    • (in)equality
    • cardinality 0/1
    • datatypes
    • inverse, transitive, symmetric
    • hasValue
    • someValuesFrom
    • allValuesFrom

RDF Schema

  • OWL Full
    • Allow meta-classes etc
  • OWL DL
    • Negation (disjointWith, complementOf)
    • unionOf
    • Full Cardinality
    • Enumerated types (oneOf)
OWL Layers (Lite, DL, Full)

Full

DL

Lite

* This slide taken from Frank van Harmelen

things owl doesn t do
Things OWL Doesn’t Do
  • default values
  • closed world option
  • arithmetic
  • string operations
  • involved axioms on axiom values, such as functional
  • dependencies
  • partial imports
  • view definitions (it is not a query language)
  • procedural attachment
resources
Resources
  • W3C Documents
    • Guide http://www.w3.org/TR/owl-guide/
    • Reference http://www.w3.org/TR/owl-ref/
    • Semantics and Abstract Syntax

http://www.w3.org/TR/owl-semantics/

  • OWL Tutorials
    • Ian Horrocks, Sean Bechhofer:http://www.cs.man.ac.uk/~horrocks/Slides/Innsbruck-tutorial/
  • Example Ontologies

http://www.daml.org/ontologies/

why rdf57

<?xml version="1.0"?>

<River ID="Mississippi " xmlns="http://www.river.org/river">

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</River>

Here is data about the Mississippi River. It has a length of 2,350 miles.

Its startingLocation is Lake Itasca. Its endingLocation is Gulf of Mexico.

Why RDF?
  • To give a standard way of specifying data "about" something.
  • Here's an example of an XML document that specifies data about Mississippi River:
xml rdf

<?xml version="1.0"?>

<River rdf:ID="Mississippi”

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

xmlns="http://www.river.org/river#">

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</River>

mississippi.xml

XML RDF

<?xml version="1.0"?>

<River ID="Mississippi" xmlns="http://www.river.org/river">

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico</endingLocation>

</River>

mississippi.xml

mississippi.rdf

the rdf format

<?xml version="1.0"?>

<River rdf:ID="Mississippi“

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

xmlns="http://www.river.org/river#">

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</River>

mississippi.xml

The RDF Format

RDF provides an ID attribute for identifying the resource being described.

The ID attribute is in the RDF namespace.

Add the "fragment identifier symbol" to

the namespace.

the rdf format cont

<?xml version="1.0"?>

<River rdf:ID="Mississippi“

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

xmlns="http://www.river.org/river#">

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</River>

mississippi.xml

The RDF Format (cont.)

The name of a resource of the River class

Class Name

properties of the

River class.

Values of the properties

rdf namespace and rdf id
RDF Namespace and rdf:ID
  • Why was "#" placed onto the end of the namespace?
  • xmlns=http://www.river.org/river#
  • The value of rdf:ID is a "relative URI". The "complete URI" is obtained
  • by concatenating the URL of the XML document and then the value of
  • rdf:ID
  • http://www.river.org/river#River class River
  • http://www.river.org/river#length property length
  • http://www.river.org/river#startingLocation property startingLocation
  • http://www.river.org/river#endingLocation property endingLocation
  • http://www.river.org/river#Mississippi resource Mississippi
the rdf format62
The RDF Format

<?xml version="1.0"?>

<ClassName rdf:ID="ResourceName"

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

xmlns="uri">

<propertyName>value</propertyName>

<propertyName>value</propertyName>

...

</Class>

xml base

<?xml version="1.0"?>

<River rdf:ID=“Mississippi”

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

xmlns=“http://www.river.org/river#”

xmlns:base=“http://www.geongrid.org/rivers#”>

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</River>

mississippi.xml

xml:base
  • Using URL will break the document if the document is moved, or is copied to another location.
  • A more robust solution is to specify the base URI in the document

Resource URI = concatenation(xml:base, rdf:ID)

= concatenation(‘http://www.geongrid.org/rivers#', “Mississppi")

= http://www.geongrid.org/rivers#Mississppi

rdf about

<?xml version="1.0"?>

<River rdf:about=“http://www.geongrid.org/rivers#Mississppi”

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

xmlns=“http://www.river.org/river#”

xmlns:base=“http://www.geongrid.org/rivers#”>

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</River>

mississippi.xml

rdf:about
  • Instead of identifying a resource with a relative URI (which then requires a base URI to be prepended), we can give the complete identity of a resource. However, we use rdf:about, rather than rdf:ID,
triple resource property value
Triple (resource, property, value)

length

Mississippi

2390

startingLocation

Mississippi

Lake Itasca

endingLocation

Mississippi

Gulf of Mexico

property

Value

Resource

predict

Object

Subject

the rdf is about triples
The RDF is about Triples!
  • The value of a property can be
    • a literal
      • 2390 miles
    • a resource
      • property-A has a value of Resource-B
      • property-B has a value of Resource-C

<?xml version="1.0"?>

<Resource-A>

<property-A>

<Resource-B>

<property-B>

<Resource-C>

<property-C>

Value-C

</property-C>

</Resource-C>

</property-B>

</Resource-B>

</property-A>

</Resource-A>

value of

property-A

value of

property-B

Convention:

  • A capital letter to start a type (class) name
  • A lowercase letter to start a property name
slide67

RDF Model Diagram

http://www.river.org/river#River

http://www.w3.org/1999/02/22-rdf-syntax-ns#type

2390

http://www.river.org/river#length

Mississippi

http://www.river.org/river#startingLocation

Lake Itasca

http://www.river.org/river#endingLocation

Gulf of Mexico

long form for describing a resource

<?xml version="1.0"?>

<rdf:Description rdf:about=“http://www.geongrid.org/rivers#Mississppi”

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

xmlns=“http://www.river.org/river#”>

<rdf:type rdf:resource="http://www.geodesy.org/river#River"/>

<length>2,350 mile </length>

<startingLocation>Lake Itasca</startingLocation>

<endingLocation>Gulf of Mexico </endingLocation>

</rdf:Description>

mississippi.xml

Long Form for Describing a Resource

This is a Description about the resource http://www.geongrid.org/rivers#Mississppi.

This resource is an instance of the River type (class).

The resource http://www.geongrid.org/rivers#Mississppi has a length of 6300 kilometers, a startingLocation of Lake Itasca, and an endingLocation of the Gulf of Mexico.

rdf id versus rdf about
rdf:ID versus rdf:about
  • When you want to introduce a resource, and provide an initial set of information about a resource use rdf:ID
  • When you want to extend the information about a resource use rdf:about
description logic vocabulary and semantics
Description Logic: Vocabulary and Semantics:

Dom … Domain I … Interpretation

why separate classes and datatypes
Why separate Classes and Datatypes?
  • Philosophical reasons:
    • Datatypes structured by built-in predicates
    • Not appropriate to form new datatypes using ontology language
  • Practical reasons:
    • Ontology language remains simple and compact
    • Semantic integrity of ontology language not compromised
    • Implementability not compromised — can use hybrid reasoner
owl property classes
OWL Property Classes
  • The symmetric and transitive property may only used for connecting two resources:

owl:TransitiveProperty

owl:ObjectProperty

owl:SymmetricProperty

owl:DatatypeProperty

rdf:Property

owl:FunctionalProperty

owl:InverseFunctionalProperty

Remark:Generally, it does not make sense to declare a property transitive AND (inverse) functional at once, Exercise: Explain why!