SlideShare ist ein Scribd-Unternehmen logo
1 von 89
Downloaden Sie, um offline zu lesen
A N 	
  I NTRODUCTION 	
  	
  
TO 	
  O NTOLOGY 	
  D EVELOPMENT 	
  
Stefano	
  Bragaglia	
  -­‐	
  May	
  14,	
  2010	
  
A	
  (R EALLY )	
  B RIEF 	
  H ISTORY 	
  	
  
OF 	
   THE 	
  S EMANTIC 	
  W EB 	
  

2	
  

“The	
  World-­‐Wide	
  Web	
  (W3)	
  was	
  developed	
  to	
  be	
  a	
  pool	
  of	
  human	
  knowledge,	
  
which	
  would	
  allow	
  collaborators	
  in	
  remote	
  sites	
  to	
  share	
  their	
  ideas	
  and	
  all	
  aspects	
  
of	
  a	
  common	
  project.”	
  
Sir	
  Timothy	
  Berners-­‐Lee	
  
¥ 

Christmas	
  1990:	
  with	
  the	
  implementaNon	
  of	
  the	
  HyperText	
  Transfer	
  Protocol,	
  
the	
  HyperText	
  Markup	
  Language,	
  the	
  CERN	
  hLpd	
  (an	
  HTTP	
  server)	
  and	
  
WorldWideWeb	
  (a	
  web	
  editor/browser)	
  the	
  first	
  web	
  page	
  is	
  transmiUed.	
  

¥ 

September	
  1994:	
  Berners-­‐Lee	
  founds	
  the	
  World-­‐Wide	
  Web	
  ConsorMum	
  to	
  
create	
  standards	
  and	
  recommendaNons	
  to	
  improve	
  quality	
  of	
  the	
  Web.	
  

¥ 

Early	
  2002:	
  new	
  ideas	
  for	
  sharing	
  contents	
  arises,	
  the	
  new	
  paradigm	
  aims	
  to	
  
democraNze	
  the	
  Web	
  by	
  means	
  of	
  social	
  networks	
  (Web	
  2.0)	
  

¥ 

Mid	
  2006:	
  Berners-­‐Lee	
  introduces	
  the	
  SemanMc	
  Web	
  to	
  turn	
  the	
  Web	
  from	
  
machine-­‐representable	
  to	
  machine-­‐understandable,	
  thus	
  allowing	
  automaMc	
  
reasoning	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
3	
  

A	
  W INNING 	
  E XAMPLE 	
   OF 	
  
S EMANTIC 	
  W EB 	
  A PPLICATION 	
  

SIRI	
  

a	
  	
  free	
  personal	
  
assistant	
  for	
  iPhone	
  
¥  Awarded	
  during	
  

this	
  year’s	
  SXSW	
  
FesMval	
  as	
  “Most	
  
Innova@ve	
  Web	
  
Technology”	
  	
  

¥  Integrates	
  a	
  

growing	
  number	
  of	
  
third-­‐party	
  web	
  
services	
  

¥  Understands	
  user’s	
  

needs,	
  
automaNcally	
  
discovers	
  soluNons	
  
and	
  provides	
  
answers	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
A	
  F EW 	
  C ONSIDERATIONS 	
  
ON 	
   THE 	
  S EMANTIC 	
  W EB 	
  

4	
  

¥ 

AutomaNc	
  reasoning	
  will	
  be	
  possible	
  if	
  the	
  data	
  on	
  Internet	
  will	
  
be	
  enriched	
  with	
  semanNc	
  annotaNons	
  
Who	
  should	
  do	
  it?	
  How	
  difficult	
  is	
  it?	
  

¥ 

So_ware	
  that	
  (ascertainably)	
  draws	
  conclusions	
  from	
  semanNc	
  
annotaNons	
  is	
  also	
  required	
  (work	
  in	
  progress)	
  
Is	
  it	
  feasible?	
  Will	
  it	
  push	
  Web	
  annotaMon?	
  

¥ 

The	
  first	
  parNal	
  results	
  were	
  collected	
  only	
  now,	
  a_er	
  years	
  of	
  
large	
  investments	
  
Is	
  the	
  SemanMc	
  Web	
  really	
  needed?	
  

¥ 

Thus	
  automaNc	
  reasoning	
  has	
  been	
  postponed	
  in	
  favor	
  of	
  data	
  
interoperability	
  (Data	
  Web	
  vs.	
  SemanNc	
  Web),	
  but…	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
5	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Architecture:	
  
The	
  SemanNc	
  
Web	
  is	
  complex	
  
and	
  several	
  
layers	
  are	
  
required,	
  each	
  
addressing	
  	
  
specific	
  issues	
  	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
6	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Requirements:	
  
URI:	
  a	
  mechanism	
  to	
  
refer	
  things	
  (similar	
  to	
  
URL	
  )	
  
UNICODE:	
  a	
  universal	
  
character	
  set	
  to	
  grant	
  
communicaNon	
  
XML:	
  elemental	
  
syntax	
  and	
  content	
  
structure	
  for	
  
documents	
  (semanNcs	
  
delegated	
  to	
  higher	
  
levels)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
7	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Data	
  
Interchange:	
  
Resource	
  Descrip@on	
  
Framework:	
  	
  
¥  Based	
  on	
  XML	
  
¥  (Almost)	
  as	
  

expressive	
  as	
  E-­‐R	
  
Diagrams	
  or	
  Class	
  
Diagrams	
  

¥  Describes	
  the	
  domain	
  

by	
  triples	
  :	
  <	
  subject,	
  
predicate,	
  object	
  >	
  or	
  
<	
  resource,	
  aLribute,	
  
value	
  >	
  

¥  Defines	
  “roles”	
  like:	
  

subject,	
  predicate,	
  
object,	
  type,	
  value,	
  
ecc.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
8	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Querying:	
  
SPARQL	
  Protocol	
  and	
  
RDF	
  Query	
  Language:	
  	
  
¥  Inherits	
  from	
  both	
  

Prolog	
  and	
  SQL	
  

¥  Interacts	
  with	
  RDF	
  

triples	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
9	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Knowledge	
  
Representa@on:	
  
RDF	
  Schema:	
  
¥  Extends	
  RDF	
  with	
  

subClassOf,	
  
Datatype,	
  etc.	
  
¥  Good	
  for	
  

taxonomies	
  

OWL:	
  	
  
¥  Extends	
  RDFS	
  with	
  

disjointWith,	
  
equivalentProperty,	
  
InverseOf,	
  ecc.	
  

¥  Good	
  for	
  ontologies	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
10	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Rules	
  
Representa@on:	
  
Seman@c	
  Web	
  rule	
  
language:	
  
¥  Applies	
  rules	
  to	
  data:	
  

a	
  hasParent	
  b	
  /	
  	
  
b	
  hasBrother	
  c	
  	
  
=>	
  a	
  hasUncle	
  c	
  

Rule	
  Interchange	
  
Format:	
  	
  
¥  Allows	
  portability	
  of	
  

rules	
  between	
  
languages	
  

NB:	
  Currently	
  
undergoing	
  a	
  
standardizaMon	
  
process	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
11	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Reasoning:	
  
Unifying	
  logic:	
  a	
  
mediator	
  layer	
  
between	
  data	
  
querying,	
  knowledge	
  
and	
  rule	
  
representaNon	
  
Proof:	
  exploits	
  the	
  
underlying	
  unified	
  
logic	
  to	
  draw	
  new	
  
conclusions	
  from	
  
available	
  data	
  
NB:	
  Currently	
  
undergoing	
  acMve	
  
research	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
12	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Trust:	
  
Cryptography:	
  
founded	
  on	
  
underlying	
  plalorm,	
  
ensures	
  that	
  data	
  are	
  
kept	
  confidenNal	
  	
  
Cer@fica@on:	
  founded	
  
on	
  underlying	
  
plalorm,	
  ensures	
  that	
  
data	
  come	
  from	
  an	
  
entrusted	
  source	
  
NB:	
  Currently	
  
undergoing	
  acMve	
  
research	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
13	
  

T HE 	
  S EMANTIC 	
  W EB 	
  C AKE 	
  

Presenta@on:	
  
User	
  interface:	
  
provides	
  an	
  
environment	
  to	
  
present	
  applicaNon	
  to	
  
final	
  users	
  
NB:	
  Currently	
  
undergoing	
  acMve	
  
research	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
14	
  

E XPRESSIVENESS 	
  	
  
OF 	
  S EMANTIC 	
  M ODELS 	
  

The	
  languages	
  seen	
  so	
  far	
  can	
  
be	
  arranged	
  by	
  increasing	
  
expressiveness.	
  	
  
Consider	
  the	
  complexity	
  of	
  
what	
  you	
  aim	
  to	
  model	
  when	
  
choosing	
  one:	
  
¥ 

Taxonomy:	
  a	
  set	
  of	
  terms	
  
hierarchically	
  organized	
  
Ex.:	
  IEEE	
  Computer	
  Society	
  
Keywords	
  

¥ 

Thesaurus:	
  a	
  set	
  of	
  terms	
  
with	
  linguisNc	
  relaNons	
  
among	
  them	
  
Ex.:	
  Princeton	
  University’s	
  
WordNET	
  

¥ 

Conceptual	
  Model:	
  a	
  set	
  
of	
  organized	
  concepts	
  and	
  
specific	
  relaNons	
  among	
  
them	
  describing	
  a	
  specific	
  
domain	
  

¥ 

Logic	
  Theory:	
  basically	
  a	
  
conceptual	
  model	
  
supported	
  by	
  inference	
  
mechanisms	
  
	
  
Ex:	
  PizzaOntology,	
  FOAF,	
  
etc.	
  just	
  to	
  name	
  a	
  few	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
O NTOLOGIES 	
  	
  
AND 	
   THE 	
  S EMANTIC 	
  W EB 	
  

15	
  

¥ 

Ontology:	
  a	
  formal,	
  explicit	
  descripNon	
  of	
  a	
  domain	
  of	
  
interest	
  (by	
  means	
  of	
  concepts	
  and	
  relaNons	
  among	
  
them)	
  
Ontology	
  +	
  Instances	
  =	
  Knowledge	
  Base	
  

¥ 

Several	
  proposal	
  within	
  the	
  SemanNc	
  Web	
  IniNaNve:	
  
¤ 

RDF	
  Schema:	
  RDF	
  extensions	
  with	
  proper	
  terms	
  for	
  
ontological	
  concepts;	
  good	
  for	
  taxonomies	
  

¤ 

…	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
O NTOLOGIES 	
  	
  
AND 	
   THE 	
  S EMANTIC 	
  W EB 	
  

16	
  

¥ 

Several	
  proposal	
  within	
  the	
  SemanNc	
  Web	
  IniNaNve:	
  
¤ 

OWL	
  1.1	
  (Ontology	
  Web	
  Language):	
  RDFS	
  extension	
  with	
  three	
  
variants	
  of	
  increasing	
  expressiveness:	
  
¢ 

¢ 

OWL-­‐DL:	
  maximum	
  expressiveness	
  possible,	
  computaNonally	
  
complete,	
  decidable	
  and	
  availability	
  of	
  pracNcal	
  reasoning	
  algorithms;	
  
named	
  a_er	
  DescripMon	
  Logic	
  that	
  studies	
  the	
  logics	
  of	
  its	
  formal	
  
foundaNon	
  

¢ 

¤ 

OWL-­‐Lite:	
  limited	
  support	
  for	
  certain	
  features	
  (ex.:	
  cardinality),	
  good	
  
for	
  thesauri	
  or	
  hierarchies;	
  intended	
  to	
  be	
  easily	
  computable,	
  tools	
  
development	
  is	
  difficult	
  as	
  per	
  other	
  dialects	
  

OWL-­‐Full:	
  minimal	
  compaNbility	
  with	
  RDF-­‐S,	
  has	
  different	
  semanNcs	
  
(classes	
  as	
  both	
  collecNons	
  of	
  individuals	
  and	
  individuals),	
  complete	
  
reasoning	
  support	
  is	
  unlikely	
  

OWL	
  2:	
  introduces	
  “profiles”	
  such	
  as	
  OWL	
  2-­‐EL	
  (fragment	
  with	
  
polynomial	
  Nme	
  reasoning	
  complexity),	
  OWL	
  2-­‐QL	
  (simplifies	
  support	
  
to	
  queries)	
  and	
  OWL	
  2-­‐RL	
  (OWL	
  subset	
  meant	
  to	
  handle	
  rules)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
OWL	
  	
  
AND 	
  D ESCRIPTION 	
  L OGICS 	
  

17	
  

¥ 

DescripNon	
  Logics,	
  as	
  First	
  Order	
  Logic,	
  is	
  a	
  family	
  of	
  logics	
  

¥ 

Each	
  fragment	
  of	
  logics	
  depends	
  on	
  which	
  operators	
  are	
  
supported	
  

¥ 

The	
  more	
  supported	
  operators,	
  the	
  higher	
  the	
  complexity	
  

¥ 

OWL-­‐DL	
  supports	
  the	
  following	
  operators:	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
OWL	
  O NTOLOGIES 	
  

18	
  

Terminology:	
  

Student	
  

Instance:	
  a	
  specific	
  
object	
  of	
  the	
  domain	
  
(same	
  as	
  DL’s	
  
individual)	
  

UniFEStudent	
  

aUendsCourse	
  
Course	
  

¥  An	
  instance	
  may	
  

pertain	
  to	
  none,	
  
one	
  	
  or	
  more	
  
classes.	
  
¥  An	
  instance	
  may	
  

have	
  none,	
  one	
  or	
  
more	
  properNes.	
  

Speaker	
  

UniBOStudent	
  
assists	
  
s_bragaglia	
  
UniBOAIStudent	
  

aUendsCourse	
  
photography	
  
AICourse	
  
app_int_art	
  

¥  Instances	
  cannot	
  be	
  

members	
  of	
  
owl:Nothing.	
  

you	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

aUendsAICourse	
  

fond_int_art	
  
14/05/2010	
  
OWL	
  O NTOLOGIES 	
  

19	
  

Terminology:	
  

Student	
  

Class:	
  a	
  collecNon	
  of	
  
objects	
  with	
  similar	
  
characterisNcs	
  (same	
  as	
  
DL's	
  concept)	
  

UniFEStudent	
  

¥  It	
  may	
  be	
  a	
  subclass	
  

of	
  another,	
  inheriNng	
  
characterisNcs	
  from	
  
its	
  parent	
  superclass	
  
(logical	
  subsumpMon,	
  
DL’s	
  concept	
  
inclusion).	
  

¥  All	
  classes	
  are	
  

subclasses	
  of	
  
olw:Thing	
  (the	
  root	
  
class)	
  and	
  are	
  
subclassed	
  by	
  
owl:Nothing	
  (the	
  
empty	
  class)	
  

aUendsCourse	
  
Course	
  

Speaker	
  

UniBOStudent	
  
assists	
  
s_bragaglia	
  
UniBOAIStudent	
  
you	
  

	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

aUendsCourse	
  
photography	
  
AICourse	
  
app_int_art	
  
aUendsAICourse	
  

fond_int_art	
  
14/05/2010	
  
OWL	
  O NTOLOGIES 	
  

20	
  

Terminology:	
  
Property:	
  a	
  direct	
  binary	
  
relaNon	
  that	
  specifies	
  class	
  
characterisNcs	
  (same	
  as	
  
DL’s	
  role)	
  
¥ 

It	
  may	
  be	
  a	
  subproperty	
  
of	
  another,	
  inheriNng	
  
characterisNcs	
  from	
  its	
  
parent	
  superproperty	
  

¥ 

As	
  aUribute	
  of	
  
instances,	
  it	
  links	
  to	
  RDF	
  
literals	
  (datatype	
  
property,	
  ex.:	
  
hasName)	
  

UniFEStudent	
  

It	
  may	
  have	
  domain	
  
and	
  range.	
  

¥ 

Student	
  

¥ 

O_en	
  it	
  links	
  two	
  
instances	
  (object	
  
property);	
  it	
  may	
  have	
  
logical	
  capabiliNes	
  such	
  
as	
  being	
  transiGve,	
  
symmetric,	
  inverse	
  and	
  
funcGonal.	
  

aUendsCourse	
  
Course	
  

Speaker	
  

UniBOStudent	
  
assists	
  
s_bragaglia	
  
UniBOAIStudent	
  
you	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

aUendsCourse	
  
photography	
  
AICourse	
  
app_int_art	
  
aUendsAICourse	
  

fond_int_art	
  
14/05/2010	
  
OWL	
  O NTOLOGIES 	
  

21	
  

Terminology:	
  
Property:	
  a	
  direct	
  binary	
  
relaNon	
  that	
  specifies	
  class	
  
characterisNcs	
  (same	
  as	
  
DL’s	
  role)	
  
¥ 

It	
  may	
  be	
  a	
  subproperty	
  
of	
  another,	
  inheriNng	
  
characterisNcs	
  from	
  its	
  
parent	
  superproperty	
  

¥ 

As	
  aUribute	
  of	
  
instances,	
  it	
  links	
  to	
  RDF	
  
literals	
  (datatype	
  
property,	
  ex.:	
  
hasName)	
  

UniFEStudent	
  

It	
  may	
  have	
  domain	
  
and	
  range.	
  

¥ 

