• No results found

Ontology Languages(I & II)

N/A
N/A
Protected

Academic year: 2020

Share "Ontology Languages(I & II)"

Copied!
28
0
0

Loading.... (view fulltext now)

Full text

(1)

Ontology Languages

Noman Islam

FAST-NU

Karachi

(2)

PART I

RDF / RDFS, OWL

(3)

Introduction

• What is Ontology?

• What is Semantic Web?

• Ontology Languages (OL)

Ontology Languages for the Semantic Web, 2000, IEEE Intelligent Systems

(4)

Introduction – contd…

Requirements for a good Ontology Language

Well defined syntax

Well defined semantics

Efficient reasoning support

Sufficient expressive power

Convenience of expression

Note:

1. Semantics is a prerequisite for reasoning

(5)

Introduction to RDF

(

http://www.w3.org/RDF/

)

• RDF - a W3C recommendation since 2004

and part of W3C’s semantic web activity -

describes web resources for machine

processing

• RDF Data Model

– Express Simple statements using subject,

predicate and object

– Graph model and XML model

Dr. Zubair

Shoukat

(6)

Introduction to RDF - contd…

RDF examples:

Example 1:

<?xml version="1.0"?>

<rdf:RDF

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

<rdf:Description rdf:about="http://www.nu.edu.pk/Zubair">

<rdf:supervises>Shoukat</rdf:supervises>

</rdf:Description>

</rdf:RDF >

RDF Online Validator (

http://www.w3.org/RDF/Validator/

)

RDF Container elements: <rdf:Bag>, <rdf:Seq>, <rdf:Alt>,

<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/ 1999/02/22-rdf-syntax-ns#" xmlns:cd="http://www.recshop.fake/ cd#"> <rdf:Description rdf:about="http://www.recshop.fake/cd/ Beatles"> <cd:artist> <rdf:Bag> <rdf:li>John</rdf:li> <rdf:li>Paul</rdf:li> <rdf:li>George</rdf:li> <rdf:li>Ringo</rdf:li> </rdf:Bag> </cd:artist> </rdf:Description> </rdf:RDF>

(7)

Introduction to RDFS

• Shortcomings of RDF:

– No mechanism for describing properties, relationships

– rdfs:Class, rdf:type and rdfs:subClassOf

– rdfs:range, rdfs:domain

<?xml version="1.0"?> <rdf:RDF

xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base= "http://www.animals.fake/animals#"> <rdf:Description rdf:ID="animal">

<rdf:type

rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> </rdf:Description>

<rdf:Description rdf:ID="horse">

<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#animal"/> </rdf:Description> </rdf:RDF>

<?xml version="1.0"?>

<rdf:RDF

xmlns:rdf=

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

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

xml:base= "http://www.animals.fake/animals#">

<rdfs:Class rdf:ID="animal" />

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

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

</rdfs:Class>

(8)

Introduction to OWL

• Shortcomings of RDFS:

– local scope of properties

– disjointness of classes

– boolean combination of classes

– cardinality restrictions

– special characteristics of properties

• OWL Species:

– OWL Full

– OWL DL

– OWL Lite

(9)

Introduction to OWL – contd…

Disjoint Classes

<owl:Class rdf:about="associateProfessor"> <owl:disjointWith rdf:resource="#professor"/>

<owl:disjointWith rdf:resource="#assistantProfessor"/> </owl:Class>

Domain and Range Elements

<owl:ObjectProperty rdf:ID="isTaughtBy"> <owl:domain rdf:resource="#course"/>

<owl:range rdf:resource="#academicStaffMember"/> <rdfs:subPropertyOf rdf:resource="#involves"/> </owl:ObjectProperty>

Special Characteristics of properties

<owl:ObjectProperty rdf:ID="teaches">

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

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

<owl:inverseOf rdf:resource="#isTaughtBy"/>

(10)

Introduction to OWL – contd…

Cardinality Restrictions

(11)

Introduction to OWL – contd…

Special Properties of properties (owl:TransitiveProperty,

owl:SymmetricProperty, owl:FunctionalProperty,

owl:InverseFunctionalProperty)

<owl:ObjectProperty rdf:ID="hasSameGradeAs"> <rdf:type rdf:resource="&owl;TransitiveProperty" /> <rdf:type rdf:resource="&owl;SymmetricProperty" /> <rdfs:domain rdf:resource="#student" />

<rdfs:range rdf:resource="#student" /> </owl:ObjectProperty>

