21
!"#$%&’ ) !"#*+,-.,/0 1 234 56/-76. !"#$%& (#)*+ ,-. /0# 1#2)%34 5#67 !"#$%&’ !)*+,"-"./ !012,2,.3 4 5"063+"#3 The information in this presentation is proprietary to TopQuadrant and should not be duplicated, used or disclosed without permission. Module II: Using Semantic Standards, Languages and TopBraid Tools for Modeling and Querying © Copyright 2007-2008 TopQuadrant Inc. Slide 2 Module II.a - Using Semantic Standards, Languages and Tools [Course Day 2] ! !"#$%&’()%" +"& ,$-."#+)%" #% #/. 0%&’1. ! 234 !"5#$’()%" +"& 67.$(-5.5 " 89#.4:;# <= 4+8-1-+$-9+)%" :-#/ #%%15 ;%$ #/. #$+-"-"< " 89#.4:;# >= 0%&.1-"< :-#/ #$-=1.5 -" 234 " 89#.4:;# ?= 234> ?/. 8+5/@’= 1+"<’+<.A 8.$<-"< &+#+ :-#/ 234 ! B’.$C D+"<’+<. E FGH2BD " 89#.4:;# @= B’.$C-"< &+#+ :-#/ FGH2BD IIIII D’"(/)8. IIIII ! 234F !"5#$’()%" +"& 67.$(-5.5 " 89#.4:;# A= J5-"< 234F #% (%"#$%1 + <.%<$+=/C 8+5/@’= ! ,KD G+$# ! !"5#$’()%"> L+5-(5 " 89#.4:;# B= J5-"< %:1>-"M.$5.,;N #$+"5-)M. =$%=.$).5

Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

!"#$%&'()(!"#*+,-.,/0(1(234(56/-76.(

!"#$%&'(#)*+',-.'/0#'1#2)%34'5#67'

!"#$%&'(!)*+,"-"./(!012,2,.3(4(5"063+"#37

The information in this presentation is proprietary to TopQuadrant and

should not be duplicated, used or disclosed without permission.

Module II:

Using Semantic Standards, Languages and

TopBraid Tools for Modeling and Querying

© Copyright 2007-2008 TopQuadrant Inc. Slide 2

Module II.a - Using Semantic Standards, Languages

and Tools [Course Day 2]

!! !"#$%&'()%"*+"&*,$-."#+)%"*#%*#/.*0%&'1.*

!! 234*!"5#$'()%"*+"&*67.$(-5.5*"! 89#.4:;#'<='4+8-1-+$-9+)%"*:-#/*#%%15*;%$*#/.*#$+-"-"<'

"! 89#.4:;#'>='0%&.1-"<*:-#/*#$-=1.5*-"*234**

"! 89#.4:;#'?='234>*?/.**8+5/@'=*1+"<'+<.A*8.$<-"<*&+#+*:-#/*234**

!! B'.$C*D+"<'+<.*E*FGH2BD**

"! 89#.4:;#'@='B'.$C-"<*&+#+*:-#/*FGH2BD**

IIIII**D'"(/)8.*IIIII*

!! 234F*!"5#$'()%"*+"&*67.$(-5.5*

"! 89#.4:;#'A='J5-"<*234F*#%*(%"#$%1*+*<.%<$+=/C*8+5/@'='*

!! ,KD*G+$#*!*!"5#$'()%">*L+5-(5*

"! 89#.4:;#'B='J5-"<*%:1>-"M.$5.,;N*#$+"5-)M.*=$%=.$).5'*

Page 2: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 3

$'"5*,"*

#%=-(*