Student	
  

¥ 

O_en	
  it	
  links	
  two	
  
instances	
  (object	
  
property);	
  it	
  may	
  have	
  
logical	
  capabiliNes	
  such	
  
as	
  being	
  transiGve,	
  
symmetric,	
  inverse	
  and	
  
funcGonal.	
  

aUendsCourse	
  
Course	
  

Speaker	
  

UniBOStudent	
  
assists	
  
s_bragaglia	
  
UniBOAIStudent	
  
you	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

aUendsCourse	
  
photography	
  
AICourse	
  
app_int_art	
  
aUendsAICourse	
  

fond_int_art	
  
14/05/2010	
  
OWL	
  O NTOLOGIES 	
  

22	
  

Terminology:	
  
Property:	
  a	
  direct	
  binary	
  
relaNon	
  that	
  specifies	
  class	
  
characterisNcs	
  (same	
  as	
  
DL’s	
  role)	
  
¥ 

It	
  may	
  be	
  a	
  subproperty	
  
of	
  another,	
  inheriNng	
  
characterisNcs	
  from	
  its	
  
parent	
  superproperty	
  

¥ 

As	
  aUribute	
  of	
  
instances,	
  it	
  links	
  to	
  RDF	
  
literals	
  (datatype	
  
property,	
  ex.:	
  
hasName)	
  

UniFEStudent	
  

It	
  may	
  have	
  domain	
  
and	
  range.	
  

¥ 

Student	
  

¥ 

O_en	
  it	
  links	
  two	
  
instances	
  (object	
  
property);	
  it	
  may	
  have	
  
logical	
  capabiliNes	
  such	
  
as	
  being	
  transiGve,	
  
symmetric,	
  inverse	
  and	
  
funcGonal.	
  

aUendsCourse	
  
Course	
  

Speaker	
  

UniBOStudent	
  
assists	
  
s_bragaglia	
  
UniBOAIStudent	
  
you	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

aUendsCourse	
  
photography	
  
AICourse	
  
app_int_art	
  
aUendsAICourse	
  

fond_int_art	
  
14/05/2010	
  
OWL	
  O NTOLOGIES 	
  

23	
  

Terminology:	
  

Student	
  

Operator:	
  OWL	
  
language	
  supports	
  
various	
  operaNons	
  on	
  
classes	
  such	
  as	
  union,	
  
intersecGon	
  and	
  
complement	
  
EnumeraGon,	
  
cardinality	
  and	
  
disjointness	
  are	
  also	
  
supported.	
  
Such	
  operaNons	
  are	
  
usually	
  referred	
  as	
  
restricGons	
  (and	
  
expressions,	
  
backward	
  
compaNbility)	
  

UniFEStudent	
  

aUendsCourse	
  
Course	
  

Speaker	
  

UniBOStudent	
  
assists	
  
s_bragaglia	
  
UniBOAIStudent	
  
you	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

aUendsCourse	
  
photography	
  
AICourse	
  
app_int_art	
  
aUendsAICourse	
  

fond_int_art	
  
14/05/2010	
  
D EVELOPING 	
  O NTOLOGIES 	
  

24	
  

A	
  possible	
  development	
  process	
  involves:	
  
	
  

1. 
2. 

Analyze	
  the	
  domain	
  and	
  the	
  goal	
  of	
  the	
  ontology	
  
Determine	
  the	
  key	
  concepts	
  of	
  the	
  domain	
  
¤ 
¤ 

3. 

Consider	
  to	
  reuse	
  exis@ng	
  ontologies	
  
¤ 
¤ 

4. 
5. 
6. 
7. 
8. 
9. 

Glossary	
  of	
  terms	
  
Competency	
  quesNons	
  
Upper	
  /	
  medium	
  /	
  lower	
  ontologies	
  (Greek	
  temple	
  model)	
  
Ontologies	
  paerns	
  

Organize	
  concepts	
  in	
  classes	
  e	
  hierarchies	
  among	
  classes	
  
Determine	
  the	
  proper@es	
  of	
  the	
  classes	
  
Add	
  constraints	
  (allowed	
  values)	
  on	
  the	
  properNes	
  
Create	
  the	
  instances	
  
Assign	
  values	
  to	
  the	
  properNes	
  for	
  each	
  instance	
  
Verify	
  the	
  ontology	
  and	
  release	
  it	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
D EVELOPING 	
  O NTOLOGIES 	
  

25	
  

¥ 

Purposes:	
  
¤ 
¤ 

Modeling	
  (formalizaNon	
  of	
  steps	
  during	
  development,	
  etc.)	
  

¤ 

¥ 

Export	
  (data	
  export,	
  knowledge	
  export,	
  etc.)	
  

Interoperability	
  between	
  different	
  systems	
  

Tools:	
  
¤ 

Too	
  much,	
  at	
  the	
  moment!	
  Almost	
  any	
  compeNtor	
  proposes	
  
its	
  own	
  tool	
  due	
  to	
  the	
  big	
  expectaNons…	
  

¤ 

Remarkable	
  editors	
  are	
  (just	
  to	
  name	
  a	
  few):	
  Protégé,	
  
TopBraid	
  Composer,	
  Swoop,	
  DOME,	
  NeOn,	
  WSMT,	
  etc.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
P ROTÉGÉ 	
  3.4.4	
  

26	
  

EdiNng	
  funcNons	
  are	
  
split	
  in	
  different	
  tabs:	
  
¥  Metadata:	
  
overview	
  of	
  the	
  
ontology	
  
¥  OWL	
  Classes:	
  
concepts	
  inserNon	
  
and	
  organizaNon	
  
¥  Proper@es:	
  roles	
  
definiNon	
  and	
  
customizaNon	
  
¥  Individuals:	
  object	
  
introducNon	
  and	
  
composiNon	
  
¥  Forms:	
  form	
  
definiNon	
  for	
  data	
  
inserNon	
  
¥  SWRL	
  Rules:	
  rule	
  
definiNon	
  that	
  
triggers	
  on	
  exisNng	
  
data	
  

hUp://protege.stanford.edu/download/registered.html	
  	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
OWL	
  C LASSES 	
  T AB 	
  

27	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
OWL	
  C LASSES 	
  T AB 	
  

28	
  

Class	
  	
  
AnnotaGons	
  
Class	
  	
  
Explorer	
  

(add/	
  
rearrange/	
  
remove	
  classes)	
  

Necessary	
  &	
  Sufficient	
  	
  
Class	
  RestricGons	
  

––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

Necessary	
  	
  
Class	
  RestricGons	
  
	
  
Disjointness	
  
DefiniGons	
  
	
  
14/05/2010	
  
P ROPERTIES 	
  T AB 	
  

29	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
P ROPERTIES 	
  T AB 	
  

30	
  

Property	
  
AnnotaGons	
  
Property	
  
Explorer	
  

(both	
  datatype	
  	
  
and	
  object)	
  

Property	
  
Domain	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

Property	
  
Range	
  

Property	
  
Axioms	
  

14/05/2010	
  
I NDIVIDUALS 	
  T AB 	
  

31	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
I NDIVIDUALS 	
  T AB 	
  

32	
  

Instance	
  	
  
AnnotaGons	
  

Class	
  	
  
Explorer	
  

Instance	
  
Explorer	
  
(add/	
  
rearrange/	
  
remove	
  
instances)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

Inherited	
  	
  
Instance	
  	
  
ProperGes	
  
	
  

14/05/2010	
  
A N 	
  I NTRODUCTORY 	
  E XAMPLE 	
  

33	
  

¥ 

Suppose	
  the	
  domain	
  to	
  capture	
  is	
  the	
  following:	
  
In	
  logic,	
  each	
  statement	
  has	
  a	
  text	
  and	
  has	
  a	
  truth	
  
value	
  depending	
  on	
  the	
  value	
  of	
  its	
  elements.	
  	
  
Statements	
  are	
  idenMfied	
  with	
  unique	
  numeric	
  ids.	
  
Allowed	
  truth	
  values	
  are	
  true	
  and	
  false.	
  
A	
  tautology	
  is	
  a	
  statement	
  that	
  is	
  true	
  by	
  definiMon,	
  
for	
  any	
  value	
  of	
  its	
  elements.	
  
ContradicMons	
  are	
  the	
  opposite	
  of	
  tautologies.	
  

¥ 

For	
  example	
  “A	
  crow	
  flies	
  when	
  the	
  sun	
  goes	
  down.”	
  is	
  
a	
  statement,	
  “All	
  crows	
  are	
  black	
  or	
  there	
  is	
  one	
  that	
  
is	
  not.”	
  is	
  a	
  tautology	
  and	
  “Every	
  crow	
  is	
  either	
  
completely	
  black	
  and	
  completely	
  white.”	
  is	
  a	
  
contradicNon.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
A N 	
  I NTRODUCTORY 	
  E XAMPLE 	
  

34	
  

¥ 

The	
  following	
  text	
  analysis	
  is	
  possible:	
  
In	
  logic,	
  each	
  statement	
  has	
  a	
  text	
  and	
  has	
  a	
  truth	
  
value	
  depending	
  on	
  the	
  value	
  of	
  its	
  elements.	
  	
  
Statements	
  are	
  idenMfied	
  with	
  unique	
  numeric	
  ids.	
  
Allowed	
  truth	
  values	
  are	
  true	
  and	
  false.	
  
A	
  tautology	
  is	
  a	
  statement	
  that	
  is	
  true	
  by	
  definiMon,	
  
for	
  any	
  value	
  of	
  its	
  elements.	
  
ContradicMons	
  are	
  the	
  opposite	
  of	
  tautologies.	
  

¥ 

The	
  idenNfied	
  terms	
  and	
  aUributes	
  should	
  be	
  
reported	
  into	
  a	
  glossary.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
A N 	
  I NTRODUCTORY 	
  E XAMPLE 	
  

35	
  

¥ 

The	
  given	
  text	
  may	
  lead	
  to	
  the	
  following	
  competency	
  
ques@ons:	
  
¤ 

What	
  defines	
  a	
  statement?	
  A	
  text.	
  

¤ 

What	
  idenNfies	
  a	
  statement?	
  A	
  numeric	
  id.	
  

¤ 

What	
  resolves	
  a	
  statement	
  to?	
  A	
  truth	
  value.	
  

¤ 

What	
  truth	
  values	
  are	
  valid?	
  True	
  and	
  false.	
  

¤ 

What	
  is	
  a	
  tautology?	
  A	
  statement	
  always	
  true.	
  

¤ 

What	
  is	
  a	
  contradicNon?	
  The	
  opposite	
  of	
  a	
  tautology.	
  

Note:	
  this	
  approach	
  considers	
  a	
  bit	
  of	
  informaNon	
  at	
  a	
  Nme	
  instead	
  
of	
  the	
  whole	
  at	
  once.	
  Development	
  is	
  easier	
  but	
  end	
  result	
  is	
  less	
  
uniform	
  and	
  reuse	
  is	
  more	
  difficult.	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
A N 	
  I NTRODUCTORY 	
  E XAMPLE 	
  

36	
  

¥ 

Due	
  to	
  the	
  nature	
  and	
  size	
  of	
  the	
  domain,	
  no	
  
exisNng	
  ontology	
  will	
  be	
  used.	
  

¥ 

Create	
  a	
  new	
  ontology	
  and	
  introduce	
  the	
  
idenNfied	
  items:	
  	
  
¤ 

Classes:	
  Statement,	
  Value	
  

¤ 

Proper@es:	
  hasId,	
  hasText,	
  hasValue	
  

¤ 

Instances:	
  a	
  few	
  examples	
  like	
  the	
  proposed	
  one.	
  

¤ 

Values:	
  strings,	
  integers,	
  etc.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
A N 	
  I NTRODUCTORY 	
  E XAMPLE 	
  
R EASONING 	
  T ASKS 	
  

37	
  

¥ 

Under	
  “Reasoning”	
  menu,	
  select	
  “Pellet	
  1.5.2”	
  as	
  
default	
  reasoner	
  and	
  
¤ 

Check	
  the	
  consistency	
  of	
  current	
  ontology	
  

¤ 

Classify	
  automaNcally	
  the	
  classes	
  entered	
  so	
  far	
  

¤ 

Compute	
  inferred	
  types	
  for	
  instances	
  

Note:	
  Ontology	
  should	
  be	
  consistent	
  and	
  explicit.	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
D ETECTING 	
  	
  
C ONSISTENCY 	
  E RRORS 	
  

38	
  

¥ 

SomeNmes	
  it	
  happens	
  that	
  two	
  or	
  more	
  concepts	
  of	
  
the	
  ontology	
  inadvertently	
  conflicts	
  with	
  each	
  other	
  

¥ 

DetecNng	
  and	
  fixing	
  such	
  conflicts	
  may	
  be	
  difficult,	
  
especially	
  when	
  dealing	
  with	
  large	
  projects	
  

¥ 

This	
  is	
  where	
  the	
  consistency	
  check	
  comes	
  in	
  handy!	
  

¥ 

As	
  an	
  example,	
  introduce	
  Tautology	
  as	
  a	
  top-­‐level	
  
class	
  restricNon	
  that	
  hasValue	
  only	
  True	
  and	
  
ContradicGon	
  as	
  a	
  Tautology	
  that	
  instead	
  hasValue	
  
only	
  False	
  	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
39	
  

D ETECTING 	
  	
  
C ONSISTENCY 	
  E RRORS 	
  
If	
  you	
  run	
  the	
  consistency	
  
check	
  task	
  again,	
  the	
  
inconsistency	
  is	
  detected	
  and	
  
highlighted	
  in	
  red!	
  
To	
  fix	
  the	
  error,	
  you	
  have	
  to	
  
idenNfy	
  the	
  colliding	
  
concepts	
  in	
  the	
  editor	
  panel	
  
of	
  inconsistent	
  class	
  or	
  
property	
  and	
  modify	
  them	
  
properly	
  

¥ 

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

¥ 

¥ 

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

An	
  extension	
  which	
  directly	
  
idenNfies	
  the	
  colliding	
  
concepts	
  is	
  being	
  discussed	
  
14/05/2010	
  
40	
  

D ETECTING 	
  	
  
C ONSISTENCY 	
  E RRORS 	
  
¥ 

¥ 

In	
  this	
  case,	
  the	
  error	
  is	
  due	
  to	
  the	
  
definiNon	
  of	
  ContradicGon:	
  	
  
• 	
  hasValue	
  only	
  False	
  
• 	
  hasValue	
  only	
  True	
  (inherited)	
  
and	
  
• 	
  True	
  disjoint	
  with	
  False	
  	
  
	
  
The	
  error	
  is	
  fixed	
  by	
  simply	
  staNng	
  that	
  
it	
  is	
  a	
  Statement	
  and	
  not	
  a	
  Tautology!	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

If	
  you	
  run	
  the	
  consistency	
  
check	
  task	
  again,	
  the	
  
inconsistency	
  is	
  detected	
  and	
  
highlighted	
  in	
  red!	
  
To	
  fix	
  the	
  error,	
  you	
  have	
  to	
  
idenNfy	
  the	
  colliding	
  
concepts	
  in	
  the	
  editor	
  panel	
  
of	
  inconsistent	
  class	
  or	
  
property	
  and	
  modify	
  them	
  
properly	
  

¥ 

An	
  extension	
  which	
  directly	
  
idenNfies	
  the	
  colliding	
  
concepts	
  is	
  being	
  discussed	
  
14/05/2010	
  
C LASSIFYING 	
  C LASSES 	
  	
  
IN 	
  T AXONOMIES 	
  

41	
  

¥ 

Despite	
  being	
  top-­‐level	
  classes,	
  Tautology	
  and	
  
ContradicGon	
  are	
  somehow	
  related	
  with	
  
Statement	
  	
  

¥ 

The	
  classify	
  taxonomy	
  task	
  successfully	
  
recognizes	
  such	
  dependency	
  and	
  rearrange	
  them	
  
as	
  sub-­‐classes	
  of	
  Statement	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
C LASSIFYING 	
  C LASSES 	
  	
  
IN 	
  T AXONOMIES 	
  

42	
  

¥ 

Despite	
  being	
  top-­‐level	
  classes,	
  Tautology	
  and	
  
ContradicGon	
  are	
  somehow	
  related	
  with	
  
Statement	
  	
  

¥ 

The	
  classify	
  taxonomy	
  task	
  successfully	
  
recognizes	
  such	
  dependency	
  and	
  rearrange	
  them	
  
as	
  sub-­‐classes	
  of	
  Statement	
  
This	
  is	
  due	
  to	
  the	
  
fact	
  that	
  they	
  
both	
  use	
  
hasValue	
  
property	
  whose	
  
domain	
  is	
  
actually	
  
Statement	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
I NFERRING 	
  T YPES 	
   FOR 	
  
I NSTANCES 	
  

43	
  

¥ 

Having	
  introduced	
  instances	
  that	
  appear	
  to	
  be	
  a	
  
Tautology	
  and	
  a	
  ContradicGon,	
  we	
  expect	
  that	
  the	
  
compute	
  inferred	
  types	
  task	
  recognizes	
  them	
  
accordingly…	
  

¥ 

…but	
  all	
  the	
  instances	
  are	
  sNll	
  reported	
  only	
  as	
  
Statements!	
  What’s	
  wrong?	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
