SlideShare a Scribd company logo
1 of 53
Download to read offline
Ontology languages
RDF / RDF Schema




F. Corno, L. Farinetti - Politecnico di Torino   2
RDF Schema example




F. Corno, L. Farinetti - Politecnico di Torino   3
RDFS problems
        bl
     RDFS is too “weak” to describe resources
     with a suitable level of details
           range and domain cannot be localized (e.g.
           the range of hasChild is a person when
           applied to a person, elephant when applied to
           an elephant)
           no constraints on existence or cardinality (e.g.
           all instances of persons have one and only
           one mother which is a person, and have
           exactly two parents)
F. Corno, L. Farinetti - Politecnico di Torino            4
RDFS problems
             it is not possible to define transitive, inverse
             or symmetrical statements (e.g. p of is a
                   y                       ( g part
             transitive property, hasPart is the inverse of
             isPartOf, touches is symmetrical)
                       ,             y           )
       Reasoning is not well supported
             Non t d d
             N standard semantics, no native reasoner
                             ti         ti
             exists



F. Corno, L. Farinetti - Politecnico di Torino                  5
Requirements for an ontology
language
   g g
         Extend existing Web standards
               XML, RDF, RDFS, ...
         Easy t understand and t use
         E    to d t d d to
               based on well known KR languages
         Formally specified
         Adequate expressive power
         Adeq ate e pressi e po er
         Automatic support for reasoning
                     pp                g
F. Corno, L. Farinetti - Politecnico di Torino    6
Stack of Web languages

                                                                               W3C
                                                 IST EU project
                                                 OntoKnowledgeg           OWL
bioinformatics                                                                    DARPA
                                          University of         OIL    DAML+OIL
community
                                          Washington
                       XOL              SHOE       OML                RDF(S)

              University of
                       y
              Maryland                                    XML




F. Corno, L. Farinetti - Politecnico di Torino                                            7
Ontology Web Language (OWL)
O t l    W bL
     4th level on the semantic web cake
         le el                  eb
     Built on top of
                p
           XML
           RDF/S
     Three versions
           Lite
           DL (maps to Description Logic)
           Full (not fully tractable)
     Serializable
     S i li bl as XML
F. Corno, L. Farinetti - Politecnico di Torino   8
Ontology Web Language (OWL)




F. Corno, L. Farinetti - Politecnico di Torino   9
OWL-DL
OWL DL
     Based on Description Logic
     Well defined formal semantics
           well defined rules to treat sentence meaning
           well defined assumptions on the world being
                               p                      g
           modeled
     Well known reasoning/inferencing
                        g           g
     algorithms
           tractable,
           tractable conclusions can be derived in finite
           time
     Widely available reasoning systems
F. Corno, L. Farinetti - Politecnico di Torino              10
Building blocks in OWL
     Ontology declaration (XML syntax)
               <rdf:RDF xmlns:owl =http://www.w3.org/2002/07/owl#"
               xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 l    df "h     //     3    /1999/02/22 df           #"
               xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
               xmlns:xsd ="http://www.w3.org/2001/XMLSchema#">


     Ontology metadata (information about the
     ontology)
               <owl:Ontology rdf:about="">
                  <rdfs:comment>An example OWL ontology</rdfs:comment>
                  <owl:priorVersion
                  < l    i V    i
                      rdf:resource="http://www.mydomain.org/uni-ns-old"/>
                  <owl:imports
                      rdf:resource="http://www.mydomain.org/persons"/>
                                       p        y         g p
                  <rdfs:label>University Ontology</rdfs:label>
               </owl:Ontology>
F. Corno, L. Farinetti - Politecnico di Torino                            11
Classes
Cl
     Every class i a d
     E      l    is descendant of
                          d t f
           owl:Thing
                   g
     Classes are defined using
           owl:Class
                                   <owl:Class rdf:ID="Vehicle"/>

     Equivalence
           owl:equivalentClass
    <owl:Class rdf:ID="Car">
          <owl:equivalentClass rdf:resource="#Automobile"/>
                q
    </owl:Class>
F. Corno, L. Farinetti - Politecnico di Torino                     12
Subsumption
     Provided by
           owl:subClassOf



<owl:Class rdf:ID="2-Wheel-Drive">
< l Cl      df ID "2 Wh l D i ">
       <rdfs:subClassOf rdf:resource="#Car"/>
</owl:Class>




F. Corno, L. Farinetti - Politecnico di Torino   13
Partitions
     Disjoint partition
           owl:disjointWith


<owl:Class rdf:about="#2-Wheel-Drive">
       <owl:disjointWith
          rdf:resource="#4-Wheel-Drive"/>
</owl:Class>




F. Corno, L. Farinetti - Politecnico di Torino   14
Partitions
     Exhaustive partition
           owl:oneOf

    <owl:Class rdf:ID="Car">
           <owl:oneOf rdf:parseType="Collection">
                  <owl:Thing rdf:about="#2-Wheel-Drive"/>
                           g            #              /
                  <owl:Thing rdf:about="#4-Wheel-Drive"/>
           </owl:oneOf>
    </owl:Class>




F. Corno, L. Farinetti - Politecnico di Torino              15
Attributes
A ib
     Known also as “properties”
     Datatype properties
           Attributes that specify a class features by
           means of data (XSD datatype)
           Phone, title, age
     Object properties
           Attributes that define relationships between
           classes (Relations)
           isTaughtBy(Class(course), Class(professor))

F. Corno, L. Farinetti - Politecnico di Torino            16
Datatype properties
     Allow to describe a specific aspect of a
     concept
           Based on XSD data types
           The range specifies the data type
           The domain specifies the class to which the
           property is referred
   <owl:DatatypeProperty rdf:ID="age">
          <rdfs:domain rdf:resource="#Person"/>
          < df d    i   df          "#P     "/>
          <rdfs:range rdf:resource="http://www.w3.org/2001/
             XMLSchema#nonNegativeInteger"/>
   </owl:DatatypeProperty>

F. Corno, L. Farinetti - Politecnico di Torino            17
Relationships
     Directed
           From one concept to another, no viceversa
     Defined through object properties
           Domain: the class(es) from which the relation
           departs
           Range: the relation destination(s)
     Subsumption between relationships is
     possible
F. Corno, L. Farinetti - Politecnico di Torino             18
Relationships
     Example
<owl:ObjectProperty rdf:ID="isTaughtBy">
       <rdfs:domain rdf:resource="#course"/>
       <rdfs:range rdf:resource="#academicStaffMember"/>
       <rdfs:subPropertyOf rdf:resource="#involves"/>
</owl:ObjectProperty>