Boolean combinations

(12)

References

http://www.w3schools.com/RDF/default.asp

• “RDF Tutorial”, Pierre Antoine Champin, April,

2001

• “Web Ontology Language: OWL”, Grigoris

Antoniou and Frank van Harmelen

(13)

PART II

OWL, OWL-S, WSMO

(14)

OWL Current Status

• OWL 1.1

• OWL 2.0 Working Draft:

http://www.w3.org/TR/2008/WD-owl2-syntax-2008041

1/

• OWL Mailing List

http://lists.w3.org/Archives/Public/public-owl-dev/

• OWL API

(15)

An African Wildlife Ontology [5]

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl ="http://www.w3.org/2002/07/owl#" xmlns="http://www.mydomain.org/african"> <owl:Ontology rdf:about=""> <owl:VersionInfo>

My example version 1.2, 17 October 2002 </owl:VersionInfo>

</owl:Ontology>

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

<rdfs:comment>Animals form a class</rdfs:comment> </owl:Class>

<owl:Class rdf:ID="plant"> <rdfs:comment>

Plants form a class disjoint from animals </rdfs:comment>

<owl:disjointWith="#animal"/> </owl:Class>

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

<rdfs:comment>Trees are a type of plants</rdfs:comment> <rdfs:subClassOf rdf:resource="#plant"/>

(16)

An African Wildlife Ontology

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

<rdfs:comment>Carnivores are exactly those animals

that eat also animals</rdfs:comment>

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

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

<owl:Restriction>

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

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

</owl:Restriction>

</owl:intersectionOf>

</owl:Class>

(17)

OWL-S

• Ontology:

– O = <c, p, a>

• Web Service

– Service =<d,f,p>

• OWL-S 1.2

http://www.daml.org/services/owl-s/

• four fundamental points:

(18)

OWL-Service

presents

,

describedBy

, and

supports

<service:Service rdf:ID="BravoAir_ReservationAgent">

<service:presents

rdf:resource="BravoAirProfile.owl#Profile_BravoAir_ReservationAgent"/>

<service:describedBy rdf:resource="BravoAirProcess.owl#BravoAir_Process" />

<service:supports

(19)

OWL-S Profile

• human-readable information like serviceName,

textDescription and contactInformation

• Functional description:

– IOPE

• Inputs and Outputs

• Preconditions and effects

(20)

OWL-S Service Model

• Inputs and Outputs

• Preconditions and effects

• Conditioning outputs and effects

– SWRL

• Process Types:

– Atomic Process

– Simple Process

– Composite Process

• Sequence, split, choice, if-then-else, iterate etc.

(21)

<process:hasResult> <process:Result> <process:hasResultVar> <process:ResultVar rdf:ID="CreditLimH"> <process:parameterType rdf:resource="&ecom;#Dollars"/> </process:ResultVar> </process:hasResultVar>

<process:inCondition expressionLanguage="&expr;#KIF" rdf:dataType="&xsd;#string"> (and (current-value (credit-limit ?CreditCard)

?CreditLimH)

(>= ?CreditLimH ?purchaseAmt)) </process:inCondition> <process:withOutput> <process:OutputBinding> <process:toParam rdf:resource="#ConfirmationNum"/> <process:valueFunction rdf:parseType="Literal"> <cc:ConfirmationNum xsd:datatype="&xsd;#string"/> </process:valueFunction> </process:OutputBinding> </process:withOutput>

<process:hasEffect expressionLanguage="&expr;#KIF" rdf:dataType="&xsd;#string"> (and (confirmed (purchase ?purchaseAmt) ?ConfirmationNum)

(own ?objectPurchased)

(decrease (credit-limit ?CreditCard) ?purchaseAmt))

</process:hasEffect> </process:Result> </process:hasResult>

(22)

OWL-S Groundings

• A predefined grounding, mapping to WSDL

– OWL-S atomic process is mapped to WSDL operation

(23)

WSDL Grounding

<grounding:WsdlAtomicProcessGrounding rdf:ID="WsdlGrounding_GetDesiredFlightDetails"> <grounding:owlsProcess rdf:resource="BravoAirProcess.owl#GetDesiredFlightDetail s"/> <grounding:wsdlOperation rdf:resource="#GetDesiredFlightDetails_operation"/> <grounding:wsdlInputMessage rdf:datatype="&xsd;anyURI"> BravoAirGrounding.wsdl#GetDesiredFlightDetails_Input </grounding:wsdlInputMessage> <grounding:wsdlInput> <grounding:WsdlInputMessageMap> <grounding:owlsParameter rdf:resource="BravoAirProcess.owl#DepartureAirport"/> <grounding:wsdlMessagePart rdf:datatype="&xsd;anyURI"> BravoAirGrounding.wsdl#departureAirport </grounding:wsdlMessagePart> </grounding:WsdlInputMessageMap> </grounding:wsdlInput> ...