I NFERRING 	
  T YPES 	
   FOR 	
  
I NSTANCES 	
  

44	
  

¥ 

Let’s	
  have	
  another	
  try:	
  	
  
Introduce	
  DefinedStatement	
  as	
  a	
  top-­‐level	
  restricNon	
  
class	
  that	
  hasValue	
  some	
  (True	
  or	
  False)	
  and	
  run	
  the	
  
compute	
  inferred	
  types	
  task	
  again…	
  

¥ 

…this	
  Nme	
  it	
  seems	
  to	
  work!	
  What’s	
  wrong?	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
O PEN 	
  W ORLD 	
   VS .	
  C LOSE 	
  W ORLD 	
  
A SSUMPTION 	
  

45	
  

¥ 

Unlike	
  Prolog,	
  SQL	
  and	
  many	
  other	
  languages,	
  OWL	
  
(and	
  DL	
  in	
  general)	
  adopts	
  the	
  Open	
  World	
  
AssumpGon	
  instead	
  of	
  the	
  Close	
  World	
  AssumpGon	
  
¤ 

¤ 

¥ 

CWA	
  implies	
  that	
  everything	
  not	
  explicitly	
  asserted	
  
is	
  false,	
  	
  
OWA	
  states	
  that	
  we	
  cannot	
  speculate	
  on	
  something	
  	
  
that	
  is	
  not	
  explicitly	
  asserted	
  since	
  it	
  is	
  undefined	
  

Ex:	
  asserNng	
  that	
  “Huey,	
  Dewey	
  and	
  Louie	
  are	
  Donald	
  
Duck’s	
  nephews”	
  means	
  that	
  Donald	
  Duck	
  has	
  no	
  
other	
  nephews	
  in	
  CWA,	
  while	
  this	
  is	
  not	
  due	
  in	
  OWA	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
O PEN 	
  W ORLD 	
   VS .	
  C LOSE 	
  
W ORLD 	
  A SSUMPTION 	
  

46	
  

¥ 

Due	
  to	
  the	
  Open	
  World	
  AssumpNon,	
  every	
  restricNon	
  involving	
  
the	
  keywords	
  only,	
  exactly	
  and	
  max	
  cannot	
  help	
  inferring	
  types	
  
for	
  instances	
  	
  

¥ 

The	
  reasoner,	
  in	
  fact,	
  cannot	
  perform	
  such	
  inference	
  because	
  it	
  
suppose	
  the	
  presence	
  of	
  informaNon	
  that	
  may	
  violate	
  the	
  
restricNons	
  even	
  if	
  it	
  is	
  not	
  aware	
  of	
  it	
  

¥ 

This	
  limitaNon	
  is	
  overcome	
  by	
  introducing	
  the	
  so-­‐called	
  Closure	
  
Axioms	
  involving	
  
¤ 

The	
  definiNon	
  of	
  classes	
  with	
  the	
  same	
  necessary	
  restricNons	
  	
  

¤ 

The	
  introducNon	
  of	
  instances	
  as	
  members	
  of	
  such	
  classes	
  

Note:	
  This	
  method	
  makes	
  the	
  model	
  correct	
  but	
  some	
  aUempts	
  of	
  
deducing	
  things	
  become	
  quite	
  useless…	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
47	
  

O PEN 	
  W ORLD 	
   VS .	
  C LOSE 	
  
W ORLD 	
  A SSUMPTION 	
  

Inferred	
  types	
  for	
  
instances	
  are	
  
correctly	
  recognized	
  
a_er	
  the	
  introducNon	
  
of	
  closure	
  axioms	
  
Also	
  note	
  the	
  final	
  
taxonomy	
  for	
  the	
  
model	
  as	
  classified	
  by	
  
the	
  reasoner	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
RDF	
  &	
  SPARQL	
  Q UERIES 	
  

48	
  

¥ 

Any	
  RDF	
  graph	
  is	
  a	
  collecNon	
  of	
  triples:	
  
subject	
  

predicate	
  

object	
  

¥ 

Each	
  part	
  of	
  the	
  triples	
  is	
  said	
  node	
  	
  

¥ 

Nodes	
  referring	
  to	
  classes,	
  properNes	
  or	
  instances	
  are	
  
said	
  resources	
  

¥ 

Resources	
  are	
  represented	
  with	
  URIs,	
  which	
  can	
  be	
  
abbreviated	
  as	
  prefixed	
  names	
  

¥ 

Objects	
  can	
  also	
  be	
  literals	
  (strings,	
  integers,	
  
booleans,	
  etc.)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
RDF	
  &	
  SPARQL	
  Q UERIES 	
  

49	
  

Every	
  SPARQL	
  query	
  comprises:	
  
Prefix	
  declara@on	
  to	
  abbreviate	
  URIs	
  (opt.)	
  

¥ 

Dataset	
  defini@on	
  to	
  include	
  RDFs	
  	
  (opt.)	
  

¥ 

Result	
  clause	
  to	
  state	
  expected	
  data	
  

¥ 

Query	
  paern	
  to	
  specify	
  context	
  to	
  query	
  

¥ 

Solu@on	
  modifiers	
  to	
  rearrange	
  results	
  (opt.)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

SPARQL	
  query	
  

¥ 

14/05/2010	
  
RDF	
  &	
  SPARQL	
  Q UERIES 	
  
Every	
  SPARQL	
  query	
  comprises:	
  
	
  
#	
  prefix	
  declarations	
  	
  
PREFIX	
  foo:	
  <http://example.com/resources/>	
  	
  
...	
  	
  
#	
  dataset	
  definition	
  	
  
FROM	
  ...	
  	
  
#	
  result	
  clause	
  	
  
SELECT	
  ...	
  	
  
#	
  query	
  pattern	
  	
  
WHERE	
  {	
  	
  
	
  	
  	
  	
  	
  ...	
  	
  
}	
  	
  
#	
  solution	
  modifiers	
  	
  
ORDER	
  BY	
  ...	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

SPARQL	
  query	
  

50	
  

14/05/2010	
  
51	
  

RDF	
  &	
  SPARQL	
  Q UERIES 	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  persons	
  in	
  current	
  ontology	
  
	
  
SELECT	
  ?name	
  
WHERE	
  {	
  
	
  	
  	
  	
  ?person	
  :hasName	
  ?name	
  .	
  
}	
  	
  
	
  
¥ 
SPARQL	
  variables	
  start	
  with	
  a	
  ?	
  and	
  can	
  match	
  any	
  node	
  
(resource	
  or	
  literal)	
  in	
  the	
  RDF	
  dataset	
  
¥ 
Triple	
  paUerns	
  are	
  just	
  like	
  triples,	
  except	
  that	
  its	
  parts	
  can	
  be	
  
replaced	
  with	
  variables	
  
¥ 
Queries	
  may	
  have	
  several	
  triple	
  paUerns,	
  each	
  ending	
  with	
  .	
  	
  
¥ 
SELECT	
  returns	
  a	
  table	
  of	
  values	
  that	
  saNsfy	
  the	
  query	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
52	
  

RDF	
  &	
  SPARQL	
  Q UERIES 	
  

FOAF	
  Ontology	
  
¥ Revolves	
  

around	
  the	
  
class	
  Person	
  

¥ Aggregates	
  

data	
  around	
  
persons,	
  in	
  
terms	
  of	
  both	
  
resources	
  and	
  
literals	
  

¥ Associates	
  

persons,	
  each	
  
to	
  another	
  

	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
53	
  

RDF	
  &	
  SPARQL	
  Q UERIES 	
  

FOAF	
  Ontology	
  
¥ Revolves	
  

around	
  the	
  
class	
  Person	
  

¥ Aggregates	
  

data	
  around	
  
persons,	
  in	
  
terms	
  of	
  both	
  
resources	
  and	
  
literals	
  

¥ Associates	
  

persons,	
  each	
  
to	
  another	
  

	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
54	
  

P REFIX 	
  D ECLARATION 	
  
Ex.: 	
  Find	
  all	
  the	
  people	
  that	
  have	
  name	
  and	
  email	
  address	
  using	
  the	
  external	
  
FOAF	
  (Friend	
  of	
  a	
  Friend)	
  	
  ontology	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  *	
  
WHERE	
  {	
  
	
  ?person	
  foaf:name	
  ?name	
  ;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  foaf:mbox	
  ?email	
  .	
  #	
  ?person	
  foaf:mbox	
  ?email	
  .	
  
}	
  	
  
	
  
¥ 
The	
  *	
  selects	
  all	
  the	
  variables	
  that	
  are	
  menNoned	
  in	
  the	
  query	
  
¥ 
The	
  ;	
  allows	
  two	
  consecuNve	
  triple	
  paUerns	
  to	
  share	
  the	
  subject	
  	
  
¥ 
MulNple	
  triple	
  paUerns	
  with	
  the	
  same	
  subject	
  explore	
  mulNple	
  properNes	
  
about	
  the	
  resource	
  at	
  the	
  same	
  Gme	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
55	
  

D ATASET 	
  D EFINITION 	
  
Ex.: 	
  Find	
  the	
  homepage	
  of	
  anyone	
  known	
  by	
  	
  Tim	
  Berners-­‐Lee	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
PREFIX	
  card:	
  <http://www.w3.org/People/Berners-­‐Lee/card#>	
  
SELECT	
  ?homepage	
  
FROM	
  <http://www.w3.org/People/Berners-­‐Lee/card>	
  
WHERE	
  {	
  
	
  card:i	
  foaf:knows	
  ?known	
  .	
  
	
  ?known	
  foaf:homepage	
  ?homepage	
  .	
  
}	
  	
  
	
  
¥ 
FROM	
  	
  allows	
  to	
  specify	
  which	
  dataset	
  (instances)	
  to	
  consider	
  
¥ 
Two	
  consecuNve	
  triple	
  paUerns	
  sharing	
  a	
  variable	
  as	
  object	
  and	
  subject	
  
respecNvely	
  allows	
  to	
  traverse	
  	
  links	
  in	
  the	
  graph	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
R ESULT 	
  C LAUSE 	
  

56	
  

¥ 

This	
  is	
  the	
  most	
  important	
  secNon	
  of	
  SPARQL	
  
queries	
  together	
  with	
  the	
  other	
  non-­‐opNonal	
  
secNon	
  Query	
  PaUern	
  

¥ 

Several	
  ways	
  to	
  customize	
  it:	
  
¤ 

Alterna@ves:	
  CONSTRUCT,	
  ASK,	
  DESCRIBE	
  

¤ 

Modifiers:	
  DISTINCT	
  

¤ 

Aggregate	
  func@ons:	
  COUNT,	
  MIN,	
  MAX,	
  SUM,	
  etc.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
57	
  

R ESULT 	
  C LAUSE :	
  DISTINCT	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  persons	
  with	
  an	
  email	
  or	
  an	
  homepage	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  DISTINCT	
  ?name	
  
WHERE	
  {	
  
	
  {	
  ?person	
  foaf:mbox	
  ?mbox	
  }	
  
	
  	
  	
  UNION	
  
	
  {	
  ?person	
  foaf:homepage	
  ?homepage	
  }	
  
	
  ?person	
  foaf:name	
  ?name	
  .	
  	
  
}	
  	
  
	
  
¥ 
If	
  a	
  person	
  has	
  both	
  email	
  and	
  homepage,	
  its	
  name	
  will	
  appear	
  	
  twice:	
  
DISTINCT	
  allows	
  to	
  remove	
  duplicates	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
R ESULT 	
  C LAUSE :	
  
CONSTRUCT	
  

58	
  

Ex.: 	
  Convert	
  all	
  the	
  FOAF	
  data	
  from	
  Tim	
  Berners-­‐Lee	
  ontology	
  into	
  VCard	
  data	
  
	
  
PREFIX	
  vCard:	
  <http://www.w3.org/2001/vcard-­‐rdf/3.0#>	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
CONSTRUCT	
  {	
  	
  	
  
	
  	
  ?X	
  vCard:FN	
  ?name	
  .	
  
	
  	
  ?X	
  vCard:URL	
  ?url	
  .	
  
	
  	
  ?X	
  vCard:TITLE	
  ?title	
  .	
  
}	
  
FROM	
  <http://www.w3.org/People/Berners-­‐Lee/card>	
  
WHERE	
  {	
  	
  
	
  	
  OPTIONAL	
  {	
  ?X	
  foaf:name	
  ?name	
  .	
  	
  	
  	
  FILTER	
  isLiteral(?name)	
  .	
  }	
  
	
  	
  OPTIONAL	
  {	
  ?X	
  foaf:homepage	
  ?url	
  .	
  FILTER	
  isURI(?url)	
  .	
  }	
  
	
  	
  OPTIONAL	
  {	
  ?X	
  foaf:title	
  ?title	
  .	
  	
  FILTER	
  isLiteral(?title)	
  .	
  }	
  
}	
  
	
  
¥ 
CONSTRUCT	
  returns	
  an	
  RDF	
  graph	
  instead	
  of	
  a	
  table	
  of	
  values	
  
¥ 
The	
  equivalent	
  SELECT	
  query	
  is	
  performed	
  and	
  the	
  returned	
  values	
  are	
  used	
  to	
  fill	
  the	
  
template	
  
¥ 
Query	
  paUerns	
  involving	
  unbound	
  variables	
  are	
  discarded	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
59	
  

R ESULT 	
  C LAUSE :	
  ASK	
  
Ex.: 	
  Check	
  out	
  if	
  Tim	
  Berners-­‐Lee	
  knows	
  me	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
PREFIX	
  card:	
  <http://www.w3.org/People/Berners-­‐Lee/card#>	
  
ASK	
  	
  
FROM	
  <http://www.w3.org/People/Berners-­‐Lee/card>	
  
WHERE	
  {	
  	
  
	
  card:i	
  foaf:knows	
  :stefano	
  .	
  
}	
  
	
  
¥ 
ASK	
  returns	
  true	
  or	
  false	
  depending	
  on	
  the	
  query	
  paUern	
  	
  
¥ 
WHERE	
  is	
  always	
  opNonal	
  (ASK	
  queries	
  usually	
  drop	
  it	
  to	
  ease	
  the	
  reading)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
60	
  

R ESULT 	
  C LAUSE :	
  DESCRIBE	
  
Ex.: 	
  Retrieve	
  any	
  piece	
  of	
  informaNon	
  about	
  the	
  Ford	
  Motor	
  Company	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
DESCRIBE	
  ?ford	
  	
  
WHERE	
  {	
  
	
  	
  ?ford	
  foaf:name	
  "FORD	
  MOTOR	
  CO"	
  .	
  
}	
  
	
  
¥ 
DESCRIBE	
  returns	
  all	
  the	
  triples	
  involving	
  the	
  given	
  resource(s)	
  
¥ 
Returned	
  informaGon	
  may	
  vary	
  depending	
  on	
  the	
  implementaNon	
  	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
61	
  

R ESULT 	
  C LAUSE :	
  	
  
A GGREGATE 	
  F UNCTIONS 	
  
Ex.: 	
  What	
  are	
  the	
  top	
  interests	
  of	
  LiveJournal	
  users	
  interested	
  in	
  Harry	
  PoUer?	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  ?interest	
  COUNT(*)	
  AS	
  ?count	
  	
  
WHERE	
  {	
  
	
  	
  	
  	
  ?person	
  foaf:interest	
  <http://www.livejournal.com/
interests.bml?int=harry+potter>	
  .	
  
	
  	
  	
  	
  ?person	
  foaf:interest	
  ?interest	
  
}	
  
GROUP	
  BY	
  ?interest	
  ORDER	
  BY	
  DESC(COUNT(*))	
  LIMIT	
  10	
  
	
  
¥ 
Only	
  supported	
  by	
  some	
  SPARQL	
  implementaNons	
  
¥ 
Aggregate	
  funcNons	
  calculate	
  single	
  values	
  from	
  sets	
  of	
  results	
  
¥ 
They	
  include:	
  COUNT,	
  MIN,	
  MAX,	
  SUM,	
  etc.	
  
¥ 
SomeNmes	
  used	
  with	
  clauses	
  that	
  breaks	
  the	
  results	
  into	
  groups	
  before	
  	
  
applying	
  the	
  aggregate	
  funcGon(s)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
Q UERY 	
  P ATTERN 	
  

62	
  

¥ 

As	
  said,	
  this	
  non-­‐opNonal	
  secNon	
  plays	
  an	
  
important	
  role	
  in	
  SPARQL	
  queries	
  together	
  with	
  
Result	
  Clause	
  

¥ 

Several	
  ways	
  to	
  customize	
  it:	
  
¤ 

Operators:	
  FILTER,	
  OPTIONAL,	
  UNION	
  

¤ 

Named	
  Graphs:	
  GRAPH	
  

¤ 

Nested	
  clauses:	
  SELECT,	
  etc.	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
63	
  

Q UERY 	
  P ATTERN :	
  FILTER	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  person	
  located	
  only	
  near	
  a	
  given	
  geospaNal	
  point	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
PREFIX	
  geo:	
  <http://www.geonames.org/ontology/
ontology_v2.0_Full.rdf>	
  
SELECT	
  ?name	
  