F. Corno, L. Farinetti - Politecnico di Torino             19
Instances (individuals)
I t       (i di id l )
     No i
     N unique name assumption i OWL
                         ti in
           If two instances have a different name or ID
           this does not imply that they are different
           individuals
           E.g.: “Queen Elizabeth”, “The Queen” and
           “Elizabeth Windsor” might all refer to the
                                    g
           same individual
           It must be explicitly stated that individuals are
           the same as each other, or different to each
           other
F. Corno, L. Farinetti - Politecnico di Torino             20
Instances (individuals)
I t       (i di id l )
     Defined by
     D fi d b means of
                     f
           rdf:Description + rdf:Type
                     p            yp

    <academicStaffMember rdf:ID="949352">
                         rdf:ID= 949352 >
           <uni:age rdf:datatype="&xsd;integer">
                   39
           </uni:age>
    </academicStaffMember>
    <rdf:Description rdf:ID="949353">
       <rdf:type rdf:resource="#academicStaffMember"/>
    </rdf:Description>




F. Corno, L. Farinetti - Politecnico di Torino           21
Advanced constructs
Ad     d     t t
     OWL supports several advanced constructs to
     define classes and relationships
     Intensional definition of classes
           By defining constraints on attribute values (
            y        g                                 (either
           object or datatype properties)
    <owl:Class rdf:about="#academicStaffMember">
            <rdfs:subClassOf>
                   <owl:Restriction>
                   <owl:onProperty rdf:resource="#teaches"/>
                   <owl:someValuesFrom
                   < l      V l    F
                           rdf:resource="#undergraduateCourse"/>
                   </owl:Restriction>
            </rdfs:subClassOf>
    </owl:Class>

F. Corno, L. Farinetti - Politecnico di Torino                     22
Advanced constructs
Ad     d     t t
     Cardinality
           Used to fix the number of instances that can be
           related
           E.g.: a department should have at least 10 members

   <owl:Class rdf:about="#department">
    <rdfs:subClassOf>
           <owl:Restriction>
             <owl:onProperty rdf:resource="#hasMember"/>
             <owl:minCardinality
                rdf:datatype="&xsd;nonNegativeInteger"> 10
             </owl:minCardinality>
           </owl:Restriction>
    </rdfs:subClassOf>
   </owl:Class>

F. Corno, L. Farinetti - Politecnico di Torino                  23
Special properties
S   i l       ti
     owl:TransitiveProperty
           defines a transitive property, such as “has better
           grade than”, “is taller than”, or “is ancestor of”
     owl:SymmetricProperty
           defines a symmetric property, such as “has same
           grade as” or “is sibling of”
     owl:FunctionalProperty
           defines a property that has at most one value for
           each object, such as “age”, “height”, or
           “directSupervisor”

F. Corno, L. Farinetti - Politecnico di Torino                  24
Special properties
     owl:InverseFunctionalProperty
           defines a property for which two different
           objects cannot have the same value
              j
           E.g.: the property
           “isTheSocialSecurityNumberFor”: a social
            isTheSocialSecurityNumberFor :
           security number is assigned to one person
           only



F. Corno, L. Farinetti - Politecnico di Torino          25
OWL class constructors




F. Corno, L. Farinetti - Politecnico di Torino   26
OWL axioms




F. Corno, L. Farinetti - Politecnico di Torino   27
OWL: h t f ?
OWL what for?
   To build an ontology
         define classes and provide information on them
                            p
         define properties and provide information on
         them
   To express facts about a domain
         provide information on instances (individuals)
   To reason about ontologies and facts
         discover consequences of what is expressly
         stated
F. Corno, L. Farinetti - Politecnico di Torino            28
Example of ontology
      p          gy
building in OWL
with P té é
 ith Protégé
Protégé
     Open source ontology editor
     Developed by Stanford Center for
     Biomedical Informatics Research at the
     Stanford University School of Medicine
     http://protege.stanford.edu/
     htt // t        t f d d /




F. Corno, L. Farinetti - Politecnico di Torino   30
F. Corno, L. Farinetti - Politecnico di Torino   31
Project steps
0. Conceptual design of the ontology
1. Classes definition
2.
2 Properties definition
3. Individuals definition
4. Restrictions definition



F. Corno, L. Farinetti - Politecnico di Torino   32
Step 0
     Conceptual design of the ontology




F. Corno, L. Farinetti - Politecnico di Torino   33
Bed&Breakfast                                                                                     OneStarRating
                                                                                        hasRating            Accommodation
                                                                                                                 Rating
                                                                   Accommodation                                                        TwoStarRating

                                                                                            Camping
                                         Budget                                                                     ThreeStarRating
                                     Accommodation
                                                               Hotel
                                                                                                                                                             int
                                                                                                                                          hasZipCode
                                                                              hasAccommodation
                                                    Luxury Hotel                                                                                              string
                                                                                                       Backpacker                         Contact
                            Hiking                                                                     Destination                                      hasStreet
         Surfing                                                                                                                            hasEMail
                                                                   Sheraton                                            hasContact
                                                                                                                          C                                  string

                          Sports                                                     isOffered
                                                                                                      Destination
 Yoga                                                                                                                           Beach
                                             Activity                                                                                            Caprera
                                                                                                                    hasCity
                   Relaxation
                                                              hasActivity
                                                                                Quiet                                         string
                                                                              Destination                Family
                                                                                                       Destination                         Gallipoli
Sunbathing
                            Adventure                Sightseeing

                                                                                            Bardonecchia
                                                                                                                       Rimini
                                           Safari
        BunjeeJumping
                                                                   Museums




 F. Corno, L. Farinetti - Politecnico di Torino                                                                                                                    34
Step 1a
     Define classes and subclasses
           Is-a relationship, or subsumption




F. Corno, L. Farinetti - Politecnico di Torino   35
Bed&Breakfast
                                                                                                            Accommodation
                                                                                                                Rating
                                                                   Accommodation
                                                                                           Camping
                                         Budget
                                     Accommodation
                                                               Hotel




                                                    Luxury Hotel
                                                                                                      Backpacker                Contact
                            Hiking                                                                    Destination

         Surfing


                          Sports
                                                                                                     Destination
 Yoga                                                                                                                   Beach
                                             Activity

                   Relaxation
                                                                               Quiet
                                                                             Destination                Family
                                                                                                      Destination
Sunbathing
                            Adventure                Sightseeing



                                           Safari
        BunjeeJumping
                                                                   Museums




 F. Corno, L. Farinetti - Politecnico di Torino                                                                                           36
OWL code
                   <owl:Class rdf:ID="Camping">
                       <rdfs:subClassOf>
                         <owl:Class rdf:ID="Accommodation"/>
                                    rdf:ID Accommodation />
                       </rdfs:subClassOf>
                     </owl:Class>
                     <owl:Class rdf:ID="BudgetAccommodation">
                       <rdfs:subClassOf rdf:resource #Accommodation />
                                        rdf:resource="#Accommodation"/>
                     </owl:Class>
                     <owl:Class rdf:ID="BedAndBreakfast">
                       <rdfs:subClassOf rdf:resource="#Accommodation"/>
                     </owl:Class>
                     <owl:Class rdf:ID="LuxuryHotel">
                       <rdfs:subClassOf>
                         <owl:Class rdf:ID="Hotel"/>
                       </rdfs:subClassOf>
                     </owl:Class>
                     <owl:Class rdf:about="#Hotel">
                       <rdfs:subClassOf rdf:resource="#Accommodation"/>
                     </owl:Class>


F. Corno, L. Farinetti - Politecnico di Torino                              37
Step 1b
                                                                                               Disjoint
     Define disjoint                               Bed&Breakfast




     classes                                                         Accommodation
                                                                                     Camping
                                                     Budget
                                                 Accommodation
                                                                   Hotel




   <owl:Class rdf:about="#Hotel">
       <owl:disjointWith rdf:resource="#Camping"/>
       <owl:disjointWith>
         <owl:Class rdf:about="#BedAndBreakfast"/>
       </owl:disjointWith>
       <rdfs:subClassOf rdf:resource="#Accommodation"/>
    </owl:Class>




F. Corno, L. Farinetti - Politecnico di Torino                                                       38
Step 1c                                                                        Activity




                                                                 Adventure                Sightseeing

     Define multiple
                                                                             Safari

     inheritance                                 BunjeeJumping
                                                                                                        Museums




F. Corno, L. Farinetti - Politecnico di Torino                                                                    39
Step 2a                                                             Accommodation
                                                                                           Range




     Define object properties                                               hasAccommodation

           relationships                                                                          Domain



                                                                                               Destination




                                            <owl:ObjectProperty rdf:ID="hasAccommodation">
                                               <rdfs:domain rdf:resource="#Destination"/>
                                               <rdfs:range rdf:resource="#Accommodation"/>
                                            </owl:ObjectProperty>


F. Corno, L. Farinetti - Politecnico di Torino                                                               40
Step 2b
     Define object properties characteristics
           E.g:
           E g: define an inverse object property

                                                                                   isOffered
                                                                                               Destination

                                                          Activity
                                                                     hasActivity




                                             <owl:ObjectProperty rdf:about #isOffered >
                                                                 rdf:about="#isOffered">
                                                <rdfs:range rdf:resource="#Destination"/>
                                                <owl:inverseOf rdf:resource="#hasActivity"/>
                                                <rdfs:domain rdf:resource="#Activity"/>
                                             </owl:ObjectProperty>


F. Corno, L. Farinetti - Politecnico di Torino                                                               41
int


Step 2c
                                                 hasZipCode

                                                                    string
                                                 Contact
                                                              hasStreet

                                                   hasEMail        string


     Define datatype properties
           The range specifies the
           data type
                 yp


 <owl:DatatypeProperty rdf:ID="hasEMail">
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
    <rdfs:domain rdf:resource="#Contact"/>
   /owl:DatatypeProperty
  </owl:DatatypeProperty>
  <owl:DatatypeProperty rdf:ID="hasZipCode">
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
    <rdfs:domain rdf:resource="#Contact"/>
 </owl:DatatypeProperty>


F. Corno, L. Farinetti - Politecnico di Torino                               42
Step 3                                                                            Accommodation
                                                                                                        OneStarRating

                                                                                      Rating
                                                                                           g
                                                                                                      TwoStarRating



     Define individuals                                                             ThreeStarRating




           instances                                         Family
                                                           Destination



                                                 Bardonecchia
                                                                         Rimini




  <AccommodationRating rdf:ID="OneStarRating"/>
  <AccommodationRating rdf:ID="ThreeStarRating"/>
  <AccommodationRating rdf:ID="TwoStarRating"/>
  <FamilyDestination rdf:ID="Bardonecchia"/>
  <F il D ti ti       df ID "B d      hi "/>
  <FamilyDestination rdf:ID="Rimini"/>




F. Corno, L. Farinetti - Politecnico di Torino                                                                          43
Step 4
     Define restrictions
           To restrict the individuals that belong to a
           class
           Quantifier restrictions (existential, universal
           quantifiers)
           Cardinality restrictions
           hasValue
           h V l restrictions
                          t i ti


F. Corno, L. Farinetti - Politecnico di Torino               44
Step 4 – example 1                                                            Accommodation




                                                                                 hasAccommodation >= 1
                                                             Activity
      FamilyDestination is a                                                                  Destination
      Destination ith t least one
      D ti ti with at l      t                                          hasActivity >= 2

      accommodation and at least
                                                                                                 Family
      2 activities                                                                             Destination




                                                           Necessary and
                                                          sufficient condition




                                                 Cardinality restriction
F. Corno, L. Farinetti - Politecnico di Torino                                                               45
FamilyDestination is a
Step
St 4 – example 1
            l                                          Destination with at least
                                                       one accommodation and
<owl:Class rdf:ID= FamilyDestination >
           rdf:ID="FamilyDestination">                 at least 2 activities
   <owl:equivalentClass>
     <owl:Class>
       <owl:intersectionOf rdf:parseType="Collection">
         <owl:Restriction>
           <owl:onProperty>
             <owl:ObjectProperty rdf:ID="hasAccommodation"/>
           </owl:onProperty>
           <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
           >1</owl:minCardinality>
              /     i      i  i
         </owl:Restriction>
         <owl:Restriction>
           <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
           >2</owl:minCardinality>
           <owl:onProperty>
             <owl:ObjectProperty rdf:ID="hasActivity"/>
           </owl:onProperty>
         </owl:Restriction>
         <owl:Class rdf:about="#Destination"/>
       </owl:intersectionOf>
     </owl:Class>
   </owl:equivalentClass>
</owl:Class>
 /


 F. Corno, L. Farinetti - Politecnico di Torino                                    46
Step 4 – example 2
      QuietDestination is a Destination                                             Destination


      that is t h
      th t i not chosen b noisy
                        by i
      families                                                          Quiet
                                                                      Destination      Family
                                                                                     Destination




                                                 Complement restriction


F. Corno, L. Farinetti - Politecnico di Torino                                                     47
Step
St 4 – example 2
            l                                        QuietDestination is a
                                                     Destination that is not
                                                     chosen by noisy families
    <owl:Class rdf:ID="QuietDestination">
      <owl:equivalentClass>
        <owl:Class>
          <owl:intersectionOf rdf:parseType="Collection">
            <owl:Class>
              <owl:complementOf rdf:resource="#FamilyDestination"/>
            </owl:Class>
            <owl:Class rdf:about="#Destination"/>
          </owl:intersectionOf>
        </owl:Class>
      </owl:equivalentClass>
    </owl:Class>




F. Corno, L. Farinetti - Politecnico di Torino                             48
OneStarRating



Step
St 4 – example 3
            l                                                                               Accommodation
                                                                                                Rating
                                                                                                                    TwoStarRating



                                                            Bed&Breakfast
                                                                                                                  ThreeStarRating




                                                     Budget
                                                                                hasRating
                                                 Accommodation                                                   Camping




                                                                            Accommodation

   BudgetAccommodation is
                                                                                                             Luxury Hotel
   an Accommodation that has                                                                 Hotel

   either one or two star rating
                               g                                                                                 Sheraton




                                                    Existential restriction
F. Corno, L. Farinetti - Politecnico di Torino                                                                              49
Step
St 4 – example 3
            l                                           BudgetAccommodation
                                                        is an Accommodation
                                                        that has either one or
   <owl:Class rdf:ID "BudgetAccommodation">
              rdf:ID="BudgetAccommodation">             two star rating
                                                        t     t    ti
     <owl:equivalentClass>
       <owl:Class>
         <owl:intersectionOf rdf:parseType="Collection">
           <owl:Restriction>
             <owl:onProperty>
               <owl:ObjectProperty rdf:ID="hasRating"/>
             </owl:onProperty>
             <owl:someValuesFrom>
               <owl:Class>
                 <owl:oneOf rdf:parseType="Collection">
                   <AccommodationRating rdf:ID="OneStarRating"/>
                   <AccommodationRating rdf:ID= TwoStarRating />
                                        rdf:ID="TwoStarRating"/>
                 </owl:oneOf>
               </owl:Class>
             </owl:someValuesFrom>
           </owl:Restriction>
           <owl:Class rdf:about="#Accommodation"/>
         </owl:intersectionOf>
       </owl:Class>
     </owl:equivalentClass>
   </owl:Class>

F. Corno, L. Farinetti - Politecnico di Torino                            50
Bed&Breakfast
                                                                                                                      B d&B kf t
                                                                                                         Hotel


Step 4 – example 4                                                          Camping


                                                                                                    Accommodation
                                                                          Budget
   BackpackerDestination                                              Accommodation
                                                                                                                      hasAccommodation

   is a Destination that                                                                                                Backpacker
                                                                   Sports                                               Destination
                                                                                           hasActivity
   provides budget
   accommodation and                             Relaxation                   Activity                           Destination


   offers sport or
     ff       t
                                                              Adventure
   adventure activities                                                               Sightseeing




F. Corno, L. Farinetti - Politecnico di Torino                                                                                        51
BackpackerDestination is
                                                                     p
Step 4 – example 4                                              a Destination that provides
                                                                budget accommodation
   <owl:Class rdf:ID="BackpackerDestination">                   and offers sport or
     <owl:equivalentClass>                                      adventure activities
        <owl:Class>
           <owl:intersectionOf rdf:parseType="Collection">
              <owl:Restriction>
                 <owl:onProperty>
                   <owl:ObjectProperty rdf:ID="hasAccommodation"/>
                 </owl:onProperty>
                 <owl:someValuesFrom rdf:resource="#BudgetAccommodation"/>
              </owl:Restriction>
              <owl:Class rdf:about="#Destination"/>
              < l Cl            df b t "#D ti ti "/>
              <owl:Restriction>
                 <owl:onProperty>
                   <owl:ObjectProperty rdf:ID="hasActivity"/>
                 </owl:onProperty>
                 <owl:someValuesFrom>
                   <owl:Class>
                        <owl:unionOf rdf:parseType="Collection">
                          <owl:Class rdf:about="#Sports"/>
                          <owl:Class rdf:about #Adventure />
                                           rdf:about="#Adventure"/>
                        </owl:unionOf>
                   </owl:Class>
                 </owl:someValuesFrom>
              </owl:Restriction>
           </owl:intersectionOf>
        </owl:Class>
     </owl:equivalentClass>
F. Corno, L. Farinetti - Politecnico di Torino
   </owl:Class>                                                                        52
License
     This work is licensed under the Creative
     Commons Attribution-Noncommercial-
     Share Alike 3.0 Unported License.
     To view a copy of this license visit
                            license,
     http://creativecommons.org/licenses/by-
     nc-sa/3.0/ or send a letter to C
            /3 0/                   Creative
     Commons, 171 Second Street, Suite 300,
     San Francisco, California, 94105, USA.

F. Corno, L. Farinetti - Politecnico di Torino   53

More Related Content

What's hot

Linked Open Data to support content based Recommender Systems
Linked Open Data to support content based Recommender SystemsLinked Open Data to support content based Recommender Systems
Linked Open Data to support content based Recommender Systems
Vito Ostuni
 
Collaborative Semantic Web Applications and Linked Justifications
Collaborative Semantic Web Applications and Linked JustificationsCollaborative Semantic Web Applications and Linked Justifications
Collaborative Semantic Web Applications and Linked Justifications
Rakebul Hasan
 

What's hot (10)

A Semantic Multimedia Web (Part 2)
A Semantic Multimedia Web (Part 2)A Semantic Multimedia Web (Part 2)
A Semantic Multimedia Web (Part 2)
 
From Exploratory Search to Web Search and back - PIKM 2010
From Exploratory Search to Web Search and back - PIKM 2010From Exploratory Search to Web Search and back - PIKM 2010
From Exploratory Search to Web Search and back - PIKM 2010
 
Ontology Engineering: Introduction
Ontology Engineering: IntroductionOntology Engineering: Introduction
Ontology Engineering: Introduction
 
Linked Open Data to support content based Recommender Systems
Linked Open Data to support content based Recommender SystemsLinked Open Data to support content based Recommender Systems
Linked Open Data to support content based Recommender Systems
 
Collaborative Semantic Web Applications and Linked Justifications
Collaborative Semantic Web Applications and Linked JustificationsCollaborative Semantic Web Applications and Linked Justifications
Collaborative Semantic Web Applications and Linked Justifications
 
Topical_Facets
Topical_FacetsTopical_Facets
Topical_Facets
 
Neo4j GraphTour New YorkOntologies and Knowledge Graphs
Neo4j GraphTour New YorkOntologies and Knowledge GraphsNeo4j GraphTour New YorkOntologies and Knowledge Graphs
Neo4j GraphTour New YorkOntologies and Knowledge Graphs
 
A First Analysis of String APIs: the Case of Pharo
A First Analysis of String APIs: the Case of PharoA First Analysis of String APIs: the Case of Pharo
A First Analysis of String APIs: the Case of Pharo
 
Introduction to Ontology Concepts and Terminology
Introduction to Ontology Concepts and TerminologyIntroduction to Ontology Concepts and Terminology
Introduction to Ontology Concepts and Terminology
 
Representing Translations on the Semantic Web
Representing Translations on the Semantic WebRepresenting Translations on the Semantic Web
Representing Translations on the Semantic Web
 

Viewers also liked

Viewers also liked (18)

Recursion in Java
Recursion in JavaRecursion in Java
Recursion in Java
 
Apache HTTP Server - Funzionalità - Configurazione - Virtual Host - SSL e https
Apache HTTP Server - Funzionalità - Configurazione - Virtual Host - SSL e httpsApache HTTP Server - Funzionalità - Configurazione - Virtual Host - SSL e https
Apache HTTP Server - Funzionalità - Configurazione - Virtual Host - SSL e https
 
Presentazione del corso di Mater in e-Learning per la Pubblica Amministrazione
 Presentazione del corso di Mater in e-Learning per la Pubblica Amministrazione Presentazione del corso di Mater in e-Learning per la Pubblica Amministrazione
Presentazione del corso di Mater in e-Learning per la Pubblica Amministrazione
 
Richiami su Linux - Webmin - Reti di calcolatori
Richiami su Linux - Webmin - Reti di calcolatoriRichiami su Linux - Webmin - Reti di calcolatori
Richiami su Linux - Webmin - Reti di calcolatori
 
Jdbc[1]
Jdbc[1]Jdbc[1]
Jdbc[1]
 
Rudimenti di programmazione grafica in C con la libreria grafica WinBGIm
Rudimenti di programmazione grafica in C con la libreria grafica WinBGIm Rudimenti di programmazione grafica in C con la libreria grafica WinBGIm
Rudimenti di programmazione grafica in C con la libreria grafica WinBGIm
 
DOG: an Ontology-Powered OSGi Domotic Gateway
DOG: an Ontology-Powered OSGi Domotic GatewayDOG: an Ontology-Powered OSGi Domotic Gateway
DOG: an Ontology-Powered OSGi Domotic Gateway
 
FaSet: A Set Theory Model for Faceted Search
FaSet: A Set Theory Model for Faceted SearchFaSet: A Set Theory Model for Faceted Search
FaSet: A Set Theory Model for Faceted Search
 
Database access and JDBC
Database access and JDBCDatabase access and JDBC
Database access and JDBC
 
Formal Verification of Device State Chart Models
Formal Verification of Device State Chart ModelsFormal Verification of Device State Chart Models
Formal Verification of Device State Chart Models
 
Rule-based reasoning in the Semantic Web
Rule-based reasoning in the Semantic WebRule-based reasoning in the Semantic Web
Rule-based reasoning in the Semantic Web
 
Smart Buildings: dal campo al modello, andata e ritorno
Smart Buildings: dal campo al modello, andata e ritornoSmart Buildings: dal campo al modello, andata e ritorno
Smart Buildings: dal campo al modello, andata e ritorno
 
Architetture web - Linguaggi e standard - Web server, application server, dat...
Architetture web - Linguaggi e standard - Web server, application server, dat...Architetture web - Linguaggi e standard - Web server, application server, dat...
Architetture web - Linguaggi e standard - Web server, application server, dat...
 
Comunicazione aumentativa alternativa - cenni (corso di Tecnologie per la Dis...
Comunicazione aumentativa alternativa - cenni (corso di Tecnologie per la Dis...Comunicazione aumentativa alternativa - cenni (corso di Tecnologie per la Dis...
Comunicazione aumentativa alternativa - cenni (corso di Tecnologie per la Dis...
 
Ontologies: introduction, design, languages and tools
Ontologies: introduction, design, languages and toolsOntologies: introduction, design, languages and tools
Ontologies: introduction, design, languages and tools
 
JavaFX fundamentals
JavaFX fundamentalsJavaFX fundamentals
JavaFX fundamentals
 
Web Architectures
Web ArchitecturesWeb Architectures
Web Architectures
 
Lists (Java Collections)
Lists (Java Collections)Lists (Java Collections)
Lists (Java Collections)
 

Similar to Ontology languages and OWL

ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and DatabasesESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
eswcsummerschool
 
Lri Owl And Ontologies 04 04
Lri Owl And Ontologies 04 04Lri Owl And Ontologies 04 04
Lri Owl And Ontologies 04 04
Rinke Hoekstra
 
Semantic Web special interest group meeting - IFLA WLIC 2012
Semantic Web special interest group meeting - IFLA WLIC 2012Semantic Web special interest group meeting - IFLA WLIC 2012
Semantic Web special interest group meeting - IFLA WLIC 2012
Figoblog
 
Ontology engineering: Ontology alignment
Ontology engineering: Ontology alignmentOntology engineering: Ontology alignment
Ontology engineering: Ontology alignment
Guus Schreiber
 
Choices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein OntologiesChoices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein Ontologies
benosteen
 
Linking Open Data with Drupal
Linking Open Data with DrupalLinking Open Data with Drupal
Linking Open Data with Drupal
emmanuel_jamin
 
wimmics and DBpedia FR
wimmics and DBpedia FRwimmics and DBpedia FR
wimmics and DBpedia FR
JulienCojan
 

Similar to Ontology languages and OWL (20)

Logic and Reasoning in the Semantic Web
Logic and Reasoning in the Semantic WebLogic and Reasoning in the Semantic Web
Logic and Reasoning in the Semantic Web
 
Methods and experiences in cultural heritage enhancement
Methods and experiences in cultural heritage enhancementMethods and experiences in cultural heritage enhancement
Methods and experiences in cultural heritage enhancement
 
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
 
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and DatabasesESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
ESWC SS 2012 - Monday Keynote Enrico Franconi: Ontologies and Databases
 
Ontologies and Semantic in OpenSource projects
Ontologies and Semantic in OpenSource projectsOntologies and Semantic in OpenSource projects
Ontologies and Semantic in OpenSource projects
 
Semantic Web from the 2013 Perspective
Semantic Web from the 2013 PerspectiveSemantic Web from the 2013 Perspective
Semantic Web from the 2013 Perspective
 
Lri Owl And Ontologies 04 04
Lri Owl And Ontologies 04 04Lri Owl And Ontologies 04 04
Lri Owl And Ontologies 04 04
 
RDFS In A Nutshell V1
RDFS In A Nutshell V1RDFS In A Nutshell V1
RDFS In A Nutshell V1
 
Semantic Web special interest group meeting - IFLA WLIC 2012
Semantic Web special interest group meeting - IFLA WLIC 2012Semantic Web special interest group meeting - IFLA WLIC 2012
Semantic Web special interest group meeting - IFLA WLIC 2012
 
Contexts and Importing in RDF
Contexts and Importing in RDFContexts and Importing in RDF
Contexts and Importing in RDF
 
Ontology engineering: Ontology alignment
Ontology engineering: Ontology alignmentOntology engineering: Ontology alignment
Ontology engineering: Ontology alignment
 
Linked Data and Archival Description: Confluences, Contingencies, and Conflicts
Linked Data and Archival Description: Confluences, Contingencies, and ConflictsLinked Data and Archival Description: Confluences, Contingencies, and Conflicts
Linked Data and Archival Description: Confluences, Contingencies, and Conflicts
 
Semantic Rubrication
Semantic RubricationSemantic Rubrication
Semantic Rubrication
 
Ontologies introduction - ecoOnto meeting
Ontologies introduction - ecoOnto meetingOntologies introduction - ecoOnto meeting
Ontologies introduction - ecoOnto meeting
 
Framester: A Wide Coverage Linguistic Linked Data Hub
Framester: A Wide Coverage Linguistic Linked Data HubFramester: A Wide Coverage Linguistic Linked Data Hub
Framester: A Wide Coverage Linguistic Linked Data Hub
 
Choices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein OntologiesChoices, modelling and Frankenstein Ontologies
Choices, modelling and Frankenstein Ontologies
 
Linking Open Data with Drupal
Linking Open Data with DrupalLinking Open Data with Drupal
Linking Open Data with Drupal
 
Linking Open, Big Data Using Semantic Web Technologies - An Introduction
Linking Open, Big Data Using Semantic Web Technologies - An IntroductionLinking Open, Big Data Using Semantic Web Technologies - An Introduction
Linking Open, Big Data Using Semantic Web Technologies - An Introduction
 
wimmics and DBpedia FR
wimmics and DBpedia FRwimmics and DBpedia FR
wimmics and DBpedia FR
 
Wi2015 - Clustering of Linked Open Data - the LODeX tool
Wi2015 - Clustering of Linked Open Data - the LODeX toolWi2015 - Clustering of Linked Open Data - the LODeX tool
Wi2015 - Clustering of Linked Open Data - the LODeX tool
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

Ontology languages and OWL

  • 2. RDF / RDF Schema F. Corno, L. Farinetti - Politecnico di Torino 2
  • 3. RDF Schema example F. Corno, L. Farinetti - Politecnico di Torino 3
  • 4. RDFS problems bl RDFS is too “weak” to describe resources with a suitable level of details range and domain cannot be localized (e.g. the range of hasChild is a person when applied to a person, elephant when applied to an elephant) no constraints on existence or cardinality (e.g. all instances of persons have one and only one mother which is a person, and have exactly two parents) F. Corno, L. Farinetti - Politecnico di Torino 4
  • 5. RDFS problems it is not possible to define transitive, inverse or symmetrical statements (e.g. p of is a y ( g part transitive property, hasPart is the inverse of isPartOf, touches is symmetrical) , y ) Reasoning is not well supported Non t d d N standard semantics, no native reasoner ti ti exists F. Corno, L. Farinetti - Politecnico di Torino 5
  • 6. Requirements for an ontology language g g Extend existing Web standards XML, RDF, RDFS, ... Easy t understand and t use E to d t d d to based on well known KR languages Formally specified Adequate expressive power Adeq ate e pressi e po er Automatic support for reasoning pp g F. Corno, L. Farinetti - Politecnico di Torino 6
  • 7. Stack of Web languages W3C IST EU project OntoKnowledgeg OWL bioinformatics DARPA University of OIL DAML+OIL community Washington XOL SHOE OML RDF(S) University of y Maryland XML F. Corno, L. Farinetti - Politecnico di Torino 7
  • 8. Ontology Web Language (OWL) O t l W bL 4th level on the semantic web cake le el eb Built on top of p XML RDF/S Three versions Lite DL (maps to Description Logic) Full (not fully tractable) Serializable S i li bl as XML F. Corno, L. Farinetti - Politecnico di Torino 8
  • 9. Ontology Web Language (OWL) F. Corno, L. Farinetti - Politecnico di Torino 9
  • 10. OWL-DL OWL DL Based on Description Logic Well defined formal semantics well defined rules to treat sentence meaning well defined assumptions on the world being p g modeled Well known reasoning/inferencing g g algorithms tractable, tractable conclusions can be derived in finite time Widely available reasoning systems F. Corno, L. Farinetti - Politecnico di Torino 10
  • 11. Building blocks in OWL Ontology declaration (XML syntax) <rdf:RDF xmlns:owl =http://www.w3.org/2002/07/owl#" xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" l df "h // 3 /1999/02/22 df #" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd ="http://www.w3.org/2001/XMLSchema#"> Ontology metadata (information about the ontology) <owl:Ontology rdf:about=""> <rdfs:comment>An example OWL ontology</rdfs:comment> <owl:priorVersion < l i V i rdf:resource="http://www.mydomain.org/uni-ns-old"/> <owl:imports rdf:resource="http://www.mydomain.org/persons"/> p y g p <rdfs:label>University Ontology</rdfs:label> </owl:Ontology> F. Corno, L. Farinetti - Politecnico di Torino 11
  • 12. Classes Cl Every class i a d E l is descendant of d t f owl:Thing g Classes are defined using owl:Class <owl:Class rdf:ID="Vehicle"/> Equivalence owl:equivalentClass <owl:Class rdf:ID="Car"> <owl:equivalentClass rdf:resource="#Automobile"/> q </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 12
  • 13. Subsumption Provided by owl:subClassOf <owl:Class rdf:ID="2-Wheel-Drive"> < l Cl df ID "2 Wh l D i "> <rdfs:subClassOf rdf:resource="#Car"/> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 13
  • 14. Partitions Disjoint partition owl:disjointWith <owl:Class rdf:about="#2-Wheel-Drive"> <owl:disjointWith rdf:resource="#4-Wheel-Drive"/> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 14
  • 15. Partitions Exhaustive partition owl:oneOf <owl:Class rdf:ID="Car"> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#2-Wheel-Drive"/> g # / <owl:Thing rdf:about="#4-Wheel-Drive"/> </owl:oneOf> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 15
  • 16. Attributes A ib Known also as “properties” Datatype properties Attributes that specify a class features by means of data (XSD datatype) Phone, title, age Object properties Attributes that define relationships between classes (Relations) isTaughtBy(Class(course), Class(professor)) F. Corno, L. Farinetti - Politecnico di Torino 16
  • 17. Datatype properties Allow to describe a specific aspect of a concept Based on XSD data types The range specifies the data type The domain specifies the class to which the property is referred <owl:DatatypeProperty rdf:ID="age"> <rdfs:domain rdf:resource="#Person"/> < df d i df "#P "/> <rdfs:range rdf:resource="http://www.w3.org/2001/ XMLSchema#nonNegativeInteger"/> </owl:DatatypeProperty> F. Corno, L. Farinetti - Politecnico di Torino 17
  • 18. Relationships Directed From one concept to another, no viceversa Defined through object properties Domain: the class(es) from which the relation departs Range: the relation destination(s) Subsumption between relationships is possible F. Corno, L. Farinetti - Politecnico di Torino 18
  • 19. Relationships Example <owl:ObjectProperty rdf:ID="isTaughtBy"> <rdfs:domain rdf:resource="#course"/> <rdfs:range rdf:resource="#academicStaffMember"/> <rdfs:subPropertyOf rdf:resource="#involves"/> </owl:ObjectProperty> F. Corno, L. Farinetti - Politecnico di Torino 19
  • 20. Instances (individuals) I t (i di id l ) No i N unique name assumption i OWL ti in If two instances have a different name or ID this does not imply that they are different individuals E.g.: “Queen Elizabeth”, “The Queen” and “Elizabeth Windsor” might all refer to the g same individual It must be explicitly stated that individuals are the same as each other, or different to each other F. Corno, L. Farinetti - Politecnico di Torino 20
  • 21. Instances (individuals) I t (i di id l ) Defined by D fi d b means of f rdf:Description + rdf:Type p yp <academicStaffMember rdf:ID="949352"> rdf:ID= 949352 > <uni:age rdf:datatype="&xsd;integer"> 39 </uni:age> </academicStaffMember> <rdf:Description rdf:ID="949353"> <rdf:type rdf:resource="#academicStaffMember"/> </rdf:Description> F. Corno, L. Farinetti - Politecnico di Torino 21
  • 22. Advanced constructs Ad d t t OWL supports several advanced constructs to define classes and relationships Intensional definition of classes By defining constraints on attribute values ( y g (either object or datatype properties) <owl:Class rdf:about="#academicStaffMember"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#teaches"/> <owl:someValuesFrom < l V l F rdf:resource="#undergraduateCourse"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 22
  • 23. Advanced constructs Ad d t t Cardinality Used to fix the number of instances that can be related E.g.: a department should have at least 10 members <owl:Class rdf:about="#department"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#hasMember"/> <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger"> 10 </owl:minCardinality> </owl:Restriction> </rdfs:subClassOf> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 23
  • 24. Special properties S i l ti owl:TransitiveProperty defines a transitive property, such as “has better grade than”, “is taller than”, or “is ancestor of” owl:SymmetricProperty defines a symmetric property, such as “has same grade as” or “is sibling of” owl:FunctionalProperty defines a property that has at most one value for each object, such as “age”, “height”, or “directSupervisor” F. Corno, L. Farinetti - Politecnico di Torino 24
  • 25. Special properties owl:InverseFunctionalProperty defines a property for which two different objects cannot have the same value j E.g.: the property “isTheSocialSecurityNumberFor”: a social isTheSocialSecurityNumberFor : security number is assigned to one person only F. Corno, L. Farinetti - Politecnico di Torino 25
  • 26. OWL class constructors F. Corno, L. Farinetti - Politecnico di Torino 26
  • 27. OWL axioms F. Corno, L. Farinetti - Politecnico di Torino 27
  • 28. OWL: h t f ? OWL what for? To build an ontology define classes and provide information on them p define properties and provide information on them To express facts about a domain provide information on instances (individuals) To reason about ontologies and facts discover consequences of what is expressly stated F. Corno, L. Farinetti - Politecnico di Torino 28
  • 29. Example of ontology p gy building in OWL with P té é ith Protégé
  • 30. Protégé Open source ontology editor Developed by Stanford Center for Biomedical Informatics Research at the Stanford University School of Medicine http://protege.stanford.edu/ htt // t t f d d / F. Corno, L. Farinetti - Politecnico di Torino 30
  • 31. F. Corno, L. Farinetti - Politecnico di Torino 31
  • 32. Project steps 0. Conceptual design of the ontology 1. Classes definition 2. 2 Properties definition 3. Individuals definition 4. Restrictions definition F. Corno, L. Farinetti - Politecnico di Torino 32
  • 33. Step 0 Conceptual design of the ontology F. Corno, L. Farinetti - Politecnico di Torino 33
  • 34. Bed&Breakfast OneStarRating hasRating Accommodation Rating Accommodation TwoStarRating Camping Budget ThreeStarRating Accommodation Hotel int hasZipCode hasAccommodation Luxury Hotel string Backpacker Contact Hiking Destination hasStreet Surfing hasEMail Sheraton hasContact C string Sports isOffered Destination Yoga Beach Activity Caprera hasCity Relaxation hasActivity Quiet string Destination Family Destination Gallipoli Sunbathing Adventure Sightseeing Bardonecchia Rimini Safari BunjeeJumping Museums F. Corno, L. Farinetti - Politecnico di Torino 34
  • 35. Step 1a Define classes and subclasses Is-a relationship, or subsumption F. Corno, L. Farinetti - Politecnico di Torino 35
  • 36. Bed&Breakfast Accommodation Rating Accommodation Camping Budget Accommodation Hotel Luxury Hotel Backpacker Contact Hiking Destination Surfing Sports Destination Yoga Beach Activity Relaxation Quiet Destination Family Destination Sunbathing Adventure Sightseeing Safari BunjeeJumping Museums F. Corno, L. Farinetti - Politecnico di Torino 36
  • 37. OWL code <owl:Class rdf:ID="Camping"> <rdfs:subClassOf> <owl:Class rdf:ID="Accommodation"/> rdf:ID Accommodation /> </rdfs:subClassOf> </owl:Class> <owl:Class rdf:ID="BudgetAccommodation"> <rdfs:subClassOf rdf:resource #Accommodation /> rdf:resource="#Accommodation"/> </owl:Class> <owl:Class rdf:ID="BedAndBreakfast"> <rdfs:subClassOf rdf:resource="#Accommodation"/> </owl:Class> <owl:Class rdf:ID="LuxuryHotel"> <rdfs:subClassOf> <owl:Class rdf:ID="Hotel"/> </rdfs:subClassOf> </owl:Class> <owl:Class rdf:about="#Hotel"> <rdfs:subClassOf rdf:resource="#Accommodation"/> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 37
  • 38. Step 1b Disjoint Define disjoint Bed&Breakfast classes Accommodation Camping Budget Accommodation Hotel <owl:Class rdf:about="#Hotel"> <owl:disjointWith rdf:resource="#Camping"/> <owl:disjointWith> <owl:Class rdf:about="#BedAndBreakfast"/> </owl:disjointWith> <rdfs:subClassOf rdf:resource="#Accommodation"/> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 38
  • 39. Step 1c Activity Adventure Sightseeing Define multiple Safari inheritance BunjeeJumping Museums F. Corno, L. Farinetti - Politecnico di Torino 39
  • 40. Step 2a Accommodation Range Define object properties hasAccommodation relationships Domain Destination <owl:ObjectProperty rdf:ID="hasAccommodation"> <rdfs:domain rdf:resource="#Destination"/> <rdfs:range rdf:resource="#Accommodation"/> </owl:ObjectProperty> F. Corno, L. Farinetti - Politecnico di Torino 40
  • 41. Step 2b Define object properties characteristics E.g: E g: define an inverse object property isOffered Destination Activity hasActivity <owl:ObjectProperty rdf:about #isOffered > rdf:about="#isOffered"> <rdfs:range rdf:resource="#Destination"/> <owl:inverseOf rdf:resource="#hasActivity"/> <rdfs:domain rdf:resource="#Activity"/> </owl:ObjectProperty> F. Corno, L. Farinetti - Politecnico di Torino 41
  • 42. int Step 2c hasZipCode string Contact hasStreet hasEMail string Define datatype properties The range specifies the data type yp <owl:DatatypeProperty rdf:ID="hasEMail"> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> <rdfs:domain rdf:resource="#Contact"/> /owl:DatatypeProperty </owl:DatatypeProperty> <owl:DatatypeProperty rdf:ID="hasZipCode"> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> <rdfs:domain rdf:resource="#Contact"/> </owl:DatatypeProperty> F. Corno, L. Farinetti - Politecnico di Torino 42
  • 43. Step 3 Accommodation OneStarRating Rating g TwoStarRating Define individuals ThreeStarRating instances Family Destination Bardonecchia Rimini <AccommodationRating rdf:ID="OneStarRating"/> <AccommodationRating rdf:ID="ThreeStarRating"/> <AccommodationRating rdf:ID="TwoStarRating"/> <FamilyDestination rdf:ID="Bardonecchia"/> <F il D ti ti df ID "B d hi "/> <FamilyDestination rdf:ID="Rimini"/> F. Corno, L. Farinetti - Politecnico di Torino 43
  • 44. Step 4 Define restrictions To restrict the individuals that belong to a class Quantifier restrictions (existential, universal quantifiers) Cardinality restrictions hasValue h V l restrictions t i ti F. Corno, L. Farinetti - Politecnico di Torino 44
  • 45. Step 4 – example 1 Accommodation hasAccommodation >= 1 Activity FamilyDestination is a Destination Destination ith t least one D ti ti with at l t hasActivity >= 2 accommodation and at least Family 2 activities Destination Necessary and sufficient condition Cardinality restriction F. Corno, L. Farinetti - Politecnico di Torino 45
  • 46. FamilyDestination is a Step St 4 – example 1 l Destination with at least one accommodation and <owl:Class rdf:ID= FamilyDestination > rdf:ID="FamilyDestination"> at least 2 activities <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:ID="hasAccommodation"/> </owl:onProperty> <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" >1</owl:minCardinality> / i i i </owl:Restriction> <owl:Restriction> <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" >2</owl:minCardinality> <owl:onProperty> <owl:ObjectProperty rdf:ID="hasActivity"/> </owl:onProperty> </owl:Restriction> <owl:Class rdf:about="#Destination"/> </owl:intersectionOf> </owl:Class> </owl:equivalentClass> </owl:Class> / F. Corno, L. Farinetti - Politecnico di Torino 46
  • 47. Step 4 – example 2 QuietDestination is a Destination Destination that is t h th t i not chosen b noisy by i families Quiet Destination Family Destination Complement restriction F. Corno, L. Farinetti - Politecnico di Torino 47
  • 48. Step St 4 – example 2 l QuietDestination is a Destination that is not chosen by noisy families <owl:Class rdf:ID="QuietDestination"> <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class> <owl:complementOf rdf:resource="#FamilyDestination"/> </owl:Class> <owl:Class rdf:about="#Destination"/> </owl:intersectionOf> </owl:Class> </owl:equivalentClass> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 48
  • 49. OneStarRating Step St 4 – example 3 l Accommodation Rating TwoStarRating Bed&Breakfast ThreeStarRating Budget hasRating Accommodation Camping Accommodation BudgetAccommodation is Luxury Hotel an Accommodation that has Hotel either one or two star rating g Sheraton Existential restriction F. Corno, L. Farinetti - Politecnico di Torino 49
  • 50. Step St 4 – example 3 l BudgetAccommodation is an Accommodation that has either one or <owl:Class rdf:ID "BudgetAccommodation"> rdf:ID="BudgetAccommodation"> two star rating t t ti <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:ID="hasRating"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <AccommodationRating rdf:ID="OneStarRating"/> <AccommodationRating rdf:ID= TwoStarRating /> rdf:ID="TwoStarRating"/> </owl:oneOf> </owl:Class> </owl:someValuesFrom> </owl:Restriction> <owl:Class rdf:about="#Accommodation"/> </owl:intersectionOf> </owl:Class> </owl:equivalentClass> </owl:Class> F. Corno, L. Farinetti - Politecnico di Torino 50
  • 51. Bed&Breakfast B d&B kf t Hotel Step 4 – example 4 Camping Accommodation Budget BackpackerDestination Accommodation hasAccommodation is a Destination that Backpacker Sports Destination hasActivity provides budget accommodation and Relaxation Activity Destination offers sport or ff t Adventure adventure activities Sightseeing F. Corno, L. Farinetti - Politecnico di Torino 51
  • 52. BackpackerDestination is p Step 4 – example 4 a Destination that provides budget accommodation <owl:Class rdf:ID="BackpackerDestination"> and offers sport or <owl:equivalentClass> adventure activities <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:ID="hasAccommodation"/> </owl:onProperty> <owl:someValuesFrom rdf:resource="#BudgetAccommodation"/> </owl:Restriction> <owl:Class rdf:about="#Destination"/> < l Cl df b t "#D ti ti "/> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:ID="hasActivity"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Sports"/> <owl:Class rdf:about #Adventure /> rdf:about="#Adventure"/> </owl:unionOf> </owl:Class> </owl:someValuesFrom> </owl:Restriction> </owl:intersectionOf> </owl:Class> </owl:equivalentClass> F. Corno, L. Farinetti - Politecnico di Torino </owl:Class> 52
  • 53. License This work is licensed under the Creative Commons Attribution-Noncommercial- Share Alike 3.0 Unported License. To view a copy of this license visit license, http://creativecommons.org/licenses/by- nc-sa/3.0/ or send a letter to C /3 0/ Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. F. Corno, L. Farinetti - Politecnico di Torino 53