($.+#.&*

O1.*"%*

#C=.*

#C=.*

#C=.*

(#C.#;#%3%&'D)/)':%'".)C0;'

P$+=/*Q*"%&.5*1-"R.&*SC*1+S.1.&*.&<.5*

L1'.#%%#/**

HG!*

3%('8."#T*

U+"*TA*VWWT*

2.;.$."(.*

*P'-&.*

HG!*

UV06*

2'")8.**

FC5#.8*

UF2@XV*

U+M+*

S$%+&.$*

YL1'.#%%#/*HG!**

2.;.$."(.*P'-&.Z*

)#1.*

?.(/"-(+1*

3%('8."#*

5'S(1+55*

© Copyright 2007-2008 TopQuadrant Inc. Slide 4

RDF Basics

!! ?/.*.1.8."#+$C*'"-#*-"*234*-5*#/.*869"+.:6("! ?/.*S+5-(*#/-"<*S.-"<*&.5($-S.&*-"*234*

"! 2.5%'$(.5*+$.*<.".$+11C*-&.")O.&*SC*J2!5*

"! ?:%*$.5%'$(.5*+$.*0;6(9,46*.7+(#1C*-;*#/.C*/+M.*#/.*5+8.*J2!*

!! G$%=.$).5*"! H*(/+$+(#.$-5)(*%$*+[$-S'#.*%;*+*$.5%'$(.*

"! G$%=.$).5*+$.*$.5%'$(.5*#%%\*

topic

resources http://www.mobile.com/hotel#Document1 http://www.mobile.com/hotel#topic http://www.technology.com/comm#BluetoothAPI

URI’s

Document1 Bluetooth API

Page 3: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 5

What is RDF?

!! F#+#.8."#5*8+&.*+5*#$-=1.5>*"! F'S].(#A*G$.&-(+#.A*,S].(#*

"!2.5%'$(.A*G$%=.$#CA*2.5%'$(.*^1-#.$+1_*

RDF Triple:

Document1

Bluetooth API topic

Subject

S

Predicate

P Object

O

© Copyright 2007-2008 TopQuadrant Inc. Slide 6

8'"*9:),;<((((((1(((((8=)>)0),*)?92@)(A7

Classes in RDF

0'1)=1.*#$-=1.5*:-#/*%".*5'S].(#*

Reference Guide

rdf:type

S P O

Document1

topic

BluetoothAPI S O

P=rdf:type

.*,=/+C#':%*:4)/#;'/0#'EF);;'-,')%':%;/)%4#'

S O P

O

8'"*9:),;<(0@>8;/#)(8=)>)0),*)?92@)(A7

8'"*9:),;<((0@>8;/#)((8=)>)0),*)?92@)(B7

((((((((((((((((((((((((((8;"#2*((8C-9);"";+DE%(A7

P

Page 4: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 7

Properties

H*G$%=.$#C*-5*+*$.5%'$(.*'5.&*#%*1+S.1*+*1-"R`*K.*(+"*.7=1-(-#1C*5#+#.*#/+#*-#*

-5*+*G$%=.$#C>*

*`*`*`*%$*]'5#*'5.*-#*

rdf:type

$&;>G$%=.$#C*

topic

S rdf:type O

3%('8."#T*

L1'.#%%#/*HG!*

topic

S O P

8;"#2*((1((0@>8E0"#)0;/(A7

8'"*9:),;<(8;"#2*(8C-9);"";+(DE%(A7

© Copyright 2007-2008 TopQuadrant Inc. Slide 8

TopBraid Composer (TBC)

,"#%1%<C* ,"#%1%<C*a+8.5=+(.5*b*G$.O7.5*

,"#%1%<C*/%8.*

Page 5: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 9

Multiple Ontologies in TBC

!!67+8=1.>*#:%*%"#%1%<-.5*"%:*%=."*-"*c%8=%5.$*

"!(1-(R*%"*+*#+S*-"*#/.*4%$8*M-.:*

"!(/%5."*%"#%1%<C*S.(%8.5*#/.*&.;+'1#*%"#%1%<C*

•! ";+)0(;1F3G();*A(1--(0)>)0(;"(;+23(",;"-"./7

© Copyright 2007-2008 TopQuadrant Inc. Slide 10

Classes

!!3-5=1+C*-";.$$.&*$&;5>5'Sc1+55,;*/-.$+$(/C*

Represents the following triples:

:College rdfs:subClassOf owl:Thing!:Gender rdfs:subClassOf owl:Thing!:Person rdfs:subClassOf owl:Thing!:Matriarch rdfs:subClassOf :Person!:Patriarch rdfs:subClassOf :Person!:Profession rdfs:subClassOf owl:Thing!

Form (middle-top) displays information about selected resource

How is it a Class?

it is a member of owl:Class – and nothing more i.e. :Matriarch rdf:type owl:Class or :Matriarch a owl:Class

Page 6: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 11

Graph View

!! F#+$)"<*=%-"#*-5*('$$."#*5.1.()%"*-"*;%$8*

"!1.d@(1-(R>*%=."*+11*

"!$-</#@(1-(R>*(/%%5.*=$%=.$#C*

© Copyright 2007-2008 TopQuadrant Inc. Slide 12

Exploring Instance Properties

!! 4%$85*(+"*S.*'5.&*#%*.7=1%$.*1-"R5*#%*&+#+*

"!"%#*]'5#*;%$*-"5#+"(.5*E*+"C*$.5%'$(.*&-5=1+C.&*-"*;%$8*

Ctl-click to navigate to a resource

Use back button to navigate back

Page 7: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 13

Exploring Instance Properties

!! 4%$85*(+"*S.*'5.&*#%*.7=1%$.*1-"R5*#%*&+#+*

"!"%#*]'5#*;%$*-"5#+"(.5*E*+"C*$.5%'$(.*&-5=1+C.&*-"*;%$8*

Hover over icon to get '+'

Can now view & edit the property's resource

Click to expand

Follow the links as far as the RDF graph goes…

© Copyright 2007-2008 TopQuadrant Inc. Slide 14

Importing an Ontology

new data added to the ontology (from import)

faded icons indicate imported resources

This is the ‘namespace’ we imported “kennedy:” is the defined prefix – we can change this if desired

Namespaces are the topic of a later module!

Page 8: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 15

“Local” vs. Imported Definitions

!!0%&.1*@e*4-"&*+11*1%(+11C*&.O".&*$.5%'$(.5*

"!&-5=1+C5*$.5%'$(.5*&.O".&*-"*('$$."#1C*5.1.(#.&*O1.*

These resources are defined in MyHandsOn.owl

© Copyright 2007-2008 TopQuadrant Inc. Slide 16

f)#1.* f2%::$-#.* fC.+$*

?/.*?.8=.5#* F/+R.5=.+$.* TgTT*

f)#1.* f2%::$-#.* fC.+$*

?/.*?.8=.5#* F/+R.5=.+$.* TgTT*

H5*h%'*D-R.*!#* F/+R.5=.+$.* Tijj*

f)#1.* f2%::$-#.* fC.+$*

?/.*?.8=.5#* F/+R.5=.+$.* TgTT*

H5*h%'*D-R.*!#* F/+R.5=.+$.* Tijj*

3-&%* 0+$1%:.* TiXg*

A more complex graph pattern

Row 1

Row 2

Row 9

Row 8

Row 7

Row 6

Row 5

Row 4

Row 3

Shakespeare

Johnson

Marlowe

Munday

Middleton

1611

1595 1599

1592 1586

1605

1624

1604

writtenBy

year

The Tempest

Romeo and Juliet

Dr. Faustus

Sir Thomas More

Game at Chess

Eastward Ho

Dido

Edward II

As You Like It

title

?y ?z ?x

?a

f)#1.* f=1+C:$-#.* fC.+$*

?/.*?.8=.5#* F/+R.5=.+$.* TgTT*

H5*h%'*D-R.*!#* F/+R.5=.+$.* Tijj*

3-&%* 0+$1%:.* TiXg*

?/%8+5*0%$.* 0'"&+C* TijV*

etc.

Page 9: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 17

Components of a Query

!! F.1.()%"*8%&.*+"&*M+$-+S1.5*"!F6D6c?*f=1+(.*"!F6D6c?*f=1+C:$-</#T*f=1+C:$-</#V*"!c,aF?2Jc?*kf=1+C:$-</#*$&;>#C=.*>G.$5%"l*

!! ?$-=1.*=+[.$"5*E*1-R.*+*#$-=1.A*S'#*:-#/*"+8.&*M+$-+S1.5*-"5#.+&*%;*5%8.*=+$#5*"!f=1+C*>)#1.*f)#1.*`*"!f=1+C*>=1+C:$-</#*>F/+R.5=.+$.*`*

"!f=1+C*>C.+$*fC.+$*`*

!! * FGH2BD*5#+"&+$&*-5*:$-[."*5-8-1+$*#%*am*

!! 4-1#.$5*"!"'8.$-(+1*(%8=+$-5%"5A*(+1('1+)%"5*"!fC.+$*e*TgWW*

© Copyright 2007-2008 TopQuadrant Inc. Slide 18

Query Syntax

L$-"<*-#*+11*#%<.#/.$*#%*;%$8*+*$.+1*n'.$C>*

F6D6c?*f=1+(.**

Ko626*k*>F#$+p%$&*>-5!"*f=1+(.*`l*

F6D6c?*f5=%'5.**

Ko626*

**k*f5=%'5.*>8+$$-.&*f+'#/%$*`*

****f+'#/%$*>:$%#.*>q-"<D.+$*`l*

F6D6c?*f=1+(.**

Ko626*

*k*f+'#/%$*>:$%#.*>o+81.#*`*

***f+'#/%$*>1-M.&!"*f=1+(.*`*

***f=1+(.*$&;>#C=.*<.%>o+81.#*`*l*

Where is Stratford?

Who married the person who wrote King Lear?

Did the person who wrote Hamlet live in a Hamlet?

Page 10: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 19

Filters

YF/+R.5=.+$.+"*=1+C5*:$-[."*+d.$*TgWWZ*

h%'*(+"*%"1C*O1#.$*%"*M+1'.5*C%'*/+M.*8+#(/.&*-"*#/.*Ko626*(1+'5.\*

4-$5#A*O"&*F/+R.5=.+$.+"*=1+C5*+"&*#/.*C.+$5*#/.C*:.$.*:$-[.">*

?play Shakespeare ?title writtenBy

year

title

?year

f)#1.* fC.+$*

The Tempest 1611

Romeo and Juliet 1595

As You Like It 1599

SELECT ?title ?year WHERE {?play :title ?title . ?play :writtenBy :Shakespeare . ?play :year ?year .

FILTER (?year > 1600)

f)#1.* fC.+$*

The Tempest 1611

}

© Copyright 2007-2008 TopQuadrant Inc. Slide 20

Optional

!!Optional used when a pattern may fail to match "!i.e. if some results do not have the value sought

SELECT ?childName ?childPhoto!WHERE !{?person :alma-mater :Harvard .! ?person :has-child ?child .! ?child rdfs:label ?childName .! OPTIONAL {?child :photo ?childPhoto}!} ORDER BY ASC (?childName)!

Name all of the Kennedys whose parents graduated from Harvard and show their photos, if they exist.

Page 11: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 21

Negation

Y?-#1.5*%;*+"%"C8%'5*=1+C5Z*

?play ?author ?title

writtenBy

year

title

SELECT ?title WHERE {?play :title ?title . OPTIONAL {?play :writtenBy ?author .} FILTER (!bound (?author)) }

!3* )#1.* :$-[."LC* C.+$*

TWT* 0+-&r5*8.#+8=%$=/%5-5* TgWW*

TWV* 2.M."<.$r5*?$+<.&C* TgWs*

Filter out those for which the author was found using the filter function “bound”:

G3/F#'

0+-&r5*8.#+8=%$=/%5-5*

2.M."<.$r5*?$+<.&C*

The variable ?author was not bound to a value

© Copyright 2007-2008 TopQuadrant Inc. Slide 22

Finding Aunts and Uncles

!!More involved queries "!shows "chaining the triples"

John Kennedy Jr.!

John Kennedy!

Robert Kennedy!

Edward Kennedy!

has-parent!

Rose Kennedy!

has-child!

Need to find a grandparent to find the siblings

Page 12: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 23

Finding Aunts and Uncles

!!More involved queries "!shows "chaining the triples" Let's build the query…

SELECT DISTINCT ?name ?uncleName!WHERE { ?nephewNiece :has-parent ?parent .! ?parent :has-parent ?grandparent .! ?grandparent :has-child ?uncle .! ?uncle :gender :male .!OPTIONAL {?nephewNiece rdfs:label ?name}.!OPTIONAL {?uncle rdfs:label ?uncleName}.!FILTER (?parent != ?uncle)!}!

has-parent!

?nephewNiece!

?parent!

© Copyright 2007-2008 TopQuadrant Inc. Slide 24

CONSTRUCT

!!Building a graph (new set of triples) based on patterns "!…and asserting those triples

CONSTRUCT {?person rdf:type :Matriarch}!WHERE !{?person :gender :female .! ?person :has-child ?child .!} !

Any woman with children is a Mother

Returns an RDF graph …but ontology (file) is not changed

Page 13: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 25

CONSTRUCT

!!Building a graph (new set of triples) based on patterns "!…and asserting those triples

Any woman with children is a Matriarch

CONSTRUCT {?person rdf:type :Matriarch}!WHERE !{?person :gender :female .! ?person :has-child ?child .!} !

#!Choose desired triples #!Assert into ontology

© Copyright 2007-2008 TopQuadrant Inc. Slide 26

SPARQL Property Functions

!!G.$;%$8-"<*n'.$C*;'"()%"5*

"!5%8.)8.5*"..&*#%*+==1C*;'"()%"5*-"*+*n'.$C*

"!%=.$+#.*%"*n'.$C*.1.8."#5*-"5#.+&*%;*5=.(-;C-"<*+*<$+=/**8+#(/*

!! #%=5*;'"()%"5*'5.*#$-=1.*;%$8*

"!#%=5>(%"5#$'(#F#$-"<*.7+8=1.*

Note function call format Template string – match each paramater

Page 14: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 27

!! F+8.*='$=%5.*+5*#%=5*;'"()%"*

"!S'#*:-#/*+*8%$.*.7=1-(-#*5C"#+7*

"!+55-<"*^S-"&_*+*M+$-+S1.*#%*#/.*$.5'1#5*%;*+*;'"()%"*

LET Expressions

Same query as previous

Function name

parameters results bound to variable

© Copyright 2007-2008 TopQuadrant Inc. Slide 28

SELECT Expressions

!!H<<$.<+#.5*

SELECT (sum(?age)/count(*) as ?x)

WHERE { ?person a :Person .

?person :deathYear ?dyear . ?person :birthYear ?byear .

LET (?age := ?dyear - ?byear)

}

average age of death

Page 15: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 29

SPARQL Endpoints

!!?/.*tGt*=+$#*%;*FGH2BD*

"!+*=$%#%(%1*;%$*+((.55-"<*&+#+*

"!+*K.S*5.$M-(.*."&=%-"#*;%$*+((.55-"<*FGH2BD*&+#+*

"!R"%:"*+5*FGH2BD*."&=%-"#5*

!! 42,0*(1+'5.*

"!5=.(-O.5*1%(+)%"*%;*:/.$.*&+#+*-5*;%'"&*

SELECT … FROM <http://a-uri> WHERE { … }

URI for a known SPARQL endpoint

can use multiple FROM clauses to query the RDF merge of multiple datastores

© Copyright 2007-2008 TopQuadrant Inc. Slide 30

DBpedia Example

!! 4-"&*3LG.&-+*(/-1&$."*%;*2%5.*4-#9<.$+1&*q."".&C**

SELECT ?child

FROM <http://dbpedia.org/sparql> WHERE {

<http://dbpedia.org/resource/Rose_Fitzgerald_Kennedy> <http://dbpedia.org/property/children>

?child .

}

This is one triple – note namespaces (also, is syntax different than we've seen in Composer?)

Page 16: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 31

SPARQL Syntax Review

!!u+$-+S1.5*+"&*234*8+#(/*#.$85*^Y(%"5#+"#5Z_*

"!vGr*=$.O7*5=.(-O.5*+*M+$-+S1.*

"!+11*M+$-+S1.5*-"5-&.*+*<$+=/*=+[.$"*8'5#*8+#(/*^S%'"&*#%*5+8.*

M+1'._*

"!v=r*-5*=+$#*%;*+*n"+8.*

SELECT ?title WHERE { ?play :writtenBy :Shakespeare . ?play :title ?title . }

?play and ?title will have the same value for each graph match

PREFIX pl: <http://tq-inc.org/Shakespeare#> SELECT ?title WHERE { ?play pl:writtenBy pl:Shakespeare . ?play pl:title ?title . }

define the prefix “pl:” and use the qnames “pl:name”

© Copyright 2007-2008 TopQuadrant Inc. Slide 32

OWL vs. RDF vs. RDFS

!!,KD*+"&*234F*+&&*"%*5C"#+7*#%*234*

"!234*+11%:5*5C8S%15*;$%8*+"C*=+(R+<.*

"!234F*'5.5*5C8S%15*;$%8*#/.*234F*=+(R+<.*

"!,KD*'5.5*5C8S%15*;$%8*#/.*,KD*=+(R+<.*

!! FC"#+()(+11CA*234*Q*234F*Q*,KD*

“The difference is in the inference”!

Page 17: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 33

Multiple Domains and Ranges

B>*o%:*+$.*8'1)=1.*&%8+-"5*%$*$+"<.5*%"*+*=$%=.$#C*#$.+#.&f*

67+8=1.>**

*/+5H((%8%&+)%"*$&;5>&%8+-"*u+(+)%"3.5)"+)%"*

*/+5H((%8%&+)%"*$&;5>&%8+-"*o+S-#+S1.H$.+*

K/+#*:-11*:.*-";.$*;$%8*

*h.11%:5#%".*/+5H((%8%&+)%"*h.11%:5#%".D%&<.*f*

BOTH that Yellowstone rdf:type VacationDestination AND Yellowstone rdf:type HabitableArea

Effectively, the INTERSECTION of the two domains!

hasAccomodation $&;5>&%8+-"*

VacationDestination

YellowstoneLodge

Yellowstone

hasAccomodation

HabitableArea

$&;>#C=.*

$&;>#C=.*

© Copyright 2007-2008 TopQuadrant Inc. Slide 34

Multiple domains - Interpretation as sets

!!0'1)=1.*&%8+-"5*C-.1&*8'1)=1.*-";.$."(.5\*

VacationDestination

NewYorkCity

MatterhornPeak Arcadia

HabitableArea

Yellowstone DeathValley

Lawndale

BigBear Farms

hasAccomodation

Page 18: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 35

sameAs

!!J5.&*:-#/*!"&-M-&'+15\*

!! 5+8.H5*@*5=.(-O.5*#/+#*#:%*-"&-M-&'+15*%;*&-w.$."#*"+8.5*+$.*#/.*5+8.*-"&-M-&'+1*

!!H"C=1+(.*%".*-5*'5.&A*#/.*%#/.$*(+"*S.*'5.&`**

!!K/+#*-5*R"%:"*+S%'#*%".A*-5*R"%:"*+S%'#*#/.*%#/.$*

owl:sameAs

1%(+#.&!"*

1%(+#.&!"*

/+5H((%8%&+)%"*USA

BigApple NewYorkCity

/+5H((%8%&+)%"*

BestWestern

© Copyright 2007-2008 TopQuadrant Inc. Slide 36

equivalentProperty

!!.n'-M+1."#G$%=.$#C*E*5=.(-O.5*#/+#*%".*=$%=.$#C*-5*#/.*5+8.*+5*+"%#/.$*=$%=.$#C*

!!K/.$.M.$*%".*=$%=.$#C*-5*'5.&*-"*+*#$-=1.A*#/.*%#/.$*(+"*S.*-";.$$.&`**

owl:equivalentProperty

NewYorkCity Queens

hasPart contains

hasPart

contains

Page 19: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 37

!!2.=$.5."#*S-&-$.()%"+1*$.1+)%"5/-=5*

!!H&&-"<*+*M+1'.*#%*%".*=$%=.$#C*+15%*+&&5*+*M+1'.*#%*#/.*

-"M.$5.*=$%=.$#C*

Inverse Properties

NewYorkCity

Queens

owl:inverseOf

isPartOf

Syntax /+5G+$#*+*%:1>,S].(#G$%=.$#C*N*

* *%:1>-"M.$5.,;**-5G+$#,;*`*

© Copyright 2007-2008 TopQuadrant Inc. Slide 38

Types of Local Restrictions

!!?/.*;%11%:-"<*(%"&-)%"5*;%$*=$%=.$#C*M+1'.5*(+"*S.*

&.O".&>*

!! F=.(-;C-"<*+*$.5#$-()%"*&.O".5*+"*+"%"C8%'5*(1+55*

(%"5-5)"<*%;*+11*-"&-M-&'+15*#/+#*;'1O11*#/.*(%"&-)%"*

+11u+1'.54$%8*

5%8.u+1'.54$%8*

/+5u+1'.*

8-"c+$&-"+1-#C*

8+7c+$&-"+1-#C*

(+$&-"+1-#C*

Page 20: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 39

Illustrating Restrictions

Service

xQ67=."5-M.*F.$M-(.*

yQ!".7=."5-M.*F.$M-(.*

+11*+$$%:5*^$.<+$&1.55*%;*(%1%$_*$.=$.5."#*Y-"(1'&.5Z*

¢ Tate

$

$ $

$

¢ ¢

Package

2• 1•

6•

4• 3•

7•

5•

© Copyright 2007-2008 TopQuadrant Inc. Slide 40

Class Disjointness

!!H11*(1+55.5*(%'1&*=%#.")+11C*%M.$1+=*

!! !"*8+"C*(+5.5*:.*:+"#*#%*8+R.*5'$.*#/.C*&%"r#*5/+$.*-"5#+"(.5*

!!c%"#$+&-()%"*-;*+"*-"&-M-&'+1*-5*&.#.$8-".&*#%*S.*+*8.8S.$*%;*#:%*&-5]%-"#*(1+55.5*

Sydney

City Park

disjointWith

Destination

NewYorkCity

Newark

Yellowstone

Arcadia

Yellowstone

Page 21: Module II: Using Semantic Standards, Languages and ...© Copyright 2007-2008 TopQuadrant Inc. Slide 23 Finding Aunts and Uncles !!More involved queries "!shows "chaining the triples"

© Copyright 2007-2008 TopQuadrant Inc. Slide 41

OWL Full

Language Performance Motivation

OWL FULL

J5.5*+11*(%"5#$'(#5A*

c1+55.5*+5*!"5#+"(.5*

^5+8.H5_A*'"$.5#$-(#.&*(+$&-"+1-#CA*.#(`*

a%*<'+$+"#..5*;%$*

=.$;%$8+"(.N*=$%S1.85*

(+"*/+M.*5%1')%"5*#/+#*+$."r#*;%'"&A*-"O"-#.*

1%%=5A*.#(`**

G$%M-&.*#/.*8+7-8'8*%;*

8%&.1-"<*;$..&%8*?$'5#*

8%&.1.$5*#%*S'-1&*.w.()M.*8%&.15A*

#$+&-)%"+1*&.S'<<-"<*

%#/.$:-5.`*

OWL DL

F+8.*M%(+S'1+$CA*

$.5#$-()%"5*%"*'5.**

P'+$+"#..&*#%*S.*5%'"&*

+"&*(%8=1.#.`**H"C*

5%1')%"*#/+#*.7-5#5*:-11*S.*;%'"&*n'-(R1C`*

H11%:*5=.(-O(+)%"*%;*

8%&.15*:-#/*<'+$+"#..5`*

4+5#*=.$;%$8+"(.A*<'+$+"#..&*$.5'1#5`*

OWL LITE

4'$#/.$*$.5#$-()%"5*

^c+$&-"+1-#C*W*%$*T*%"1C_*

F+8.*<'+$+"#..5*+5*3D* H11%:*#%%1*S'-1&.$5*#%*

8+R.*#%%15*:-#/*1-8-#.&*

;'"()%"+1-#C*n'-(R1C`*