WHERE	
  {	
  
	
  	
  	
  	
  ?person	
  foaf:name	
  ?name	
  .	
  	
  
	
  	
  	
  	
  ?person	
  foaf:based_near	
  ?loc	
  .	
  	
  
	
  	
  	
  	
  ?loc	
  geo:lat	
  ?lat	
  .	
  	
  
	
  	
  	
  	
  ?loc	
  geo:long	
  ?long	
  .	
  	
  
	
  	
  	
  	
  FILTER	
  (	
  ?lat	
  >	
  50	
  &&	
  ?lat	
  <	
  100	
  &&	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ?long	
  >	
  25	
  &&	
  ?long	
  <	
  75	
  )	
  .	
  	
  
}	
  
	
  
¥ 
FILTER	
  uses	
  boolean	
  contraints	
  to	
  ignore	
  unwanted	
  results	
  
¥ 
It	
  may	
  lead	
  to	
  duplicates	
  in	
  results	
  (how	
  to	
  handle	
  that?)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
Q UERY 	
  P ATTERN :	
  FILTER	
  

64	
  

¥ 

Many	
  operators	
  are	
  allowed	
  in	
  a	
  FILTER	
  declaraNons:	
  
¤ 

Logical:	
  !,	
  &&,	
  ||	
  

¤ 

Math:	
  +,	
  -­‐,	
  *,	
  /	
  

¤ 

Comparison:	
  =,	
  !=,	
  >,	
  <,	
  etc.	
  

¤ 

SPARQL	
  tests:	
  isURI,	
  isBlank,	
  isLiteral,	
  bound	
  

¤ 

SPARQL	
  accessors:	
  str,	
  lang,	
  datatype	
  

¤ 

Other:	
  sameTerm,	
  langMatches,	
  regex	
  

	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
65	
  

Q UERY 	
  P ATTERN :	
  OPTIONAL	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  persons	
  along	
  with	
  their	
  image,	
  homepage	
  and	
  
locaNon	
  
	
  
#	
  The	
  wrong	
  way...	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  ?name	
  ?img	
  ?home	
  ?loc	
  
WHERE	
  {	
  
	
  	
  	
  	
  ?person	
  foaf:name	
  ?name	
  ;	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  foaf:img	
  ?img	
  .	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  foaf:homepage	
  ?home	
  .	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  foaf:based_near	
  ?loc	
  .	
  	
  
}	
  
	
  
¥ 
This	
  query	
  does	
  not	
  return	
  all	
  the	
  expected	
  values:	
  what	
  is	
  wrong?	
  
¥ 
The	
  paUern	
  above	
  requires	
  every	
  piece	
  of	
  data	
  to	
  be	
  available…	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
66	
  

Q UERY 	
  P ATTERN :	
  OPTIONAL	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  persons	
  along	
  with	
  their	
  image,	
  homepage	
  and	
  
locaNon	
  
	
  
#	
  The	
  right	
  way...	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  ?name	
  ?img	
  ?home	
  ?loc	
  
WHERE	
  {	
  
	
  	
  	
  	
  ?person	
  foaf:name	
  ?name	
  ;	
  	
  
	
  	
  	
  	
  OPTIONAL	
  {	
  ?person	
  foaf:img	
  ?img	
  }	
  	
  
	
  	
  	
  	
  OPTIONAL	
  {	
  ?person	
  foaf:homepage	
  ?home	
  }	
  	
  
	
  	
  	
  	
  OPTIONAL	
  {	
  ?person	
  foaf:based_near	
  ?loc	
  }	
  	
  
}	
  
	
  
¥ 
Not	
  everyone	
  has	
  an	
  image,	
  homepage	
  or	
  locaNon	
  
¥ 
OPTIONAL	
  tries	
  to	
  match	
  the	
  paUern,	
  but	
  does	
  not	
  fail	
  the	
  whole	
  query	
  in	
  the	
  
specific	
  match	
  fails	
  
¥ 
In	
  case	
  of	
  failure,	
  any	
  unassigned	
  variable	
  in	
  the	
  paUern	
  remain	
  unbound	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
67	
  

Q UERY 	
  P ATTERN :	
  UNION	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  persons	
  with	
  an	
  email	
  or	
  an	
  homepage	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  DISTINCT	
  ?name	
  
WHERE	
  {	
  
	
  {	
  ?person	
  foaf:mbox	
  ?mbox	
  }	
  
	
  	
  	
  UNION	
  
	
  {	
  ?person	
  foaf:homepage	
  ?homepage	
  }	
  
	
  ?person	
  foaf:name	
  ?name	
  .	
  	
  
}	
  	
  
	
  
¥ 
UNION	
  forms	
  a	
  disjuncNon	
  of	
  two	
  graph	
  paUerns	
  
¥ 
SoluNon	
  to	
  both	
  sides	
  are	
  included	
  in	
  the	
  results	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
68	
  

Q UERY 	
  P ATTERN :	
  GRAPH	
  
Ex.: 	
  Find	
  the	
  name	
  of	
  all	
  the	
  people	
  involved	
  in	
  at	
  least	
  three	
  disNnct	
  events	
  
	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
PREFIX	
  g:	
  <http://data.example.com/graphs/>	
  
SELECT	
  DISTINCT	
  ?name	
  
FROM	
  NAMED	
  g:g1	
  
FROM	
  NAMED	
  g:g2	
  
FROM	
  NAMED	
  g:g3	
  
WHERE	
  {	
  
	
  	
  	
  	
  ?person	
  foaf:name	
  ?name	
  .	
  
	
  	
  	
  	
  GRAPH	
  ?g1	
  {	
  ?person	
  a	
  foaf:Person	
  }	
  
	
  	
  	
  	
  GRAPH	
  ?g2	
  {	
  ?person	
  a	
  foaf:Person	
  }	
  
	
  	
  	
  	
  GRAPH	
  ?g3	
  {	
  ?person	
  a	
  foaf:Person	
  }	
  
	
  	
  	
  	
  FILTER	
  (	
  ?g1	
  !=	
  ?g2	
  &&	
  ?g1	
  !=	
  ?g3	
  &&	
  ?g2	
  !=	
  ?g3	
  )	
  .	
  
}	
  
	
  
¥ 
So	
  far	
  queries	
  have	
  been	
  again	
  a	
  single	
  graph	
  (default	
  graph)	
  
¥ 
AddiNonal	
  graphs	
  may	
  be	
  added	
  with	
  FROM	
  NAMED	
  clauses	
  
¥ 
GRAPH	
  then	
  allows	
  porNons	
  of	
  the	
  query	
  to	
  match	
  against	
  the	
  named	
  graphs	
  
¥ 
a	
  is	
  a	
  shortcut	
  for	
  the	
  rdf:type	
  predicate	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
69	
  

Q UERY 	
  P ATTERN :	
  GRAPH	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
Q UERY 	
  P ATTERN :	
  	
  
N ESTED 	
  C LAUSES 	
  

70	
  

Ex.:

	
  Retrieve	
  the	
  second	
  page	
  of	
  names	
  and	
  emails	
  of	
  people	
  in	
  Tim	
  Berners-­‐Lee's	
  FOAF	
  
file,	
  given	
  that	
  each	
  page	
  has	
  10	
  people	
  

	
  
PREFIX	
  foaf:	
  <http://xmlns.com/foaf/0.1/>	
  
SELECT	
  ?name	
  ?email	
  
FROM	
  <http://www.w3.org/People/Berners-­‐Lee/card>	
  
WHERE	
  {	
  
	
  	
  {	
  SELECT	
  DISTINCT	
  ?person	
  ?name	
  	
  
	
  	
  	
  	
  WHERE	
  {	
  	
  
	
  	
  	
  	
  	
  	
  ?person	
  foaf:name	
  ?name	
  	
  
	
  	
  	
  	
  }	
  ORDER	
  BY	
  ?name	
  LIMIT	
  10	
  OFFSET	
  10	
  	
  	
  
	
  	
  }	
  
	
  	
  OPTIONAL	
  {	
  ?person	
  foaf:mbox	
  ?email	
  }	
  
}	
  
	
  
¥ 
The	
  sub-­‐query	
  limits	
  the	
  amount	
  of	
  person	
  to	
  consider	
  in	
  advance	
  instead	
  of	
  
pruning	
  the	
  returned	
  values	
  
¥ 
Not	
  available	
  on	
  all	
  the	
  implementaNons	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
S OLUTION 	
  M ODIFIERS 	
  

71	
  

¥ 

SoluNon	
  modifiers	
  affect	
  the	
  values	
  returned	
  by	
  
the	
  query	
  in	
  several	
  ways	
  

¥ 

Two	
  class	
  of	
  soluNon	
  modifiers	
  are	
  available:	
  
¤ 

¤ 

¥ 

ORDER	
  BY	
  is	
  used	
  to	
  sort	
  the	
  soluGon	
  on	
  values	
  
of	
  one	
  or	
  more	
  variables	
  
OFFSET	
  and	
  LIMIT	
  are	
  used	
  to	
  take	
  a	
  slice	
  of	
  
the	
  soluGon	
  

Specific	
  examples	
  have	
  been	
  introduced	
  in	
  
previous	
  secNons	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
F UTURE 	
  D IRECTIONS 	
  	
  
FOR 	
  SPARQL	
  

72	
  

¥ 

Unfortunately,	
  a	
  few	
  pieces	
  of	
  SPARQL	
  are	
  not	
  yet	
  
standard:	
  full-­‐text	
  search,	
  parameters	
  passing,	
  
querying	
  more	
  graphs	
  at	
  a	
  Mme,	
  direct	
  support	
  of	
  XML	
  

¥ 

A	
  new	
  version	
  of	
  SPARQL	
  was	
  chartered	
  in	
  March	
  
2009;	
  planned	
  features	
  are:	
  insert/update/delete	
  
capabiliMes,	
  negaMon,	
  improvements	
  on	
  aggregate	
  
funcMons,	
  query	
  with	
  constants/funcMons/	
  
expressions,	
  standard	
  for	
  sub-­‐query	
  

¥ 

The	
  following	
  features	
  are	
  also	
  being	
  discussed:	
  
interacMon	
  with	
  OWL/RDF-­‐S/RIF,	
  recursive	
  property	
  
paths,	
  basic	
  federated	
  query	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
SPARQL	
   SUCCEEDS 	
  	
  
WHERE 	
  OWL	
   FAILS ?	
  

73	
  

¥ 

SPARQL	
  is	
  complementary	
  to	
  OWL	
  and	
  is	
  based	
  on	
  Closed	
  World	
  
AssumpNon	
  	
  

¥ 

Thus	
  it	
  can	
  be	
  used	
  to	
  overcome	
  the	
  limitaNons	
  seen	
  before	
  

Note:	
  SPARQL	
  Query	
  panel	
  can	
  be	
  accessed	
  under	
  “Reasoning”	
  menu	
  with	
  
“Open	
  SPARQL	
  Query	
  panel”	
  command:	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
SPARQL	
   SUCCEDS 	
  	
  
WHERE 	
  OWL	
   FAILS ?	
  

74	
  

Ex.:
	
  Find	
  the	
  text	
  of	
  all	
  the	
  statements	
  that	
  are	
  tautology	
  
	
  
SELECT	
  ?text	
  	
  
WHERE	
  {	
  
	
  	
  #	
  find	
  statements	
  that	
  has	
  value	
  true	
  
	
  	
  ?statement	
  a	
  :Statement	
  ;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  :hasValue	
  True	
  .	
  
	
  	
  OPTIONAL	
  {	
  
	
  	
  	
  	
  #	
  find	
  out	
  if	
  it	
  also	
  has	
  value	
  false,	
  but	
  use	
  a	
  different	
  name	
  
	
  	
  	
  	
  ?statement2	
  a	
  :Statement	
  ;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  :hasValue	
  False	
  .	
  
	
  	
  	
  	
  FILTER	
  (	
  ?statement2	
  =	
  ?statement	
  )	
  .	
  
	
  	
  }	
  
	
  	
  #	
  keep	
  only	
  the	
  statements	
  that	
  failed	
  to	
  have	
  value	
  false	
  
	
  	
  FILTER	
  (	
  !bound(	
  ?statemnt2	
  )	
  )	
  .	
  
	
  	
  ?statement	
  :hasText	
  ?text	
  .	
  
}	
  
	
  
¥ 
Together,	
  OPTIONAL	
  and	
  the	
  !bound(...)	
  allow	
  to	
  query	
  for	
  things	
  that	
  are	
  not	
  asserted	
  in	
  the	
  dataset	
  
¥ 
A	
  similar	
  technique	
  allows	
  for	
  other	
  types	
  of	
  universally	
  quanNfied	
  queries	
  (such	
  as	
  max)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
E XERCISE 	
  1	
  

75	
  

Ex.: 	
  Design	
  an	
  ontology	
  containing	
  statements	
  represenNng	
  the	
  
following	
  sentences:	
  	
  
	
  
¥ 
A	
  doll	
  is	
  a	
  kind	
  of	
  toy	
  	
  
¥ 
Young	
  women	
  are	
  defined	
  as	
  young	
  persons	
  that	
  are	
  also	
  
female	
  	
  
¥ 
A	
  young	
  person	
  cannot	
  be	
  both	
  a	
  young	
  man	
  and	
  a	
  young	
  
woman	
  	
  
¥ 
Young	
  persons	
  are	
  either	
  young	
  men	
  or	
  young	
  women	
  	
  
¥ 
Lenore	
  and	
  Emily	
  are	
  famous	
  dolls	
  	
  
¥ 
All	
  young	
  women	
  play	
  with	
  some	
  doll	
  	
  
¥ 
Young	
  women	
  play	
  only	
  with	
  famous	
  dolls	
  	
  
¥ 
Young	
  men	
  play	
  with	
  at	
  least	
  one	
  toy	
  	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
E XERCISE 	
  1	
  

76	
  

Ex.: 	
  Design	
  an	
  ontology	
  containing	
  statements	
  represenNng	
  the	
  
following	
  sentences:	
  	
  
	
  
¥ 
Clara	
  is	
  a	
  young	
  woman	
  	
  
¥ 
Clara	
  and	
  Laura	
  are	
  different	
  individuals	
  	
  
¥ 
Lalu	
  is	
  the	
  same	
  person	
  as	
  Laura	
  	
  
¥ 
To	
  dress	
  a	
  toy	
  is	
  a	
  special	
  case	
  of	
  playing,	
  where	
  the	
  toy	
  is	
  a	
  doll	
  	
  
¥ 
To	
  be	
  dressed	
  by	
  a	
  young	
  person	
  is	
  the	
  inverse	
  relaNon	
  of	
  a	
  
young	
  person	
  dressing	
  a	
  doll	
  	
  
¥ 
To	
  be	
  ancestor	
  of	
  a	
  person	
  is	
  a	
  transiNve	
  relaNon	
  that	
  holds	
  
between	
  persons	
  	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
E XERCISE 	
  2	
  

77	
  

	
  

	
  Context	
  
	
  An	
  online	
  music	
  database	
  wishes	
  to	
  semanNcally	
  represent	
  their	
  data	
  about	
  musicians,	
  
albums,	
  and	
  performances,	
  in	
  order	
  to	
  be	
  able	
  to	
  provide	
  beUer	
  search	
  funcNons	
  to	
  their	
  
users,	
  i.e.	
  by	
  querying	
  the	
  knowledge	
  base	
  instead	
  of	
  using	
  keyword	
  queries.	
  Below	
  is	
  an	
  
example	
  of	
  what	
  they	
  typically	
  would	
  like	
  to	
  store,	
  and	
  at	
  the	
  boUom	
  you	
  find	
  the	
  
competency	
  quesNons	
  developed	
  as	
  requirements	
  for	
  the	
  ontology.	
  	
  
Story:	
  music	
  and	
  bands	
  	
  
	
  The	
  current	
  configuraMon	
  of	
  the	
  “Red	
  Hot	
  Chili	
  Peppers”	
  are:	
  Anthony	
  Kiedis	
  (vocals),	
  Flea	
  
(bass,	
  trumpet,	
  keyboards,	
  and	
  vocals),	
  John	
  Frusciante	
  (guitar),	
  and	
  Chad	
  Smith	
  (drums).	
  
The	
  line-­‐up	
  has	
  changed	
  a	
  few	
  Mmes	
  during	
  they	
  years,	
  Frusciante	
  replaced	
  Hillel	
  Slovak	
  in	
  
1988,	
  and	
  when	
  Jack	
  Irons	
  len	
  the	
  band	
  he	
  was	
  briefly	
  replaced	
  by	
  D.H.	
  Peligro	
  unMl	
  the	
  
band	
  found	
  Chad	
  Smith.	
  In	
  addiMon	
  to	
  playing	
  guitars	
  for	
  Red	
  hot	
  Chili	
  Peppers	
  Frusciante	
  
also	
  contributed	
  to	
  the	
  band	
  “The	
  Mars	
  Volta”	
  as	
  a	
  vocalist	
  for	
  some	
  Mme.	
  	
  
	
  From	
  September	
  2004,	
  the	
  Red	
  Hot	
  Chili	
  Peppers	
  started	
  recording	
  the	
  album	
  “Stadium	
  
Arcadium”.	
  The	
  album	
  contains	
  28	
  tracks	
  and	
  was	
  released	
  on	
  May	
  5	
  2006.	
  It	
  includes	
  a	
  
track	
  of	
  the	
  song	
  “Hump	
  de	
  Bump”,	
  which	
  was	
  composed	
  in	
  January	
  26,	
  2004.	
  The	
  criMc	
  