In WSDL Description

<operation name="GetDesiredFlightDetails_operation" owl-s-process="BravoAir:#GetDesiredFlightDetails">

<input message="tns:GetDesiredFlightDetails_Input"/> </operation>

<message name="GetDesiredFlightDetails_Input"> <part name="departureAirport"

owl-s-parameter="BravoAir:#departureAirport_In" /> ...

(24)

WSMO

• WSMO Elements:

– Ontologies

– Goals

– WebServices

• Capabilities

• Interfaces (choreography, orchestration)

– Mediators

(25)

An Example of WSMO

goal <<http://www.wsmo.org/2004/d3/d3.2/v0.1/20041004/resources/goal.wsml>> nonFunctionalProperties

dc:description hasValue "Buying a train ticket from Innsbruck to Frankfurt on..." [...] endNonFunctionalProperties importedOntologies <<http://www.wsmo.org/ontologies/dateTime>> [...] webservice <<http://www.wsmo.org/2004/d3/d3.2/v0.1/20041004/resources/ws.wsml>> nonFunctionalProperties [...]

dc:description hasValue "Web Service for booking online train tickets for Austria and Germany" [...] endNonFunctionalProperties importOntologies <<http:://www.wsmo.org/ontologies/dateTime>>, <<http:://www.wsmo.org/ontologies/trainConnection>>, <<http:://www.wsmo.org/ontologies/purchase>>, <<http:://www.wsmo.org/ontologies/location>> capability _# [...] interface _# nonFunctionalProperties

dc:description hasValue "describes the Interface of Web Service (not specified yet)" endNonFunctionalProperties

(26)

Ontology Reasoning

• Reasoning is provided mapping ontology

language to a known logical formalism

• OWL is mapped on a description logic

• Reasoners like FaCT and RACER

• We may reason about:

– Class membership

– Equivalence of classes - denote the same set in any

legal world description

– In consistency -denotes the empty set in any legal

world description.

(27)
(28)

References

1.

“Ontology Language Standardisation Efforts”,

OntoWeb: Ontology-based Information Exchange for

Knowledge Management and Electronic Commerce,

2002

2.

“Web service interface description languages”,

3.

“A Conceptual Comparison between WSMO and

OWL-S”, WSMO Working Draft, January 6, 2005

4.

“OWL-S: Semantic Markup for Web Services”, W3C

Member Submission 22 November 2004

(http://www.w3.org/RDF/ (http://www.w3.org/RDF/Validator/ http://www.w3schools.com/RDF/default.asp http://www.w3.org/TR/2008/WD-owl2-syntax-20080411/ http://lists.w3.org/Archives/Public/public-owl-dev/ http://owlapi.sourceforge.net/releases.html http://www.daml.org/services/owl-s/

References

Related documents

Die Tatsache, dass aus den beiden Behandlungsgruppen Propofol und Sevofluran im Gegensatz zur Kontroll-Gruppe lediglich ein einziges Tier eosinophil markierte

Overall, total national support for agriculture accounted for EUR 8.1 billion between 2002 and 2012, of which almost two thirds (65 per cent) went directly to farmers in the form

Hence, the purpose of this study was to identify factors that are consistent and valid in driving the job satisfaction of private hospital nurses in the Klang Valley which lead

Inputs • Staff time • Materials • Parents • Volunteers Planning • Assess need • Assess walkability • Agree objectives • Plan programme Intervention • Organise walking

Based on 11 case studies and data gathered from 204 organizations for statistical analysis, our study set out to explain the low degree of IOS adoption in the

Then liquid nitriding process of stainless steel 304 will be tested for its wear resistance on sliding condition using pin on disk apparatus, and test for the tensile

Cormac  Specialised sheep spraying equipment  Weighing facilities  Rollover crates  “Batch” footbaths  Sheep handling units.. (including footbath)  Mobile penning

The fine grain configuration of the High Level Trigger farm with the control system developed for the usage of the farm for offline tasks, and the usage of CVMFS for the