Crian	
  HiaL	
  defined	
  the	
  album	
  as	
  "the	
  most	
  ambiMous	
  work	
  in	
  his	
  twenty-­‐three-­‐year	
  
career".	
  On	
  August	
  11	
  (2006)	
  the	
  band	
  gave	
  a	
  live	
  performance	
  in	
  Portland,	
  Oregon	
  (US),	
  
featuring	
  songs	
  from	
  Stadium	
  Arcadium	
  and	
  other	
  albums.	
  	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
E XERCISE 	
  2	
  

78	
  

Competency	
  ques@ons	
  (CQs)	
  and	
  contextual	
  statements	
  of	
  music	
  and	
  bands	
  	
  
1. 
What	
  instruments	
  does	
  a	
  certain	
  person	
  play?	
  	
  
2. 
What	
  are	
  the	
  members	
  of	
  a	
  certain	
  band	
  during	
  a	
  certain	
  Nme	
  period?	
  	
  
3. 
What	
  role	
  does	
  a	
  certain	
  person	
  have	
  in	
  a	
  certain	
  band	
  during	
  a	
  certain	
  Nme?	
  	
  
4. 
During	
  what	
  Nme	
  period	
  was	
  a	
  certain	
  album	
  recorded?	
  	
  
5. 
How	
  many	
  tracks	
  does	
  a	
  parNcular	
  album	
  contain?	
  	
  
6. 
When	
  was	
  a	
  certain	
  album	
  released?	
  	
  
7. 
What	
  song	
  is	
  a	
  specific	
  track	
  a	
  recording	
  of?	
  	
  
8. 
9. 
10. 
11. 
12. 
13. 
14. 

When	
  was	
  a	
  certain	
  song	
  composed?	
  	
  
What	
  does	
  a	
  certain	
  criNc	
  say	
  about	
  a	
  certain	
  album?	
  	
  
When	
  did	
  a	
  certain	
  performance	
  take	
  place?	
  	
  
What	
  songs	
  were	
  played	
  in	
  a	
  certain	
  performance?	
  	
  
Where	
  did	
  a	
  certain	
  performance	
  take	
  place?	
  	
  
In	
  what	
  region	
  is	
  a	
  certain	
  city	
  located?	
  	
  
In	
  what	
  country	
  is	
  a	
  certain	
  region	
  located?	
  	
  

Contextual	
  statement:	
  	
  
¥ 
An	
  album	
  always	
  contains	
  at	
  least	
  one	
  track.	
  	
  
AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
R EFERENCES 	
  

79	
  

¥ 

W3C:	
  
¤ 

¥ 

Protégé:	
  
¤ 

¥ 

hUp://www.w3.org/	
  

hUp://protege.stanford.edu/	
  

OWL:	
  
¤ 
¤ 

¥ 

hUp://www.w3.org/TR/owl-­‐features/	
  
hUp://owl.cs.manchester.ac.uk/tutorials/protegeowltutorial/	
  

SPARQL:	
  
¤ 

hUp://www.w3.org/TR/rdf-­‐sparql-­‐query/	
  

¤ 

hUp://jena.sourceforge.net/ARQ/Tutorial/	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
C ONTACTS 	
  

80	
  

¥ 

If	
  you	
  have	
  any	
  quesNons,	
  please	
  send	
  me	
  an	
  
email	
  or	
  call	
  me:	
  
E-­‐mail:

	
  stefano.bragaglia@unibo.it	
  	
  

Tel:	
  

	
  051-­‐20.93086	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
A N 	
  I NTRODUCTION 	
  	
  
TO 	
  O NTOLOGY 	
  D EVELOPMENT 	
  
Stefano	
  Bragaglia	
  -­‐	
  May	
  14,	
  2010	
  
A DDITIONAL 	
  N OTES 	
  

82	
  

¥ 

Developing	
  an	
  ontology	
  is	
  an	
  iteraGve	
  process:	
  adding	
  
new	
  concepts	
  o_en	
  leads	
  to	
  refactoring	
  

¥ 

It	
  is	
  a	
  good	
  pracNce	
  not	
  to	
  include	
  unneeded	
  concepts	
  
into	
  the	
  ontology	
  (if	
  it	
  ain’t	
  broken,	
  don’t	
  fix	
  it)	
  

¥ 

Some	
  concepts	
  are	
  difficult	
  to	
  express	
  (i.e.:	
  Nme	
  
relaNonships,	
  equivalence,	
  etc.)	
  but	
  can	
  be	
  easily	
  
handled	
  by	
  introducing	
  ad	
  hoc	
  properGes	
  and	
  classes	
  
¤ 

Time	
  relaNonship:	
  TimePeriod	
  with	
  isPrior	
  or	
  isAfer	
  

¤ 

Equivalence:	
  Person	
  with	
  samePerson	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
M ULTIPLE 	
  I NHERITANCE 	
  

83	
  

¥ 

One	
  of	
  the	
  reasons	
  ontologies	
  are	
  so	
  popular	
  is	
  
that	
  they	
  support	
  mulGple	
  inheritance	
  	
  
¤ 

A	
  YoungWoman	
  may	
  be	
  defined	
  as	
  a	
  subclass	
  of	
  
Person,	
  Young	
  and	
  Female	
  

¤ 

This	
  is	
  as	
  powerful	
  as	
  risky,	
  since	
  it	
  o_en	
  collides	
  
with	
  disjointness	
  declaraNons	
  

¤ 

Watch	
  out	
  for	
  inconsistencies!	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
84	
  

M ULTIPLE 	
  I NHERITANCE 	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
T HE 	
  S ITUATION 	
  P ATTERN 	
  

85	
  

¥ 

SomeNmes	
  staNng	
  concepts	
  separately	
  is	
  not	
  enough	
  
since	
  they	
  have	
  to	
  be	
  considered	
  as	
  a	
  whole	
  
¤ 

¥ 

Being	
  member	
  of	
  a	
  certain	
  band	
  during	
  a	
  certain	
  Nme	
  
period	
  is	
  an	
  example	
  

Such	
  a	
  case	
  is	
  generally	
  named	
  SituaNon	
  and	
  requires	
  
the	
  definiNon	
  the	
  context,	
  a	
  class,	
  and	
  several	
  object	
  
properNes	
  linking	
  the	
  context	
  to	
  each	
  concept	
  and	
  vice	
  
versa	
  
¤ 

Given	
  the	
  classes	
  Person,	
  Band	
  and	
  TimePeriod,	
  the	
  
situaNon	
  requires	
  the	
  definiNon	
  of	
  the	
  class	
  Membership	
  
and	
  of	
  the	
  object	
  properNes	
  hasPerson,	
  hasBand	
  and	
  
hasTimePeriod	
  (and	
  their	
  inverse	
  properNes)	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
86	
  

T HE 	
  S ITUATION 	
  P ATTERN 	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
87	
  

T HE 	
  S ITUATION 	
  P ATTERN 	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
88	
  

T HE 	
  S ITUATION 	
  P ATTERN 	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  
C ONTACTS 	
  

89	
  

¥ 

If	
  you	
  have	
  any	
  quesNons,	
  please	
  send	
  me	
  an	
  
email	
  or	
  call	
  me:	
  
E-­‐mail:

	
  stefano.bragaglia@unibo.it	
  	
  

Tel:	
  

	
  051-­‐20.93086	
  

AN	
  INTRODUCTION	
  TO	
  ONTOLOGY	
  DEVELOPMENT	
  

14/05/2010	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Knowledge Graphs and Semantic AI
Introduction to Knowledge Graphs and Semantic AIIntroduction to Knowledge Graphs and Semantic AI
Introduction to Knowledge Graphs and Semantic AISemantic Web Company
 
NewSQL overview, Feb 2015
NewSQL overview, Feb 2015NewSQL overview, Feb 2015
NewSQL overview, Feb 2015Ivan Glushkov
 
Building End-to-End Delta Pipelines on GCP
Building End-to-End Delta Pipelines on GCPBuilding End-to-End Delta Pipelines on GCP
Building End-to-End Delta Pipelines on GCPDatabricks
 
Amazon Redshift: Performance Tuning and Optimization
Amazon Redshift: Performance Tuning and OptimizationAmazon Redshift: Performance Tuning and Optimization
Amazon Redshift: Performance Tuning and OptimizationAmazon Web Services
 
Improving Data Literacy Around Data Architecture
Improving Data Literacy Around Data ArchitectureImproving Data Literacy Around Data Architecture
Improving Data Literacy Around Data ArchitectureDATAVERSITY
 
Machine Learning Model Deployment: Strategy to Implementation
Machine Learning Model Deployment: Strategy to ImplementationMachine Learning Model Deployment: Strategy to Implementation
Machine Learning Model Deployment: Strategy to ImplementationDataWorks Summit
 
Using pySpark with Google Colab & Spark 3.0 preview
Using pySpark with Google Colab & Spark 3.0 previewUsing pySpark with Google Colab & Spark 3.0 preview
Using pySpark with Google Colab & Spark 3.0 previewMario Cartia
 
DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDatabricks
 
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Jeff Z. Pan
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-PresentationShubham Tomar
 
ESWC 2017 Tutorial Knowledge Graphs
ESWC 2017 Tutorial Knowledge GraphsESWC 2017 Tutorial Knowledge Graphs
ESWC 2017 Tutorial Knowledge GraphsPeter Haase
 
Smart Data Slides: Machine Learning - Case Studies
Smart Data Slides: Machine Learning - Case StudiesSmart Data Slides: Machine Learning - Case Studies
Smart Data Slides: Machine Learning - Case StudiesDATAVERSITY
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4jNeo4j
 
Ontologies and semantic web
Ontologies and semantic webOntologies and semantic web
Ontologies and semantic webStanley Wang
 
What Is RDD In Spark? | Edureka
What Is RDD In Spark? | EdurekaWhat Is RDD In Spark? | Edureka
What Is RDD In Spark? | EdurekaEdureka!
 
Architect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh ArchitectureArchitect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh ArchitectureDatabricks
 
From Business Hindsight to Foresight with Azure Synapse Analytics
From Business Hindsight to Foresight with Azure Synapse AnalyticsFrom Business Hindsight to Foresight with Azure Synapse Analytics
From Business Hindsight to Foresight with Azure Synapse AnalyticsKorcomptenz Inc
 

Was ist angesagt? (20)

Introduction to Knowledge Graphs and Semantic AI
Introduction to Knowledge Graphs and Semantic AIIntroduction to Knowledge Graphs and Semantic AI
Introduction to Knowledge Graphs and Semantic AI
 
NewSQL overview, Feb 2015
NewSQL overview, Feb 2015NewSQL overview, Feb 2015
NewSQL overview, Feb 2015
 
Building End-to-End Delta Pipelines on GCP
Building End-to-End Delta Pipelines on GCPBuilding End-to-End Delta Pipelines on GCP
Building End-to-End Delta Pipelines on GCP
 
Amazon Redshift: Performance Tuning and Optimization
Amazon Redshift: Performance Tuning and OptimizationAmazon Redshift: Performance Tuning and Optimization
Amazon Redshift: Performance Tuning and Optimization
 
Improving Data Literacy Around Data Architecture
Improving Data Literacy Around Data ArchitectureImproving Data Literacy Around Data Architecture
Improving Data Literacy Around Data Architecture
 
Machine Learning Model Deployment: Strategy to Implementation
Machine Learning Model Deployment: Strategy to ImplementationMachine Learning Model Deployment: Strategy to Implementation
Machine Learning Model Deployment: Strategy to Implementation
 
Introduction to Amazon DynamoDB
Introduction to Amazon DynamoDBIntroduction to Amazon DynamoDB
Introduction to Amazon DynamoDB
 
Semantic search
Semantic searchSemantic search
Semantic search
 
Using pySpark with Google Colab & Spark 3.0 preview
Using pySpark with Google Colab & Spark 3.0 previewUsing pySpark with Google Colab & Spark 3.0 preview
Using pySpark with Google Colab & Spark 3.0 preview
 
Data Product Architectures
Data Product ArchitecturesData Product Architectures
Data Product Architectures
 
DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-Presentation
 
ESWC 2017 Tutorial Knowledge Graphs
ESWC 2017 Tutorial Knowledge GraphsESWC 2017 Tutorial Knowledge Graphs
ESWC 2017 Tutorial Knowledge Graphs
 
Smart Data Slides: Machine Learning - Case Studies
Smart Data Slides: Machine Learning - Case StudiesSmart Data Slides: Machine Learning - Case Studies
Smart Data Slides: Machine Learning - Case Studies
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 
Ontologies and semantic web
Ontologies and semantic webOntologies and semantic web
Ontologies and semantic web
 
What Is RDD In Spark? | Edureka
What Is RDD In Spark? | EdurekaWhat Is RDD In Spark? | Edureka
What Is RDD In Spark? | Edureka
 
Architect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh ArchitectureArchitect’s Open-Source Guide for a Data Mesh Architecture
Architect’s Open-Source Guide for a Data Mesh Architecture
 
From Business Hindsight to Foresight with Azure Synapse Analytics
From Business Hindsight to Foresight with Azure Synapse AnalyticsFrom Business Hindsight to Foresight with Azure Synapse Analytics
From Business Hindsight to Foresight with Azure Synapse Analytics
 

Ähnlich wie Ontology development

Datalift: A Catalyser for the Web of Data - Francois Scharffe
Datalift: A Catalyser for the Web of Data - Francois ScharffeDatalift: A Catalyser for the Web of Data - Francois Scharffe
Datalift: A Catalyser for the Web of Data - Francois Scharffewebscience-montpellier
 
Web 3 Mark Greaves
Web 3 Mark GreavesWeb 3 Mark Greaves
Web 3 Mark GreavesMediabistro
 
The Nature of Information
The Nature of InformationThe Nature of Information
The Nature of InformationAdrian Paschke
 
The Semantic Web: status and prospects
The Semantic Web: status and prospectsThe Semantic Web: status and prospects
The Semantic Web: status and prospectsGuus Schreiber
 
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven RecipesReasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven RecipesOntotext
 
Release webinar: Sansa and Ontario
Release webinar: Sansa and OntarioRelease webinar: Sansa and Ontario
Release webinar: Sansa and OntarioBigData_Europe
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Researchadameq
 
Ontology mapping for the semantic web
Ontology mapping for the semantic webOntology mapping for the semantic web
Ontology mapping for the semantic webWorawith Sangkatip
 
An Annotation Framework For The Semantic Web
An Annotation Framework For The Semantic WebAn Annotation Framework For The Semantic Web
An Annotation Framework For The Semantic WebAndrea Porter
 
Doing Clever Things with the Semantic Web
Doing Clever Things with the Semantic WebDoing Clever Things with the Semantic Web
Doing Clever Things with the Semantic WebMathieu d'Aquin
 
Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013
Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013
Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013Mariana Damova, Ph.D
 
SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...
SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...
SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...The Research Council of Norway, IKTPLUSS
 
Stream Reasoning - where we got so far 2011.1.18 Oxford Key Note
Stream Reasoning - where we got so far 2011.1.18 Oxford Key NoteStream Reasoning - where we got so far 2011.1.18 Oxford Key Note
Stream Reasoning - where we got so far 2011.1.18 Oxford Key NoteEmanuele Della Valle
 
Future of Web 2.0 & The Semantic Web
Future of Web 2.0 & The Semantic WebFuture of Web 2.0 & The Semantic Web
Future of Web 2.0 & The Semantic Webis20090
 
Toward The Semantic Deep Web
Toward The Semantic Deep WebToward The Semantic Deep Web
Toward The Semantic Deep WebSamiul Hoque
 
Introduction to Semantic Web
Introduction to Semantic WebIntroduction to Semantic Web
Introduction to Semantic Webvernekar
 
Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...
Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...
Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...Marko Rodriguez
 

Ähnlich wie Ontology development (20)

20110728 datalift-rpi-troy
20110728 datalift-rpi-troy20110728 datalift-rpi-troy
20110728 datalift-rpi-troy
 
Datalift: A Catalyser for the Web of Data - Francois Scharffe
Datalift: A Catalyser for the Web of Data - Francois ScharffeDatalift: A Catalyser for the Web of Data - Francois Scharffe
Datalift: A Catalyser for the Web of Data - Francois Scharffe
 
Web 3 Mark Greaves
Web 3 Mark GreavesWeb 3 Mark Greaves
Web 3 Mark Greaves
 
The Nature of Information
The Nature of InformationThe Nature of Information
The Nature of Information
 
Semantic Web Nature
Semantic Web NatureSemantic Web Nature
Semantic Web Nature
 
The Semantic Web: status and prospects
The Semantic Web: status and prospectsThe Semantic Web: status and prospects
The Semantic Web: status and prospects
 
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven RecipesReasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
 
Release webinar: Sansa and Ontario
Release webinar: Sansa and OntarioRelease webinar: Sansa and Ontario
Release webinar: Sansa and Ontario
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Research
 
Ontology mapping for the semantic web
Ontology mapping for the semantic webOntology mapping for the semantic web
Ontology mapping for the semantic web
 
Semantic web
Semantic web Semantic web
Semantic web
 
An Annotation Framework For The Semantic Web
An Annotation Framework For The Semantic WebAn Annotation Framework For The Semantic Web
An Annotation Framework For The Semantic Web
 
Doing Clever Things with the Semantic Web
Doing Clever Things with the Semantic WebDoing Clever Things with the Semantic Web
Doing Clever Things with the Semantic Web
 
Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013
Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013
Multilingual Access to Cultural Heritage Content on the Semantic Web - Acl2013
 
SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...
SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...
SESAM4 - A guide to semantics in the Linked Open Data cloud, Robert HP Engels...
 
Stream Reasoning - where we got so far 2011.1.18 Oxford Key Note
Stream Reasoning - where we got so far 2011.1.18 Oxford Key NoteStream Reasoning - where we got so far 2011.1.18 Oxford Key Note
Stream Reasoning - where we got so far 2011.1.18 Oxford Key Note
 
Future of Web 2.0 & The Semantic Web
Future of Web 2.0 & The Semantic WebFuture of Web 2.0 & The Semantic Web
Future of Web 2.0 & The Semantic Web
 
Toward The Semantic Deep Web
Toward The Semantic Deep WebToward The Semantic Deep Web
Toward The Semantic Deep Web
 
Introduction to Semantic Web
Introduction to Semantic WebIntroduction to Semantic Web
Introduction to Semantic Web
 
Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...
Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...
Neno/Fhat: Semantic Network Programming Language and Virtual Machine Specific...
 

Mehr von Stefano Bragaglia

ILP 2014 - Nonmonotonic Learning in Large Biological Network
ILP 2014 - Nonmonotonic Learning in Large Biological NetworkILP 2014 - Nonmonotonic Learning in Large Biological Network
ILP 2014 - Nonmonotonic Learning in Large Biological NetworkStefano Bragaglia
 
Stefano Bragaglia CV (January 2014)
Stefano Bragaglia CV (January 2014)Stefano Bragaglia CV (January 2014)
Stefano Bragaglia CV (January 2014)Stefano Bragaglia
 
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...Stefano Bragaglia
 
ePolicy's internal GlobalOpt webapp
ePolicy's internal GlobalOpt webappePolicy's internal GlobalOpt webapp
ePolicy's internal GlobalOpt webappStefano Bragaglia
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstStefano Bragaglia
 
Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)
Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)
Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)Stefano Bragaglia
 
Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010
Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010
Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010Stefano Bragaglia
 
Introducing PRSs and Drools (in Italian)
Introducing PRSs and Drools (in Italian)Introducing PRSs and Drools (in Italian)
Introducing PRSs and Drools (in Italian)Stefano Bragaglia
 
Promotional poster for the ePolicy project
Promotional poster for the ePolicy projectPromotional poster for the ePolicy project
Promotional poster for the ePolicy projectStefano Bragaglia
 

Mehr von Stefano Bragaglia (11)

A Study in (P)rose
A Study in (P)roseA Study in (P)rose
A Study in (P)rose
 
ILP 2014 - Nonmonotonic Learning in Large Biological Network
ILP 2014 - Nonmonotonic Learning in Large Biological NetworkILP 2014 - Nonmonotonic Learning in Large Biological Network
ILP 2014 - Nonmonotonic Learning in Large Biological Network
 
Stefano Bragaglia CV (January 2014)
Stefano Bragaglia CV (January 2014)Stefano Bragaglia CV (January 2014)
Stefano Bragaglia CV (January 2014)
 
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...
A Distributed System Using MS Kinect and Event Calculus for Adaptive Physioth...
 
ePolicy's internal GlobalOpt webapp
ePolicy's internal GlobalOpt webappePolicy's internal GlobalOpt webapp
ePolicy's internal GlobalOpt webapp
 
Bolognese sauce
Bolognese sauceBolognese sauce
Bolognese sauce
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline First
 
Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)
Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)
Approximate Inference for Logic Programs with Annotated Disjunctions (RCRA 2009)
 
Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010
Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010
Stefano Bragaglia MSc Thesis, awarded as Best Italian thesis in AI 2009/2010
 
Introducing PRSs and Drools (in Italian)
Introducing PRSs and Drools (in Italian)Introducing PRSs and Drools (in Italian)
Introducing PRSs and Drools (in Italian)
 
Promotional poster for the ePolicy project
Promotional poster for the ePolicy projectPromotional poster for the ePolicy project
Promotional poster for the ePolicy project
 

Kürzlich hochgeladen

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 

Kürzlich hochgeladen (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 

Ontology development

  • 1. A N  I NTRODUCTION     TO  O NTOLOGY  D EVELOPMENT   Stefano  Bragaglia  -­‐  May  14,  2010  
  • 2. A  (R EALLY )  B RIEF  H ISTORY     OF   THE  S EMANTIC  W EB   2   “The  World-­‐Wide  Web  (W3)  was  developed  to  be  a  pool  of  human  knowledge,   which  would  allow  collaborators  in  remote  sites  to  share  their  ideas  and  all  aspects   of  a  common  project.”   Sir  Timothy  Berners-­‐Lee   ¥  Christmas  1990:  with  the  implementaNon  of  the  HyperText  Transfer  Protocol,   the  HyperText  Markup  Language,  the  CERN  hLpd  (an  HTTP  server)  and   WorldWideWeb  (a  web  editor/browser)  the  first  web  page  is  transmiUed.   ¥  September  1994:  Berners-­‐Lee  founds  the  World-­‐Wide  Web  ConsorMum  to   create  standards  and  recommendaNons  to  improve  quality  of  the  Web.   ¥  Early  2002:  new  ideas  for  sharing  contents  arises,  the  new  paradigm  aims  to   democraNze  the  Web  by  means  of  social  networks  (Web  2.0)   ¥  Mid  2006:  Berners-­‐Lee  introduces  the  SemanMc  Web  to  turn  the  Web  from   machine-­‐representable  to  machine-­‐understandable,  thus  allowing  automaMc   reasoning   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 3. 3   A  W INNING  E XAMPLE   OF   S EMANTIC  W EB  A PPLICATION   SIRI   a    free  personal   assistant  for  iPhone   ¥  Awarded  during   this  year’s  SXSW   FesMval  as  “Most   Innova@ve  Web   Technology”     ¥  Integrates  a   growing  number  of   third-­‐party  web   services   ¥  Understands  user’s   needs,   automaNcally   discovers  soluNons   and  provides   answers   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 4. A  F EW  C ONSIDERATIONS   ON   THE  S EMANTIC  W EB   4   ¥  AutomaNc  reasoning  will  be  possible  if  the  data  on  Internet  will   be  enriched  with  semanNc  annotaNons   Who  should  do  it?  How  difficult  is  it?   ¥  So_ware  that  (ascertainably)  draws  conclusions  from  semanNc   annotaNons  is  also  required  (work  in  progress)   Is  it  feasible?  Will  it  push  Web  annotaMon?   ¥  The  first  parNal  results  were  collected  only  now,  a_er  years  of   large  investments   Is  the  SemanMc  Web  really  needed?   ¥  Thus  automaNc  reasoning  has  been  postponed  in  favor  of  data   interoperability  (Data  Web  vs.  SemanNc  Web),  but…   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 5. 5   T HE  S EMANTIC  W EB  C AKE   Architecture:   The  SemanNc   Web  is  complex   and  several   layers  are   required,  each   addressing     specific  issues     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 6. 6   T HE  S EMANTIC  W EB  C AKE   Requirements:   URI:  a  mechanism  to   refer  things  (similar  to   URL  )   UNICODE:  a  universal   character  set  to  grant   communicaNon   XML:  elemental   syntax  and  content   structure  for   documents  (semanNcs   delegated  to  higher   levels)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 7. 7   T HE  S EMANTIC  W EB  C AKE   Data   Interchange:   Resource  Descrip@on   Framework:     ¥  Based  on  XML   ¥  (Almost)  as   expressive  as  E-­‐R   Diagrams  or  Class   Diagrams   ¥  Describes  the  domain   by  triples  :  <  subject,   predicate,  object  >  or   <  resource,  aLribute,   value  >   ¥  Defines  “roles”  like:   subject,  predicate,   object,  type,  value,   ecc.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 8. 8   T HE  S EMANTIC  W EB  C AKE   Querying:   SPARQL  Protocol  and   RDF  Query  Language:     ¥  Inherits  from  both   Prolog  and  SQL   ¥  Interacts  with  RDF   triples   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 9. 9   T HE  S EMANTIC  W EB  C AKE   Knowledge   Representa@on:   RDF  Schema:   ¥  Extends  RDF  with   subClassOf,   Datatype,  etc.   ¥  Good  for   taxonomies   OWL:     ¥  Extends  RDFS  with   disjointWith,   equivalentProperty,   InverseOf,  ecc.   ¥  Good  for  ontologies   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 10. 10   T HE  S EMANTIC  W EB  C AKE   Rules   Representa@on:   Seman@c  Web  rule   language:   ¥  Applies  rules  to  data:   a  hasParent  b  /     b  hasBrother  c     =>  a  hasUncle  c   Rule  Interchange   Format:     ¥  Allows  portability  of   rules  between   languages   NB:  Currently   undergoing  a   standardizaMon   process   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 11. 11   T HE  S EMANTIC  W EB  C AKE   Reasoning:   Unifying  logic:  a   mediator  layer   between  data   querying,  knowledge   and  rule   representaNon   Proof:  exploits  the   underlying  unified   logic  to  draw  new   conclusions  from   available  data   NB:  Currently   undergoing  acMve   research   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 12. 12   T HE  S EMANTIC  W EB  C AKE   Trust:   Cryptography:   founded  on   underlying  plalorm,   ensures  that  data  are   kept  confidenNal     Cer@fica@on:  founded   on  underlying   plalorm,  ensures  that   data  come  from  an   entrusted  source   NB:  Currently   undergoing  acMve   research   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 13. 13   T HE  S EMANTIC  W EB  C AKE   Presenta@on:   User  interface:   provides  an   environment  to   present  applicaNon  to   final  users   NB:  Currently   undergoing  acMve   research   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 14. 14   E XPRESSIVENESS     OF  S EMANTIC  M ODELS   The  languages  seen  so  far  can   be  arranged  by  increasing   expressiveness.     Consider  the  complexity  of   what  you  aim  to  model  when   choosing  one:   ¥  Taxonomy:  a  set  of  terms   hierarchically  organized   Ex.:  IEEE  Computer  Society   Keywords   ¥  Thesaurus:  a  set  of  terms   with  linguisNc  relaNons   among  them   Ex.:  Princeton  University’s   WordNET   ¥  Conceptual  Model:  a  set   of  organized  concepts  and   specific  relaNons  among   them  describing  a  specific   domain   ¥  Logic  Theory:  basically  a   conceptual  model   supported  by  inference   mechanisms     Ex:  PizzaOntology,  FOAF,   etc.  just  to  name  a  few   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 15. O NTOLOGIES     AND   THE  S EMANTIC  W EB   15   ¥  Ontology:  a  formal,  explicit  descripNon  of  a  domain  of   interest  (by  means  of  concepts  and  relaNons  among   them)   Ontology  +  Instances  =  Knowledge  Base   ¥  Several  proposal  within  the  SemanNc  Web  IniNaNve:   ¤  RDF  Schema:  RDF  extensions  with  proper  terms  for   ontological  concepts;  good  for  taxonomies   ¤  …   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 16. O NTOLOGIES     AND   THE  S EMANTIC  W EB   16   ¥  Several  proposal  within  the  SemanNc  Web  IniNaNve:   ¤  OWL  1.1  (Ontology  Web  Language):  RDFS  extension  with  three   variants  of  increasing  expressiveness:   ¢  ¢  OWL-­‐DL:  maximum  expressiveness  possible,  computaNonally   complete,  decidable  and  availability  of  pracNcal  reasoning  algorithms;   named  a_er  DescripMon  Logic  that  studies  the  logics  of  its  formal   foundaNon   ¢  ¤  OWL-­‐Lite:  limited  support  for  certain  features  (ex.:  cardinality),  good   for  thesauri  or  hierarchies;  intended  to  be  easily  computable,  tools   development  is  difficult  as  per  other  dialects   OWL-­‐Full:  minimal  compaNbility  with  RDF-­‐S,  has  different  semanNcs   (classes  as  both  collecNons  of  individuals  and  individuals),  complete   reasoning  support  is  unlikely   OWL  2:  introduces  “profiles”  such  as  OWL  2-­‐EL  (fragment  with   polynomial  Nme  reasoning  complexity),  OWL  2-­‐QL  (simplifies  support   to  queries)  and  OWL  2-­‐RL  (OWL  subset  meant  to  handle  rules)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 17. OWL     AND  D ESCRIPTION  L OGICS   17   ¥  DescripNon  Logics,  as  First  Order  Logic,  is  a  family  of  logics   ¥  Each  fragment  of  logics  depends  on  which  operators  are   supported   ¥  The  more  supported  operators,  the  higher  the  complexity   ¥  OWL-­‐DL  supports  the  following  operators:   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 18. OWL  O NTOLOGIES   18   Terminology:   Student   Instance:  a  specific   object  of  the  domain   (same  as  DL’s   individual)   UniFEStudent   aUendsCourse   Course   ¥  An  instance  may   pertain  to  none,   one    or  more   classes.   ¥  An  instance  may   have  none,  one  or   more  properNes.   Speaker   UniBOStudent   assists   s_bragaglia   UniBOAIStudent   aUendsCourse   photography   AICourse   app_int_art   ¥  Instances  cannot  be   members  of   owl:Nothing.   you   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   aUendsAICourse   fond_int_art   14/05/2010  
  • 19. OWL  O NTOLOGIES   19   Terminology:   Student   Class:  a  collecNon  of   objects  with  similar   characterisNcs  (same  as   DL's  concept)   UniFEStudent   ¥  It  may  be  a  subclass   of  another,  inheriNng   characterisNcs  from   its  parent  superclass   (logical  subsumpMon,   DL’s  concept   inclusion).   ¥  All  classes  are   subclasses  of   olw:Thing  (the  root   class)  and  are   subclassed  by   owl:Nothing  (the   empty  class)   aUendsCourse   Course   Speaker   UniBOStudent   assists   s_bragaglia   UniBOAIStudent   you     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   aUendsCourse   photography   AICourse   app_int_art   aUendsAICourse   fond_int_art   14/05/2010  
  • 20. OWL  O NTOLOGIES   20   Terminology:   Property:  a  direct  binary   relaNon  that  specifies  class   characterisNcs  (same  as   DL’s  role)   ¥  It  may  be  a  subproperty   of  another,  inheriNng   characterisNcs  from  its   parent  superproperty   ¥  As  aUribute  of   instances,  it  links  to  RDF   literals  (datatype   property,  ex.:   hasName)   UniFEStudent   It  may  have  domain   and  range.   ¥  Student   ¥  O_en  it  links  two   instances  (object   property);  it  may  have   logical  capabiliNes  such   as  being  transiGve,   symmetric,  inverse  and   funcGonal.   aUendsCourse   Course   Speaker   UniBOStudent   assists   s_bragaglia   UniBOAIStudent   you   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   aUendsCourse   photography   AICourse   app_int_art   aUendsAICourse   fond_int_art   14/05/2010  
  • 21. OWL  O NTOLOGIES   21   Terminology:   Property:  a  direct  binary   relaNon  that  specifies  class   characterisNcs  (same  as   DL’s  role)   ¥  It  may  be  a  subproperty   of  another,  inheriNng   characterisNcs  from  its   parent  superproperty   ¥  As  aUribute  of   instances,  it  links  to  RDF   literals  (datatype   property,  ex.:   hasName)   UniFEStudent   It  may  have  domain   and  range.   ¥  Student   ¥  O_en  it  links  two   instances  (object   property);  it  may  have   logical  capabiliNes  such   as  being  transiGve,   symmetric,  inverse  and   funcGonal.   aUendsCourse   Course   Speaker   UniBOStudent   assists   s_bragaglia   UniBOAIStudent   you   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   aUendsCourse   photography   AICourse   app_int_art   aUendsAICourse   fond_int_art   14/05/2010  
  • 22. OWL  O NTOLOGIES   22   Terminology:   Property:  a  direct  binary   relaNon  that  specifies  class   characterisNcs  (same  as   DL’s  role)   ¥  It  may  be  a  subproperty   of  another,  inheriNng   characterisNcs  from  its   parent  superproperty   ¥  As  aUribute  of   instances,  it  links  to  RDF   literals  (datatype   property,  ex.:   hasName)   UniFEStudent   It  may  have  domain   and  range.   ¥  Student   ¥  O_en  it  links  two   instances  (object   property);  it  may  have   logical  capabiliNes  such   as  being  transiGve,   symmetric,  inverse  and   funcGonal.   aUendsCourse   Course   Speaker   UniBOStudent   assists   s_bragaglia   UniBOAIStudent   you   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   aUendsCourse   photography   AICourse   app_int_art   aUendsAICourse   fond_int_art   14/05/2010  
  • 23. OWL  O NTOLOGIES   23   Terminology:   Student   Operator:  OWL   language  supports   various  operaNons  on   classes  such  as  union,   intersecGon  and   complement   EnumeraGon,   cardinality  and   disjointness  are  also   supported.   Such  operaNons  are   usually  referred  as   restricGons  (and   expressions,   backward   compaNbility)   UniFEStudent   aUendsCourse   Course   Speaker   UniBOStudent   assists   s_bragaglia   UniBOAIStudent   you   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   aUendsCourse   photography   AICourse   app_int_art   aUendsAICourse   fond_int_art   14/05/2010  
  • 24. D EVELOPING  O NTOLOGIES   24   A  possible  development  process  involves:     1.  2.  Analyze  the  domain  and  the  goal  of  the  ontology   Determine  the  key  concepts  of  the  domain   ¤  ¤  3.  Consider  to  reuse  exis@ng  ontologies   ¤  ¤  4.  5.  6.  7.  8.  9.  Glossary  of  terms   Competency  quesNons   Upper  /  medium  /  lower  ontologies  (Greek  temple  model)   Ontologies  paerns   Organize  concepts  in  classes  e  hierarchies  among  classes   Determine  the  proper@es  of  the  classes   Add  constraints  (allowed  values)  on  the  properNes   Create  the  instances   Assign  values  to  the  properNes  for  each  instance   Verify  the  ontology  and  release  it   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 25. D EVELOPING  O NTOLOGIES   25   ¥  Purposes:   ¤  ¤  Modeling  (formalizaNon  of  steps  during  development,  etc.)   ¤  ¥  Export  (data  export,  knowledge  export,  etc.)   Interoperability  between  different  systems   Tools:   ¤  Too  much,  at  the  moment!  Almost  any  compeNtor  proposes   its  own  tool  due  to  the  big  expectaNons…   ¤  Remarkable  editors  are  (just  to  name  a  few):  Protégé,   TopBraid  Composer,  Swoop,  DOME,  NeOn,  WSMT,  etc.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 26. P ROTÉGÉ  3.4.4   26   EdiNng  funcNons  are   split  in  different  tabs:   ¥  Metadata:   overview  of  the   ontology   ¥  OWL  Classes:   concepts  inserNon   and  organizaNon   ¥  Proper@es:  roles   definiNon  and   customizaNon   ¥  Individuals:  object   introducNon  and   composiNon   ¥  Forms:  form   definiNon  for  data   inserNon   ¥  SWRL  Rules:  rule   definiNon  that   triggers  on  exisNng   data   hUp://protege.stanford.edu/download/registered.html     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 27. OWL  C LASSES  T AB   27   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 28. OWL  C LASSES  T AB   28   Class     AnnotaGons   Class     Explorer   (add/   rearrange/   remove  classes)   Necessary  &  Sufficient     Class  RestricGons   ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   Necessary     Class  RestricGons     Disjointness   DefiniGons     14/05/2010  
  • 29. P ROPERTIES  T AB   29   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 30. P ROPERTIES  T AB   30   Property   AnnotaGons   Property   Explorer   (both  datatype     and  object)   Property   Domain   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   Property   Range   Property   Axioms   14/05/2010  
  • 31. I NDIVIDUALS  T AB   31   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 32. I NDIVIDUALS  T AB   32   Instance     AnnotaGons   Class     Explorer   Instance   Explorer   (add/   rearrange/   remove   instances)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   Inherited     Instance     ProperGes     14/05/2010  
  • 33. A N  I NTRODUCTORY  E XAMPLE   33   ¥  Suppose  the  domain  to  capture  is  the  following:   In  logic,  each  statement  has  a  text  and  has  a  truth   value  depending  on  the  value  of  its  elements.     Statements  are  idenMfied  with  unique  numeric  ids.   Allowed  truth  values  are  true  and  false.   A  tautology  is  a  statement  that  is  true  by  definiMon,   for  any  value  of  its  elements.   ContradicMons  are  the  opposite  of  tautologies.   ¥  For  example  “A  crow  flies  when  the  sun  goes  down.”  is   a  statement,  “All  crows  are  black  or  there  is  one  that   is  not.”  is  a  tautology  and  “Every  crow  is  either   completely  black  and  completely  white.”  is  a   contradicNon.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 34. A N  I NTRODUCTORY  E XAMPLE   34   ¥  The  following  text  analysis  is  possible:   In  logic,  each  statement  has  a  text  and  has  a  truth   value  depending  on  the  value  of  its  elements.     Statements  are  idenMfied  with  unique  numeric  ids.   Allowed  truth  values  are  true  and  false.   A  tautology  is  a  statement  that  is  true  by  definiMon,   for  any  value  of  its  elements.   ContradicMons  are  the  opposite  of  tautologies.   ¥  The  idenNfied  terms  and  aUributes  should  be   reported  into  a  glossary.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 35. A N  I NTRODUCTORY  E XAMPLE   35   ¥  The  given  text  may  lead  to  the  following  competency   ques@ons:   ¤  What  defines  a  statement?  A  text.   ¤  What  idenNfies  a  statement?  A  numeric  id.   ¤  What  resolves  a  statement  to?  A  truth  value.   ¤  What  truth  values  are  valid?  True  and  false.   ¤  What  is  a  tautology?  A  statement  always  true.   ¤  What  is  a  contradicNon?  The  opposite  of  a  tautology.   Note:  this  approach  considers  a  bit  of  informaNon  at  a  Nme  instead   of  the  whole  at  once.  Development  is  easier  but  end  result  is  less   uniform  and  reuse  is  more  difficult.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 36. A N  I NTRODUCTORY  E XAMPLE   36   ¥  Due  to  the  nature  and  size  of  the  domain,  no   exisNng  ontology  will  be  used.   ¥  Create  a  new  ontology  and  introduce  the   idenNfied  items:     ¤  Classes:  Statement,  Value   ¤  Proper@es:  hasId,  hasText,  hasValue   ¤  Instances:  a  few  examples  like  the  proposed  one.   ¤  Values:  strings,  integers,  etc.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 37. A N  I NTRODUCTORY  E XAMPLE   R EASONING  T ASKS   37   ¥  Under  “Reasoning”  menu,  select  “Pellet  1.5.2”  as   default  reasoner  and   ¤  Check  the  consistency  of  current  ontology   ¤  Classify  automaNcally  the  classes  entered  so  far   ¤  Compute  inferred  types  for  instances   Note:  Ontology  should  be  consistent  and  explicit.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 38. D ETECTING     C ONSISTENCY  E RRORS   38   ¥  SomeNmes  it  happens  that  two  or  more  concepts  of   the  ontology  inadvertently  conflicts  with  each  other   ¥  DetecNng  and  fixing  such  conflicts  may  be  difficult,   especially  when  dealing  with  large  projects   ¥  This  is  where  the  consistency  check  comes  in  handy!   ¥  As  an  example,  introduce  Tautology  as  a  top-­‐level   class  restricNon  that  hasValue  only  True  and   ContradicGon  as  a  Tautology  that  instead  hasValue   only  False     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 39. 39   D ETECTING     C ONSISTENCY  E RRORS   If  you  run  the  consistency   check  task  again,  the   inconsistency  is  detected  and   highlighted  in  red!   To  fix  the  error,  you  have  to   idenNfy  the  colliding   concepts  in  the  editor  panel   of  inconsistent  class  or   property  and  modify  them   properly   ¥  AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   ¥  ¥  AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   An  extension  which  directly   idenNfies  the  colliding   concepts  is  being  discussed   14/05/2010  
  • 40. 40   D ETECTING     C ONSISTENCY  E RRORS   ¥  ¥  In  this  case,  the  error  is  due  to  the   definiNon  of  ContradicGon:     •   hasValue  only  False   •   hasValue  only  True  (inherited)   and   •   True  disjoint  with  False       The  error  is  fixed  by  simply  staNng  that   it  is  a  Statement  and  not  a  Tautology!   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   If  you  run  the  consistency   check  task  again,  the   inconsistency  is  detected  and   highlighted  in  red!   To  fix  the  error,  you  have  to   idenNfy  the  colliding   concepts  in  the  editor  panel   of  inconsistent  class  or   property  and  modify  them   properly   ¥  An  extension  which  directly   idenNfies  the  colliding   concepts  is  being  discussed   14/05/2010  
  • 41. C LASSIFYING  C LASSES     IN  T AXONOMIES   41   ¥  Despite  being  top-­‐level  classes,  Tautology  and   ContradicGon  are  somehow  related  with   Statement     ¥  The  classify  taxonomy  task  successfully   recognizes  such  dependency  and  rearrange  them   as  sub-­‐classes  of  Statement   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 42. C LASSIFYING  C LASSES     IN  T AXONOMIES   42   ¥  Despite  being  top-­‐level  classes,  Tautology  and   ContradicGon  are  somehow  related  with   Statement     ¥  The  classify  taxonomy  task  successfully   recognizes  such  dependency  and  rearrange  them   as  sub-­‐classes  of  Statement   This  is  due  to  the   fact  that  they   both  use   hasValue   property  whose   domain  is   actually   Statement   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 43. I NFERRING  T YPES   FOR   I NSTANCES   43   ¥  Having  introduced  instances  that  appear  to  be  a   Tautology  and  a  ContradicGon,  we  expect  that  the   compute  inferred  types  task  recognizes  them   accordingly…   ¥  …but  all  the  instances  are  sNll  reported  only  as   Statements!  What’s  wrong?   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 44. I NFERRING  T YPES   FOR   I NSTANCES   44   ¥  Let’s  have  another  try:     Introduce  DefinedStatement  as  a  top-­‐level  restricNon   class  that  hasValue  some  (True  or  False)  and  run  the   compute  inferred  types  task  again…   ¥  …this  Nme  it  seems  to  work!  What’s  wrong?   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 45. O PEN  W ORLD   VS .  C LOSE  W ORLD   A SSUMPTION   45   ¥  Unlike  Prolog,  SQL  and  many  other  languages,  OWL   (and  DL  in  general)  adopts  the  Open  World   AssumpGon  instead  of  the  Close  World  AssumpGon   ¤  ¤  ¥  CWA  implies  that  everything  not  explicitly  asserted   is  false,     OWA  states  that  we  cannot  speculate  on  something     that  is  not  explicitly  asserted  since  it  is  undefined   Ex:  asserNng  that  “Huey,  Dewey  and  Louie  are  Donald   Duck’s  nephews”  means  that  Donald  Duck  has  no   other  nephews  in  CWA,  while  this  is  not  due  in  OWA   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 46. O PEN  W ORLD   VS .  C LOSE   W ORLD  A SSUMPTION   46   ¥  Due  to  the  Open  World  AssumpNon,  every  restricNon  involving   the  keywords  only,  exactly  and  max  cannot  help  inferring  types   for  instances     ¥  The  reasoner,  in  fact,  cannot  perform  such  inference  because  it   suppose  the  presence  of  informaNon  that  may  violate  the   restricNons  even  if  it  is  not  aware  of  it   ¥  This  limitaNon  is  overcome  by  introducing  the  so-­‐called  Closure   Axioms  involving   ¤  The  definiNon  of  classes  with  the  same  necessary  restricNons     ¤  The  introducNon  of  instances  as  members  of  such  classes   Note:  This  method  makes  the  model  correct  but  some  aUempts  of   deducing  things  become  quite  useless…   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 47. 47   O PEN  W ORLD   VS .  C LOSE   W ORLD  A SSUMPTION   Inferred  types  for   instances  are   correctly  recognized   a_er  the  introducNon   of  closure  axioms   Also  note  the  final   taxonomy  for  the   model  as  classified  by   the  reasoner   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 48. RDF  &  SPARQL  Q UERIES   48   ¥  Any  RDF  graph  is  a  collecNon  of  triples:   subject   predicate   object   ¥  Each  part  of  the  triples  is  said  node     ¥  Nodes  referring  to  classes,  properNes  or  instances  are   said  resources   ¥  Resources  are  represented  with  URIs,  which  can  be   abbreviated  as  prefixed  names   ¥  Objects  can  also  be  literals  (strings,  integers,   booleans,  etc.)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 49. RDF  &  SPARQL  Q UERIES   49   Every  SPARQL  query  comprises:   Prefix  declara@on  to  abbreviate  URIs  (opt.)   ¥  Dataset  defini@on  to  include  RDFs    (opt.)   ¥  Result  clause  to  state  expected  data   ¥  Query  paern  to  specify  context  to  query   ¥  Solu@on  modifiers  to  rearrange  results  (opt.)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   SPARQL  query   ¥  14/05/2010  
  • 50. RDF  &  SPARQL  Q UERIES   Every  SPARQL  query  comprises:     #  prefix  declarations     PREFIX  foo:  <http://example.com/resources/>     ...     #  dataset  definition     FROM  ...     #  result  clause     SELECT  ...     #  query  pattern     WHERE  {              ...     }     #  solution  modifiers     ORDER  BY  ...   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   SPARQL  query   50   14/05/2010  
  • 51. 51   RDF  &  SPARQL  Q UERIES   Ex.:  Find  the  name  of  all  the  persons  in  current  ontology     SELECT  ?name   WHERE  {          ?person  :hasName  ?name  .   }       ¥  SPARQL  variables  start  with  a  ?  and  can  match  any  node   (resource  or  literal)  in  the  RDF  dataset   ¥  Triple  paUerns  are  just  like  triples,  except  that  its  parts  can  be   replaced  with  variables   ¥  Queries  may  have  several  triple  paUerns,  each  ending  with  .     ¥  SELECT  returns  a  table  of  values  that  saNsfy  the  query   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 52. 52   RDF  &  SPARQL  Q UERIES   FOAF  Ontology   ¥ Revolves   around  the   class  Person   ¥ Aggregates   data  around   persons,  in   terms  of  both   resources  and   literals   ¥ Associates   persons,  each   to  another     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 53. 53   RDF  &  SPARQL  Q UERIES   FOAF  Ontology   ¥ Revolves   around  the   class  Person   ¥ Aggregates   data  around   persons,  in   terms  of  both   resources  and   literals   ¥ Associates   persons,  each   to  another     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 54. 54   P REFIX  D ECLARATION   Ex.:  Find  all  the  people  that  have  name  and  email  address  using  the  external   FOAF  (Friend  of  a  Friend)    ontology     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  *   WHERE  {    ?person  foaf:name  ?name  ;                    foaf:mbox  ?email  .  #  ?person  foaf:mbox  ?email  .   }       ¥  The  *  selects  all  the  variables  that  are  menNoned  in  the  query   ¥  The  ;  allows  two  consecuNve  triple  paUerns  to  share  the  subject     ¥  MulNple  triple  paUerns  with  the  same  subject  explore  mulNple  properNes   about  the  resource  at  the  same  Gme   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 55. 55   D ATASET  D EFINITION   Ex.:  Find  the  homepage  of  anyone  known  by    Tim  Berners-­‐Lee     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   PREFIX  card:  <http://www.w3.org/People/Berners-­‐Lee/card#>   SELECT  ?homepage   FROM  <http://www.w3.org/People/Berners-­‐Lee/card>   WHERE  {    card:i  foaf:knows  ?known  .    ?known  foaf:homepage  ?homepage  .   }       ¥  FROM    allows  to  specify  which  dataset  (instances)  to  consider   ¥  Two  consecuNve  triple  paUerns  sharing  a  variable  as  object  and  subject   respecNvely  allows  to  traverse    links  in  the  graph   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 56. R ESULT  C LAUSE   56   ¥  This  is  the  most  important  secNon  of  SPARQL   queries  together  with  the  other  non-­‐opNonal   secNon  Query  PaUern   ¥  Several  ways  to  customize  it:   ¤  Alterna@ves:  CONSTRUCT,  ASK,  DESCRIBE   ¤  Modifiers:  DISTINCT   ¤  Aggregate  func@ons:  COUNT,  MIN,  MAX,  SUM,  etc.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 57. 57   R ESULT  C LAUSE :  DISTINCT   Ex.:  Find  the  name  of  all  the  persons  with  an  email  or  an  homepage     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  DISTINCT  ?name   WHERE  {    {  ?person  foaf:mbox  ?mbox  }        UNION    {  ?person  foaf:homepage  ?homepage  }    ?person  foaf:name  ?name  .     }       ¥  If  a  person  has  both  email  and  homepage,  its  name  will  appear    twice:   DISTINCT  allows  to  remove  duplicates   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 58. R ESULT  C LAUSE :   CONSTRUCT   58   Ex.:  Convert  all  the  FOAF  data  from  Tim  Berners-­‐Lee  ontology  into  VCard  data     PREFIX  vCard:  <http://www.w3.org/2001/vcard-­‐rdf/3.0#>   PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   CONSTRUCT  {          ?X  vCard:FN  ?name  .      ?X  vCard:URL  ?url  .      ?X  vCard:TITLE  ?title  .   }   FROM  <http://www.w3.org/People/Berners-­‐Lee/card>   WHERE  {        OPTIONAL  {  ?X  foaf:name  ?name  .        FILTER  isLiteral(?name)  .  }      OPTIONAL  {  ?X  foaf:homepage  ?url  .  FILTER  isURI(?url)  .  }      OPTIONAL  {  ?X  foaf:title  ?title  .    FILTER  isLiteral(?title)  .  }   }     ¥  CONSTRUCT  returns  an  RDF  graph  instead  of  a  table  of  values   ¥  The  equivalent  SELECT  query  is  performed  and  the  returned  values  are  used  to  fill  the   template   ¥  Query  paUerns  involving  unbound  variables  are  discarded   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 59. 59   R ESULT  C LAUSE :  ASK   Ex.:  Check  out  if  Tim  Berners-­‐Lee  knows  me     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   PREFIX  card:  <http://www.w3.org/People/Berners-­‐Lee/card#>   ASK     FROM  <http://www.w3.org/People/Berners-­‐Lee/card>   WHERE  {      card:i  foaf:knows  :stefano  .   }     ¥  ASK  returns  true  or  false  depending  on  the  query  paUern     ¥  WHERE  is  always  opNonal  (ASK  queries  usually  drop  it  to  ease  the  reading)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 60. 60   R ESULT  C LAUSE :  DESCRIBE   Ex.:  Retrieve  any  piece  of  informaNon  about  the  Ford  Motor  Company     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   DESCRIBE  ?ford     WHERE  {      ?ford  foaf:name  "FORD  MOTOR  CO"  .   }     ¥  DESCRIBE  returns  all  the  triples  involving  the  given  resource(s)   ¥  Returned  informaGon  may  vary  depending  on  the  implementaNon     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 61. 61   R ESULT  C LAUSE :     A GGREGATE  F UNCTIONS   Ex.:  What  are  the  top  interests  of  LiveJournal  users  interested  in  Harry  PoUer?     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  ?interest  COUNT(*)  AS  ?count     WHERE  {          ?person  foaf:interest  <http://www.livejournal.com/ interests.bml?int=harry+potter>  .          ?person  foaf:interest  ?interest   }   GROUP  BY  ?interest  ORDER  BY  DESC(COUNT(*))  LIMIT  10     ¥  Only  supported  by  some  SPARQL  implementaNons   ¥  Aggregate  funcNons  calculate  single  values  from  sets  of  results   ¥  They  include:  COUNT,  MIN,  MAX,  SUM,  etc.   ¥  SomeNmes  used  with  clauses  that  breaks  the  results  into  groups  before     applying  the  aggregate  funcGon(s)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 62. Q UERY  P ATTERN   62   ¥  As  said,  this  non-­‐opNonal  secNon  plays  an   important  role  in  SPARQL  queries  together  with   Result  Clause   ¥  Several  ways  to  customize  it:   ¤  Operators:  FILTER,  OPTIONAL,  UNION   ¤  Named  Graphs:  GRAPH   ¤  Nested  clauses:  SELECT,  etc.   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 63. 63   Q UERY  P ATTERN :  FILTER   Ex.:  Find  the  name  of  all  the  person  located  only  near  a  given  geospaNal  point     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   PREFIX  geo:  <http://www.geonames.org/ontology/ ontology_v2.0_Full.rdf>   SELECT  ?name   WHERE  {          ?person  foaf:name  ?name  .            ?person  foaf:based_near  ?loc  .            ?loc  geo:lat  ?lat  .            ?loc  geo:long  ?long  .            FILTER  (  ?lat  >  50  &&  ?lat  <  100  &&                              ?long  >  25  &&  ?long  <  75  )  .     }     ¥  FILTER  uses  boolean  contraints  to  ignore  unwanted  results   ¥  It  may  lead  to  duplicates  in  results  (how  to  handle  that?)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 64. Q UERY  P ATTERN :  FILTER   64   ¥  Many  operators  are  allowed  in  a  FILTER  declaraNons:   ¤  Logical:  !,  &&,  ||   ¤  Math:  +,  -­‐,  *,  /   ¤  Comparison:  =,  !=,  >,  <,  etc.   ¤  SPARQL  tests:  isURI,  isBlank,  isLiteral,  bound   ¤  SPARQL  accessors:  str,  lang,  datatype   ¤  Other:  sameTerm,  langMatches,  regex     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 65. 65   Q UERY  P ATTERN :  OPTIONAL   Ex.:  Find  the  name  of  all  the  persons  along  with  their  image,  homepage  and   locaNon     #  The  wrong  way...   PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  ?name  ?img  ?home  ?loc   WHERE  {          ?person  foaf:name  ?name  ;                            foaf:img  ?img  .                            foaf:homepage  ?home  .                            foaf:based_near  ?loc  .     }     ¥  This  query  does  not  return  all  the  expected  values:  what  is  wrong?   ¥  The  paUern  above  requires  every  piece  of  data  to  be  available…   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 66. 66   Q UERY  P ATTERN :  OPTIONAL   Ex.:  Find  the  name  of  all  the  persons  along  with  their  image,  homepage  and   locaNon     #  The  right  way...   PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  ?name  ?img  ?home  ?loc   WHERE  {          ?person  foaf:name  ?name  ;            OPTIONAL  {  ?person  foaf:img  ?img  }            OPTIONAL  {  ?person  foaf:homepage  ?home  }            OPTIONAL  {  ?person  foaf:based_near  ?loc  }     }     ¥  Not  everyone  has  an  image,  homepage  or  locaNon   ¥  OPTIONAL  tries  to  match  the  paUern,  but  does  not  fail  the  whole  query  in  the   specific  match  fails   ¥  In  case  of  failure,  any  unassigned  variable  in  the  paUern  remain  unbound   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 67. 67   Q UERY  P ATTERN :  UNION   Ex.:  Find  the  name  of  all  the  persons  with  an  email  or  an  homepage     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  DISTINCT  ?name   WHERE  {    {  ?person  foaf:mbox  ?mbox  }        UNION    {  ?person  foaf:homepage  ?homepage  }    ?person  foaf:name  ?name  .     }       ¥  UNION  forms  a  disjuncNon  of  two  graph  paUerns   ¥  SoluNon  to  both  sides  are  included  in  the  results   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 68. 68   Q UERY  P ATTERN :  GRAPH   Ex.:  Find  the  name  of  all  the  people  involved  in  at  least  three  disNnct  events     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   PREFIX  g:  <http://data.example.com/graphs/>   SELECT  DISTINCT  ?name   FROM  NAMED  g:g1   FROM  NAMED  g:g2   FROM  NAMED  g:g3   WHERE  {          ?person  foaf:name  ?name  .          GRAPH  ?g1  {  ?person  a  foaf:Person  }          GRAPH  ?g2  {  ?person  a  foaf:Person  }          GRAPH  ?g3  {  ?person  a  foaf:Person  }          FILTER  (  ?g1  !=  ?g2  &&  ?g1  !=  ?g3  &&  ?g2  !=  ?g3  )  .   }     ¥  So  far  queries  have  been  again  a  single  graph  (default  graph)   ¥  AddiNonal  graphs  may  be  added  with  FROM  NAMED  clauses   ¥  GRAPH  then  allows  porNons  of  the  query  to  match  against  the  named  graphs   ¥  a  is  a  shortcut  for  the  rdf:type  predicate   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 69. 69   Q UERY  P ATTERN :  GRAPH   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 70. Q UERY  P ATTERN :     N ESTED  C LAUSES   70   Ex.:  Retrieve  the  second  page  of  names  and  emails  of  people  in  Tim  Berners-­‐Lee's  FOAF   file,  given  that  each  page  has  10  people     PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>   SELECT  ?name  ?email   FROM  <http://www.w3.org/People/Berners-­‐Lee/card>   WHERE  {      {  SELECT  DISTINCT  ?person  ?name            WHERE  {                ?person  foaf:name  ?name            }  ORDER  BY  ?name  LIMIT  10  OFFSET  10          }      OPTIONAL  {  ?person  foaf:mbox  ?email  }   }     ¥  The  sub-­‐query  limits  the  amount  of  person  to  consider  in  advance  instead  of   pruning  the  returned  values   ¥  Not  available  on  all  the  implementaNons   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 71. S OLUTION  M ODIFIERS   71   ¥  SoluNon  modifiers  affect  the  values  returned  by   the  query  in  several  ways   ¥  Two  class  of  soluNon  modifiers  are  available:   ¤  ¤  ¥  ORDER  BY  is  used  to  sort  the  soluGon  on  values   of  one  or  more  variables   OFFSET  and  LIMIT  are  used  to  take  a  slice  of   the  soluGon   Specific  examples  have  been  introduced  in   previous  secNons   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 72. F UTURE  D IRECTIONS     FOR  SPARQL   72   ¥  Unfortunately,  a  few  pieces  of  SPARQL  are  not  yet   standard:  full-­‐text  search,  parameters  passing,   querying  more  graphs  at  a  Mme,  direct  support  of  XML   ¥  A  new  version  of  SPARQL  was  chartered  in  March   2009;  planned  features  are:  insert/update/delete   capabiliMes,  negaMon,  improvements  on  aggregate   funcMons,  query  with  constants/funcMons/   expressions,  standard  for  sub-­‐query   ¥  The  following  features  are  also  being  discussed:   interacMon  with  OWL/RDF-­‐S/RIF,  recursive  property   paths,  basic  federated  query   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 73. SPARQL   SUCCEEDS     WHERE  OWL   FAILS ?   73   ¥  SPARQL  is  complementary  to  OWL  and  is  based  on  Closed  World   AssumpNon     ¥  Thus  it  can  be  used  to  overcome  the  limitaNons  seen  before   Note:  SPARQL  Query  panel  can  be  accessed  under  “Reasoning”  menu  with   “Open  SPARQL  Query  panel”  command:   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 74. SPARQL   SUCCEDS     WHERE  OWL   FAILS ?   74   Ex.:  Find  the  text  of  all  the  statements  that  are  tautology     SELECT  ?text     WHERE  {      #  find  statements  that  has  value  true      ?statement  a  :Statement  ;                            :hasValue  True  .      OPTIONAL  {          #  find  out  if  it  also  has  value  false,  but  use  a  different  name          ?statement2  a  :Statement  ;                                  :hasValue  False  .          FILTER  (  ?statement2  =  ?statement  )  .      }      #  keep  only  the  statements  that  failed  to  have  value  false      FILTER  (  !bound(  ?statemnt2  )  )  .      ?statement  :hasText  ?text  .   }     ¥  Together,  OPTIONAL  and  the  !bound(...)  allow  to  query  for  things  that  are  not  asserted  in  the  dataset   ¥  A  similar  technique  allows  for  other  types  of  universally  quanNfied  queries  (such  as  max)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 75. E XERCISE  1   75   Ex.:  Design  an  ontology  containing  statements  represenNng  the   following  sentences:       ¥  A  doll  is  a  kind  of  toy     ¥  Young  women  are  defined  as  young  persons  that  are  also   female     ¥  A  young  person  cannot  be  both  a  young  man  and  a  young   woman     ¥  Young  persons  are  either  young  men  or  young  women     ¥  Lenore  and  Emily  are  famous  dolls     ¥  All  young  women  play  with  some  doll     ¥  Young  women  play  only  with  famous  dolls     ¥  Young  men  play  with  at  least  one  toy     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 76. E XERCISE  1   76   Ex.:  Design  an  ontology  containing  statements  represenNng  the   following  sentences:       ¥  Clara  is  a  young  woman     ¥  Clara  and  Laura  are  different  individuals     ¥  Lalu  is  the  same  person  as  Laura     ¥  To  dress  a  toy  is  a  special  case  of  playing,  where  the  toy  is  a  doll     ¥  To  be  dressed  by  a  young  person  is  the  inverse  relaNon  of  a   young  person  dressing  a  doll     ¥  To  be  ancestor  of  a  person  is  a  transiNve  relaNon  that  holds   between  persons     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 77. E XERCISE  2   77      Context    An  online  music  database  wishes  to  semanNcally  represent  their  data  about  musicians,   albums,  and  performances,  in  order  to  be  able  to  provide  beUer  search  funcNons  to  their   users,  i.e.  by  querying  the  knowledge  base  instead  of  using  keyword  queries.  Below  is  an   example  of  what  they  typically  would  like  to  store,  and  at  the  boUom  you  find  the   competency  quesNons  developed  as  requirements  for  the  ontology.     Story:  music  and  bands      The  current  configuraMon  of  the  “Red  Hot  Chili  Peppers”  are:  Anthony  Kiedis  (vocals),  Flea   (bass,  trumpet,  keyboards,  and  vocals),  John  Frusciante  (guitar),  and  Chad  Smith  (drums).   The  line-­‐up  has  changed  a  few  Mmes  during  they  years,  Frusciante  replaced  Hillel  Slovak  in   1988,  and  when  Jack  Irons  len  the  band  he  was  briefly  replaced  by  D.H.  Peligro  unMl  the   band  found  Chad  Smith.  In  addiMon  to  playing  guitars  for  Red  hot  Chili  Peppers  Frusciante   also  contributed  to  the  band  “The  Mars  Volta”  as  a  vocalist  for  some  Mme.      From  September  2004,  the  Red  Hot  Chili  Peppers  started  recording  the  album  “Stadium   Arcadium”.  The  album  contains  28  tracks  and  was  released  on  May  5  2006.  It  includes  a   track  of  the  song  “Hump  de  Bump”,  which  was  composed  in  January  26,  2004.  The  criMc   Crian  HiaL  defined  the  album  as  "the  most  ambiMous  work  in  his  twenty-­‐three-­‐year   career".  On  August  11  (2006)  the  band  gave  a  live  performance  in  Portland,  Oregon  (US),   featuring  songs  from  Stadium  Arcadium  and  other  albums.     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 78. E XERCISE  2   78   Competency  ques@ons  (CQs)  and  contextual  statements  of  music  and  bands     1.  What  instruments  does  a  certain  person  play?     2.  What  are  the  members  of  a  certain  band  during  a  certain  Nme  period?     3.  What  role  does  a  certain  person  have  in  a  certain  band  during  a  certain  Nme?     4.  During  what  Nme  period  was  a  certain  album  recorded?     5.  How  many  tracks  does  a  parNcular  album  contain?     6.  When  was  a  certain  album  released?     7.  What  song  is  a  specific  track  a  recording  of?     8.  9.  10.  11.  12.  13.  14.  When  was  a  certain  song  composed?     What  does  a  certain  criNc  say  about  a  certain  album?     When  did  a  certain  performance  take  place?     What  songs  were  played  in  a  certain  performance?     Where  did  a  certain  performance  take  place?     In  what  region  is  a  certain  city  located?     In  what  country  is  a  certain  region  located?     Contextual  statement:     ¥  An  album  always  contains  at  least  one  track.     AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 79. R EFERENCES   79   ¥  W3C:   ¤  ¥  Protégé:   ¤  ¥  hUp://www.w3.org/   hUp://protege.stanford.edu/   OWL:   ¤  ¤  ¥  hUp://www.w3.org/TR/owl-­‐features/   hUp://owl.cs.manchester.ac.uk/tutorials/protegeowltutorial/   SPARQL:   ¤  hUp://www.w3.org/TR/rdf-­‐sparql-­‐query/   ¤  hUp://jena.sourceforge.net/ARQ/Tutorial/   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 80. C ONTACTS   80   ¥  If  you  have  any  quesNons,  please  send  me  an   email  or  call  me:   E-­‐mail:  stefano.bragaglia@unibo.it     Tel:    051-­‐20.93086   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 81. A N  I NTRODUCTION     TO  O NTOLOGY  D EVELOPMENT   Stefano  Bragaglia  -­‐  May  14,  2010  
  • 82. A DDITIONAL  N OTES   82   ¥  Developing  an  ontology  is  an  iteraGve  process:  adding   new  concepts  o_en  leads  to  refactoring   ¥  It  is  a  good  pracNce  not  to  include  unneeded  concepts   into  the  ontology  (if  it  ain’t  broken,  don’t  fix  it)   ¥  Some  concepts  are  difficult  to  express  (i.e.:  Nme   relaNonships,  equivalence,  etc.)  but  can  be  easily   handled  by  introducing  ad  hoc  properGes  and  classes   ¤  Time  relaNonship:  TimePeriod  with  isPrior  or  isAfer   ¤  Equivalence:  Person  with  samePerson   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 83. M ULTIPLE  I NHERITANCE   83   ¥  One  of  the  reasons  ontologies  are  so  popular  is   that  they  support  mulGple  inheritance     ¤  A  YoungWoman  may  be  defined  as  a  subclass  of   Person,  Young  and  Female   ¤  This  is  as  powerful  as  risky,  since  it  o_en  collides   with  disjointness  declaraNons   ¤  Watch  out  for  inconsistencies!   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 84. 84   M ULTIPLE  I NHERITANCE   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 85. T HE  S ITUATION  P ATTERN   85   ¥  SomeNmes  staNng  concepts  separately  is  not  enough   since  they  have  to  be  considered  as  a  whole   ¤  ¥  Being  member  of  a  certain  band  during  a  certain  Nme   period  is  an  example   Such  a  case  is  generally  named  SituaNon  and  requires   the  definiNon  the  context,  a  class,  and  several  object   properNes  linking  the  context  to  each  concept  and  vice   versa   ¤  Given  the  classes  Person,  Band  and  TimePeriod,  the   situaNon  requires  the  definiNon  of  the  class  Membership   and  of  the  object  properNes  hasPerson,  hasBand  and   hasTimePeriod  (and  their  inverse  properNes)   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 86. 86   T HE  S ITUATION  P ATTERN   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 87. 87   T HE  S ITUATION  P ATTERN   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 88. 88   T HE  S ITUATION  P ATTERN   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010  
  • 89. C ONTACTS   89   ¥  If  you  have  any  quesNons,  please  send  me  an   email  or  call  me:   E-­‐mail:  stefano.bragaglia@unibo.it     Tel:    051-­‐20.93086   AN  INTRODUCTION  TO  ONTOLOGY  DEVELOPMENT   14/05/2010