SlideShare a Scribd company logo
1 of 106
Download to read offline
Ontologies


Fulvio Corno, Laura Farinetti
Politecnico di Torino
Dipartimento di Automatica e Informatica
e-Lite Research Group – http://elite.polito.it
Summary
     Introduction to ontologies
     Ontology “engineering”
           ontologies creation process
     Ontology languages
     Tools for ontologies design




F. Corno, L. Farinetti- Politecnico di Torino   2
Semantically rich descriptions to
support search
                                                http://dictybase.org/db/html/help/GO.html
                                                http://dictybase.org/db/html/help/GO.html


                                                                            Topic =
                                                                        {metabolism, …}




F. Corno, L. Farinetti- Politecnico di Torino                                               3
Ontologies
        An ontology is an explicit description of
        a domain
               concepts
               properties and attributes of concepts
               constraints on properties and attributes
               individuals (often, but not always)
        An ontology defines
               a common vocabulary
               a shared understanding

F. Corno, L. Farinetti- Politecnico di Torino             4
“Ontology engineering”
    Defining terms in the domain and relations
    among them
          defining concepts in the domain (classes)
          arranging the concepts in a hierarchy
          (subclass-superclass hierarchy)
          defining which attributes and properties (slots)
          classes can have and constraints on their
          values
          defining individuals and filling in slot values
F. Corno, L. Farinetti- Politecnico di Torino                5
Why develop an ontology?
     To share common understanding of the
     structure of information
           among people
           among software agents
     To enable reuse of domain knowledge
           to avoid “re-inventing the wheel”
           to introduce standards to allow interoperability


F. Corno, L. Farinetti- Politecnico di Torino             6
An ontology
                                          takes                 Certificate
              1 year
                                                                     Is_a
                                         Is_equivalent_to
                       takes
                                                         Is_a
                                         HNC                            Award

                                                  Is_a              Is_a
                           takes
                                         HND
             2 years                                     Diploma
                              takes
F. Corno, L. Farinetti- Politecnico di Torino                                   7
A more complex ontology
   [base.Entity]
      Person
            Worker
                 Faculty
                     Professor
                          AssistantProfessor
                          AssociateProfessor
                          FullProfessor
                          VisitingProfessor
                     Lecturer
                     PostDoc
                 Assistant
                     ResearchAssistant
                     TeachingAssistant
                 AdministrativeStaff
                     Director
                     Chair {Professor}
                     Dean {Professor}
                     ClericalStaff
                     SystemsStaff
            Student
                 UndergraduateStudent
                 GraduateStudent
F. Corno, L. Farinetti- Politecnico di Torino   8
A more complex ontology
   Organization
      Department
      School
      University
      Program
      ResearchGroup
      Institute
   Publication
      Article
             TechnicalReport
             JournalArticle
             ConferencePaper
       UnofficialPublication
       Book
       Software
       Manual
       Specification
   Work
      Course
      Research
   Schedule

F. Corno, L. Farinetti- Politecnico di Torino   9
A more complex ontology
      Relation                Argument 1        Argument 2
      ======================================================
      publicationAuthor       Publication       Person
      publicationDate         Publication       .DATE
      publicationResearch     Publication       Research
      softwareVersion         Software          .STRING
      softwareDocumentation   Software          Publication
      teacherOf               Faculty           Course
      teachingAssistantOf     TeachingAssistant Course
      takesCourse             Student           Course
      age                     Person            .NUMBER
      emailAddress            Person            .STRING
      head                    Organization      Person
      undergraduateDegreeFrom Person            University
      mastersDegreeFrom       Person            University
      doctoralDegreeFrom      Person            University
      advisor                 Student           Professor
      subOrganization         Organization      Organization ………..


F. Corno, L. Farinetti- Politecnico di Torino                        10
Example of ontology engineering




               chair

F. Corno, L. Farinetti- Politecnico di Torino   11
Example of ontology engineering
                                           1.A piece of furniture consisting of a seat, legs, back, and often
                                           arms, designed to accommodate one person.
                                           2.A seat of office, authority, or dignity, such as that of a bishop.
                                                 a.An office or position of authority, such as a professorship.
                                                 b.A person who holds an office or a position of authority,
                                                 such as one who presides over a meeting or administers a
                                                 department of instruction at a college; a chairperson.
                                           3.The position of a player in an orchestra.
                                           4.Slang. The electric chair.
                                           5.A seat carried about on poles; a sedan chair.
                                           6.Any of several devices that serve to support or secure, such as
                                           a metal block that supports and holds railroad track in position.




               chair

F. Corno, L. Farinetti- Politecnico di Torino                                                                 12
Example of ontology engineering



                                         A piece of furniture consisting of a seat, legs, back,
                                         and often arms, designed to accommodate one
                                         person.




               chair

F. Corno, L. Farinetti- Politecnico di Torino                                                     13
Example of ontology engineering




               chair                     seat   stool   bench

F. Corno, L. Farinetti- Politecnico di Torino                   14
Example of ontology engineering

                                                       Something I can sit on




                                                ???



               chair                     seat         stool         bench

F. Corno, L. Farinetti- Politecnico di Torino                                   15
Example of ontology engineering

                                                              Something I can sit on




                                                “sittable”



               chair                     seat                stool         bench

F. Corno, L. Farinetti- Politecnico di Torino                                          16
Example of ontology engineering

                                                              Something I can sit on




                                                “sittable”

                                                                                       table

               chair                     seat                stool         bench

F. Corno, L. Farinetti- Politecnico di Torino                                                  17
Example of ontology engineering
   Something I can sit on


                                                “sittable”

Something designed for sitting


                                          “for_sitting”

                                                                             table

               chair                     seat                stool   bench

F. Corno, L. Farinetti- Politecnico di Torino                                        18
Ontology structure

                                                “sittable”



                                          “for_sitting”

                                                                             table

               chair                     seat                stool   bench

F. Corno, L. Farinetti- Politecnico di Torino                                        19
Ingredients
     Concepts
           shorthand name (internal use)
           synthetic title (to be displayed)
           definition (real unambiguous shared definition)
     Relationships among concepts
           is_a
           other
     Annotations
F. Corno, L. Farinetti- Politecnico di Torino           20
Concepts
                                                         Synthetic title
                                                Furniture to sit on


             “sittable”                                     Definition
        Shorthand name                          Some piece of furniture that
                                                can be used to sit on, either by
                                                design or by its shape.




F. Corno, L. Farinetti- Politecnico di Torino                                      21
Internationalization
                                                   Synthetic title
                                         Furniture to sit on
                                          Furniture to sit on
                                           Furniture to sit on
                                            Furniture to sit on
                                             Furniture to sit on
                                              Furniture to sit on
                                               Furniture to sit on
          “sittable”                                 Definition
   Shorthand name                        Some piece of furniture that
                                          Some piece of furniture that
                                           Some piece of furniture that
                                         can Somepieceofoffurniturethat
                                            Some piece sitfurniture that
                                          canbe used totositon, eitherthat
                                             Some pieceof on, eitherby
                                           canbe used totositfurniture that
                                               Some piece of furniture by
                                            canbe used shape. either by
                                                                on,
                                         designbe used tosit on, either by
                                             can be by its shape. either by
                                                 or used tosit on, either by
                                          design be by its shape. either by
                                           designor used tosit on,
                                              can or used sit on,
                                            designbe by its shape.
                                               can
                                             designor by its shape.
                                              designor by its shape.
                                               designor by its shape.
                                                      or by its




F. Corno, L. Farinetti- Politecnico di Torino                                  22
Relationships
                                                                          material
                 room
                                                                                is_a
  is_a
                                                 “sittable”
                        is_a                                                  wood
classroom                                              is_a

               dining room                      “for_sitting”          is_a
                                                                is_a            table
                    is_a                  is_a         is_a
                    chair                       seat          stool    bench

F. Corno, L. Farinetti- Politecnico di Torino                                          23
Relationships
                                                                made_of
                                                                             material
                 room
                                                                                   is_a

                                     furnish
  is_a
                                                 “sittable”
                        is_a                                                     wood
classroom                               ed             is_a
                                                                          made_of
               dining room                      “for_sitting”             is_a
                                                                 is_a              table
                    is_a                  is_a         is_a
                    chair                       seat          stool       bench

F. Corno, L. Farinetti- Politecnico di Torino                                             24
Ontology building blocks
     Ontologies generally describe:
           Individuals
                 the basic or “ground level” objects
           Classes
                 sets, collections, or types of objects
           Attributes
                 properties, features, characteristics, or parameters
                 that objects can have and share
           Relationships
                 ways that objects can be related to one another
F. Corno, L. Farinetti- Politecnico di Torino                       25
Individuals
     Also known as “instances”
     can be concrete objects
           animals
           molecules
           trees
     or abstract objects
           numbers
           words


F. Corno, L. Farinetti- Politecnico di Torino   26
Concepts
     Also known as “Classes”
           abstract groups, sets, or collections of objects
     They may contain
           individuals
           other classes
           a combination of both
     Examples
           Person: the class of all people
           Vehicle: the class of all vehicles
F. Corno, L. Farinetti- Politecnico di Torino             27
Concepts
     Can be defined extensionally …
           By defining every object that falls under the definition
           of the concept
           A class C is extensionally defined if and only if for
           every class C', if C' has exactly the same members of
           C, C and C' are identical
           E.g.: DayOfWeek = {Monday, Tuesday, Wednesday,
           Thursday, Friday, Saturday, Sunday}
     … or intensionally
           By defining the necessary and sufficient conditions for
           belonging to the concept
           E.g.: “bachelor” is an “unmarried man”
F. Corno, L. Farinetti- Politecnico di Torino                     28
Concepts
     Defined by
           Name: any identifier, usually carefully chosen
           Definition: describes the well agreed meaning
           of the concept, in a human readable form
           Terms (Lexicon): list of terms (synonyms, etc.)
           usually adopted to identify the concept




F. Corno, L. Farinetti- Politecnico di Torino           29
Subsumption
     A concept (class) can subsume / be
     subsumed by any other class
     Subsumption is used to establish class
     hierarchies




F. Corno, L. Farinetti- Politecnico di Torino   30
Class partition
     A set of related classes and associated
     rules that allow objects to be placed into
     the appropriate class
                                                    GEOMETRIC
                                                    GEOMETRIC
                                                      FIGURE
                                                      FIGURE


                     GEOMETRIC
                     GEOMETRIC                                      TWO
                                                                     TWO
                       POINT
                       POINT                                    DIMENSIONAL
                                                                DIMENSIONAL
                                                                   FIGURE
                                                                   FIGURE
                                                     ONE
                                                     ONE
                                                DIMENSIONAL
                                                DIMENSIONAL
                                                   FIGURE
                                                   FIGURE


F. Corno, L. Farinetti- Politecnico di Torino                             31
Class partition
     Disjoint partition
           A disjoint partition rule guarantees that a
           single instance of a class cannot be in more
           than one sub-classes
                                            VEHICLE
           E.g. one specific truck          VEHICLE

           cannot be in both
           4-axle and                 TRUCK         CAR
                                      TRUCK          CAR
           6-axle classes
                                                6-AXLE   4-AXLE
                                                6-AXLE   4-AXLE

F. Corno, L. Farinetti- Politecnico di Torino                     32
Class partition
     Exhaustive partition
           every concrete object in the super-class is an
           instance of at least one of the partition
           classes




F. Corno, L. Farinetti- Politecnico di Torino               33
Attributes
     Describe specific features
     Can be complex (e.g.: list of values)
     Defined for a class/concept (e.g. car)
     Examples:
           number-of-doors: 4
           number-of-wheels: 4
           engine: {3.0L,4.0L}

F. Corno, L. Farinetti- Politecnico di Torino   34
Relationships
     Attributes that relate two or more concepts
           two concepts → binary relationship
           three concepts → ternary relationship
     Domain
           the concept(s) from which the relationship
           departs
     Range
           the concept(s) to which the relationship
           applies
F. Corno, L. Farinetti- Politecnico di Torino           35
Relationships
     Examples
           Car(MiniMinor) → individual definition
           Car(Mini) → individual definition
           Successor(Mini,MiniMinor) → relationship


                              domain            range



F. Corno, L. Farinetti- Politecnico di Torino           36
Commonly used relationships
     Subsumption
           the most important
           is-superclass-of
           usually denoted by its inverse is-a
           (is-subclass-of)
     Meronymy
           is-part-of
           describes how object are combined together
           to form composite objects
F. Corno, L. Farinetti- Politecnico di Torino           37
Example




http://www.yeastgenome.org/help/GO.html
http://www.yeastgenome.org/help/GO.html
  F. Corno, L. Farinetti- Politecnico di Torino   38
Ontology alignment
                                                http://www.webology.ir/2006/v3n3/a28.html
                                                http://www.webology.ir/2006/v3n3/a28.html




F. Corno, L. Farinetti- Politecnico di Torino                                        39
Ontology languages
RDF / RDF Schema




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




F. Corno, L. Farinetti- Politecnico di Torino   42
RDFS problems
     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             43
RDFS problems
             it is not possible to define transitive, inverse
             or symmetrical statements (e.g. part of is a
             transitive property, hasPart is the inverse of
             isPartOf, touches is symmetrical)
      Reasoning is not well supported
             Non standard semantics, no native reasoner
             exists



F. Corno, L. Farinetti- Politecnico di Torino                   44
Requirements for an ontology
language
        Extend existing Web standards
               XML, RDF, RDFS, ...
        Easy to understand and to use
               based on well known KR languages
        Formally specified
        Adequate expressive power
        Automatic support for reasoning
F. Corno, L. Farinetti- Politecnico di Torino     45
Stack of Web languages

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

              University of
                                                    XML
              Maryland



F. Corno, L. Farinetti- Politecnico di Torino                                    46
Ontology Web Language (OWL)
     4th level on the semantic web cake
     Built on top of
           XML
           RDF/S
     Three versions
           Lite
           DL (maps to Description Logic)
           Full (not fully tractable)
     Serializable as XML
F. Corno, L. Farinetti- Politecnico di Torino   47
Ontology Web Language (OWL)




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


     Ontology metadata (information about the
     ontology)
               <owl:Ontology rdf:about=quot;quot;>
               <owl:Ontology rdf:about=quot;quot;>
                  <rdfs:comment>An example OWL ontology</rdfs:comment>
                  <rdfs:comment>An example OWL ontology</rdfs:comment>
                  <owl:priorVersion
                  <owl:priorVersion
                      rdf:resource=quot;http://www.mydomain.org/uni-ns-oldquot;/>
                       rdf:resource=quot;http://www.mydomain.org/uni-ns-oldquot;/>
                  <owl:imports
                  <owl:imports
                      rdf:resource=quot;http://www.mydomain.org/personsquot;/>
                       rdf:resource=quot;http://www.mydomain.org/personsquot;/>
                  <rdfs:label>University Ontology</rdfs:label>
                  <rdfs:label>University Ontology</rdfs:label>
               </owl:Ontology>
               </owl:Ontology>
F. Corno, L. Farinetti- Politecnico di Torino                             50
Classes
     Every class is a descendant of
           owl:Thing
     Classes are defined using
           owl:Class
                                  <owl:Class rdf:ID=quot;Vehiclequot;/>
                                  <owl:Class rdf:ID=quot;Vehiclequot;/>

     Equivalence
           owl:equivalentClass
    <owl:Class rdf:ID=quot;Carquot;>
    <owl:Class rdf:ID=quot;Carquot;>
          <owl:equivalentClass rdf:resource=quot;#Automobilequot;/>
          <owl:equivalentClass rdf:resource=quot;#Automobilequot;/>
    </owl:Class>
    </owl:Class>
F. Corno, L. Farinetti- Politecnico di Torino                     51
Subsumption
     Provided by
           owl:subClassOf



<owl:Class rdf:ID=quot;2-Wheel-Drivequot;>
<owl:Class rdf:ID=quot;2-Wheel-Drivequot;>
       <rdfs:subClassOf rdf:resource=quot;#Carquot;/>
       <rdfs:subClassOf rdf:resource=quot;#Carquot;/>
</owl:Class>
</owl:Class>




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


<owl:Class rdf:about=quot;#2-Wheel-Drivequot;>
<owl:Class rdf:about=quot;#2-Wheel-Drivequot;>
       <owl:disjointWith
       <owl:disjointWith
          rdf:resource=quot;#4-Wheel-Drivequot;/>
          rdf:resource=quot;#4-Wheel-Drivequot;/>
</owl:Class>
</owl:Class>




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

    <owl:Class rdf:ID=quot;Carquot;>
    <owl:Class rdf:ID=quot;Carquot;>
           <owl:oneOf rdf:parseType=quot;Collectionquot;>
           <owl:oneOf rdf:parseType=quot;Collectionquot;>
                  <owl:Thing rdf:about=quot;#2-Wheel-Drivequot;/>
                  <owl:Thing rdf:about=quot;#2-Wheel-Drivequot;/>
                  <owl:Thing rdf:about=quot;#4-Wheel-Drivequot;/>
                  <owl:Thing rdf:about=quot;#4-Wheel-Drivequot;/>
           </owl:oneOf>
           </owl:oneOf>
    </owl:Class>
    </owl:Class>




F. Corno, L. Farinetti- Politecnico di Torino               54
Attributes
     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             55
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=quot;agequot;>
   <owl:DatatypeProperty rdf:ID=quot;agequot;>
          <rdfs:domain rdf:resource=quot;#Personquot;/>
          <rdfs:domain rdf:resource=quot;#Personquot;/>
          <rdfs:range rdf:resource=quot;http://www.w3.org/2001/
          <rdfs:range rdf:resource=quot;http://www.w3.org/2001/
             XMLSchema#nonNegativeIntegerquot;/>
             XMLSchema#nonNegativeIntegerquot;/>
   </owl:DatatypeProperty>
   </owl:DatatypeProperty>

F. Corno, L. Farinetti- Politecnico di Torino             56
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              57
Relationships
     Example
<owl:ObjectProperty rdf:ID=quot;isTaughtByquot;>
<owl:ObjectProperty rdf:ID=quot;isTaughtByquot;>
       <rdfs:domain rdf:resource=quot;#coursequot;/>
       <rdfs:domain rdf:resource=quot;#coursequot;/>
       <rdfs:range rdf:resource=quot;#academicStaffMemberquot;/>
       <rdfs:range rdf:resource=quot;#academicStaffMemberquot;/>
       <rdfs:subPropertyOf rdf:resource=quot;#involvesquot;/>
       <rdfs:subPropertyOf rdf:resource=quot;#involvesquot;/>
</owl:ObjectProperty>
</owl:ObjectProperty>




F. Corno, L. Farinetti- Politecnico di Torino              58
Instances (individuals)
     No unique name assumption in OWL
           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
           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              59
Instances (individuals)
     Defined by means of
           rdf:Description + rdf:Type

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




F. Corno, L. Farinetti- Politecnico di Torino            60
Advanced constructs
     OWL supports several advanced constructs to
     define classes and relationships
     Intensional definition of classes
           By defining constraints on attribute values (either
           object or datatype properties)
    <owl:Class rdf:about=quot;#academicStaffMemberquot;>
    <owl:Class rdf:about=quot;#academicStaffMemberquot;>
           <rdfs:subClassOf>
            <rdfs:subClassOf>
                   <owl:Restriction>
                   <owl:Restriction>
                   <owl:onProperty rdf:resource=quot;#teachesquot;/>
                   <owl:onProperty rdf:resource=quot;#teachesquot;/>
                   <owl:someValuesFrom
                   <owl:someValuesFrom
                           rdf:resource=quot;#undergraduateCoursequot;/>
                           rdf:resource=quot;#undergraduateCoursequot;/>
                   </owl:Restriction>
                   </owl:Restriction>
           </rdfs:subClassOf>
            </rdfs:subClassOf>
    </owl:Class>
    </owl:Class>
F. Corno, L. Farinetti- Politecnico di Torino                      61
Advanced constructs
     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=quot;#departmentquot;>
   <owl:Class rdf:about=quot;#departmentquot;>
    <rdfs:subClassOf>
    <rdfs:subClassOf>
          <owl:Restriction>
           <owl:Restriction>
             <owl:onProperty rdf:resource=quot;#hasMemberquot;/>
             <owl:onProperty rdf:resource=quot;#hasMemberquot;/>
             <owl:minCardinality
             <owl:minCardinality
                rdf:datatype=quot;&xsd;nonNegativeIntegerquot;> 10
                rdf:datatype=quot;&xsd;nonNegativeIntegerquot;> 10
             </owl:minCardinality>
             </owl:minCardinality>
          </owl:Restriction>
           </owl:Restriction>
    </rdfs:subClassOf>
    </rdfs:subClassOf>
   </owl:Class>
   </owl:Class>

F. Corno, L. Farinetti- Politecnico di Torino                   62
Special properties
     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                   63
Special properties
     owl:InverseFunctionalProperty
           defines a property for which two different
           objects cannot have the same value
           E.g.: the property
           “isTheSocialSecurityNumberFor”: a social
           security number is assigned to one person
           only



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




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




F. Corno, L. Farinetti- Politecnico di Torino   66
OWL: what for?
  To build an ontology
         define classes and provide information on them
         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             67
Example of ontology
building in OWL
with 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/




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



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




F. Corno, L. Farinetti- Politecnico di Torino   72
Bed&Breakfast
                                       Bed&Breakfast                                                                                  OneStarRating
                                                                                                                                      OneStarRating
                                                                                       hasRating          Accommodation
                                                                                                          Accommodation
                                                                                                              Rating
                                                                                                              Rating
                                                                                                                                    TwoStarRating
                                                                                                                                    TwoStarRating
                                                                  Accommodation
                                                                  Accommodation
                                                                                           Camping
                                                                                           Camping
                                                                                                              ThreeStarRating
                                        Budget                                                                ThreeStarRating
                                        Budget
                                    Accommodation
                                    Accommodation
                                                             Hotel
                                                             Hotel
                                                                                                                                                         int
                                                                                                                                      hasZipCode
                                                                             hasAccommodation
                                                                                                                                                          string
                                                   Luxury Hotel
                                                   Luxury Hotel
                                                                                                     Backpacker                       Contact
                                                                                                     Backpacker                       Contact
                           Hiking
                           Hiking                                                                                                                   hasStreet
                                                                                                     Destination
                                                                                                     Destination
         Surfing                                                                                                                        hasEMail
         Surfing
                                                                                                                                                         string
                                                                  Sheraton                                         hasContact
                                                                  Sheraton

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

                                                                                           Bardonecchia
                                                                                           Bardonecchia
                                                                                                                    Rimini
                                                                                                                    Rimini
                                          Safari
                                          Safari
        BunjeeJumping
        BunjeeJumping                                             Museums
                                                                  Museums




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




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




                                                   Luxury Hotel
                                                   Luxury Hotel
                                                                                                    Backpacker               Contact
                                                                                                    Backpacker               Contact
                           Hiking
                           Hiking                                                                   Destination
                                                                                                    Destination
         Surfing
         Surfing


                          Sports
                          Sports
                                                                                                Destination
                                                                                                Destination
                                                                                                                     Beach
 Yoga                                                                                                                Beach
 Yoga
                                            Activity
                                            Activity

                   Relaxation
                   Relaxation
                                                                              Quiet
                                                                               Quiet
                                                                            Destination               Family
                                                                            Destination               Family
                                                                                                    Destination
                                                                                                    Destination
Sunbathing
Sunbathing
                                                    Sightseeing
                           Adventure                Sightseeing
                           Adventure



                                          Safari
                                          Safari
        BunjeeJumping
        BunjeeJumping                                             Museums
                                                                  Museums




 F. Corno, L. Farinetti- Politecnico di Torino                                                                                         75
OWL code
                  <owl:Class rdf:ID=quot;Campingquot;>
                  <owl:Class rdf:ID=quot;Campingquot;>
                      <rdfs:subClassOf>
                      <rdfs:subClassOf>
                        <owl:Class rdf:ID=quot;Accommodationquot;/>
                        <owl:Class rdf:ID=quot;Accommodationquot;/>
                      </rdfs:subClassOf>
                      </rdfs:subClassOf>
                    </owl:Class>
                    </owl:Class>
                    <owl:Class rdf:ID=quot;BudgetAccommodationquot;>
                    <owl:Class rdf:ID=quot;BudgetAccommodationquot;>
                      <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
                      <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
                    </owl:Class>
                    </owl:Class>
                    <owl:Class rdf:ID=quot;BedAndBreakfastquot;>
                    <owl:Class rdf:ID=quot;BedAndBreakfastquot;>
                      <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
                      <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
                    </owl:Class>
                    </owl:Class>
                    <owl:Class rdf:ID=quot;LuxuryHotelquot;>
                    <owl:Class rdf:ID=quot;LuxuryHotelquot;>
                      <rdfs:subClassOf>
                      <rdfs:subClassOf>
                        <owl:Class rdf:ID=quot;Hotelquot;/>
                        <owl:Class rdf:ID=quot;Hotelquot;/>
                      </rdfs:subClassOf>
                      </rdfs:subClassOf>
                    </owl:Class>
                    </owl:Class>
                    <owl:Class rdf:about=quot;#Hotelquot;>
                    <owl:Class rdf:about=quot;#Hotelquot;>
                      <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
                      <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
                    </owl:Class>
                    </owl:Class>


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




     classes                                                        Accommodation
                                                                    Accommodation
                                                                                    Camping
                                                                                    Camping
                                                    Budget
                                                    Budget
                                                Accommodation
                                                Accommodation
                                                                  Hotel
                                                                  Hotel




   <owl:Class rdf:about=quot;#Hotelquot;>
   <owl:Class rdf:about=quot;#Hotelquot;>
       <owl:disjointWith rdf:resource=quot;#Campingquot;/>
       <owl:disjointWith rdf:resource=quot;#Campingquot;/>
       <owl:disjointWith>
       <owl:disjointWith>
         <owl:Class rdf:about=quot;#BedAndBreakfastquot;/>
         <owl:Class rdf:about=quot;#BedAndBreakfastquot;/>
       </owl:disjointWith>
       </owl:disjointWith>
       <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
       <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/>
    </owl:Class>
    </owl:Class>



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




                                                                                     Sightseeing
                                                                Adventure

     Define multiple
                                                                                     Sightseeing
                                                                Adventure




     inheritance
                                                                            Safari
                                                                            Safari
                                                BunjeeJumping
                                                BunjeeJumping                                      Museums
                                                                                                   Museums




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

                                                                   Accommodation
                                                                   Accommodation




     Define object properties                                              hasAccommodation

           relationships                                                                         Domain



                                                                                              Destination
                                                                                              Destination




                                           <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;>
                                           <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;>
                                              <rdfs:domain rdf:resource=quot;#Destinationquot;/>
                                              <rdfs:domain rdf:resource=quot;#Destinationquot;/>
                                              <rdfs:range rdf:resource=quot;#Accommodationquot;/>
                                              <rdfs:range rdf:resource=quot;#Accommodationquot;/>
                                           </owl:ObjectProperty>
                                           </owl:ObjectProperty>


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

                                                                                  isOffered
                                                                                              Destination
                                                                                              Destination

                                                         Activity
                                                         Activity
                                                                    hasActivity




                                            <owl:ObjectProperty rdf:about=quot;#isOfferedquot;>
                                            <owl:ObjectProperty rdf:about=quot;#isOfferedquot;>
                                               <rdfs:range rdf:resource=quot;#Destinationquot;/>
                                               <rdfs:range rdf:resource=quot;#Destinationquot;/>
                                               <owl:inverseOf rdf:resource=quot;#hasActivityquot;/>
                                               <owl:inverseOf rdf:resource=quot;#hasActivityquot;/>
                                               <rdfs:domain rdf:resource=quot;#Activityquot;/>
                                               <rdfs:domain rdf:resource=quot;#Activityquot;/>
                                            </owl:ObjectProperty>
                                            </owl:ObjectProperty>


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


Step 2c
                                                hasZipCode

                                                                   string
                                                Contact
                                                Contact
                                                             hasStreet

                                                  hasEMail        string


     Define datatype properties
           The range specifies the
           data type


 <owl:DatatypeProperty rdf:ID=quot;hasEMailquot;>
 <owl:DatatypeProperty rdf:ID=quot;hasEMailquot;>
    <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#stringquot;/>
    <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#stringquot;/>
    <rdfs:domain rdf:resource=quot;#Contactquot;/>
    <rdfs:domain rdf:resource=quot;#Contactquot;/>
  </owl:DatatypeProperty>
  </owl:DatatypeProperty>
  <owl:DatatypeProperty rdf:ID=quot;hasZipCodequot;>
  <owl:DatatypeProperty rdf:ID=quot;hasZipCodequot;>
    <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#intquot;/>
    <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#intquot;/>
    <rdfs:domain rdf:resource=quot;#Contactquot;/>
    <rdfs:domain rdf:resource=quot;#Contactquot;/>
 </owl:DatatypeProperty>
 </owl:DatatypeProperty>


F. Corno, L. Farinetti- Politecnico di Torino                               81
Step 3                                                                                                 OneStarRating
                                                                                                       OneStarRating
                                                                                 Accommodation
                                                                                 Accommodation
                                                                                     Rating
                                                                                     Rating
                                                                                                     TwoStarRating
                                                                                                     TwoStarRating



     Define individuals                                                            ThreeStarRating
                                                                                   ThreeStarRating




           instances                                        Family
                                                            Family
                                                          Destination
                                                          Destination



                                                Bardonecchia
                                                Bardonecchia
                                                                        Rimini
                                                                        Rimini




  <AccommodationRating rdf:ID=quot;OneStarRatingquot;/>
  <AccommodationRating rdf:ID=quot;OneStarRatingquot;/>
  <AccommodationRating rdf:ID=quot;ThreeStarRatingquot;/>
  <AccommodationRating rdf:ID=quot;ThreeStarRatingquot;/>
  <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/>
  <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/>
  <FamilyDestination rdf:ID=quot;Bardonecchiaquot;/>
  <FamilyDestination rdf:ID=quot;Bardonecchiaquot;/>
  <FamilyDestination rdf:ID=quot;Riminiquot;/>
  <FamilyDestination rdf:ID=quot;Riminiquot;/>




F. Corno, L. Farinetti- Politecnico di Torino                                                                          82
Step 4
     Define restrictions
           To restrict the individuals that belong to a
           class
           Quantifier restrictions (existential, universal
           quantifiers)
           Cardinality restrictions
           hasValue restrictions


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




                                                                                hasAccommodation >= 1

      FamilyDestination is a                                Activity
                                                            Activity

                                                                                             Destination
                                                                                             Destination
      Destination with at least one                                    hasActivity >= 2

      accommodation and at least
                                                                                                Family
                                                                                                Family
      2 activities                                                                            Destination
                                                                                              Destination




                                                          Necessary and
                                                         sufficient condition




                                                Cardinality restriction
F. Corno, L. Farinetti- Politecnico di Torino                                                               84
Step 4 – example 1                                     FamilyDestination is a
                                                       FamilyDestination is a
                                                       Destination with at least
                                                       Destination with at least
                                                       one accommodation and
                                                       one accommodation and
                                                       at least 2 activities
                                                       at least 2 activities
<owl:Class rdf:ID=quot;FamilyDestinationquot;>
<owl:Class rdf:ID=quot;FamilyDestinationquot;>
   <owl:equivalentClass>
   <owl:equivalentClass>
     <owl:Class>
     <owl:Class>
       <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
       <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
         <owl:Restriction>
         <owl:Restriction>
           <owl:onProperty>
           <owl:onProperty>
             <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/>
             <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/>
           </owl:onProperty>
           </owl:onProperty>
           <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot;
           <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot;
           >1</owl:minCardinality>
           >1</owl:minCardinality>
         </owl:Restriction>
         </owl:Restriction>
         <owl:Restriction>
         <owl:Restriction>
           <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot;
           <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot;
           >2</owl:minCardinality>
           >2</owl:minCardinality>
           <owl:onProperty>
           <owl:onProperty>
             <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/>
             <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/>
           </owl:onProperty>
           </owl:onProperty>
         </owl:Restriction>
         </owl:Restriction>
         <owl:Class rdf:about=quot;#Destinationquot;/>
         <owl:Class rdf:about=quot;#Destinationquot;/>
       </owl:intersectionOf>
       </owl:intersectionOf>
     </owl:Class>
     </owl:Class>
   </owl:equivalentClass>
   </owl:equivalentClass>
</owl:Class>
</owl:Class>

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


      that is not chosen by noisy
      families                                                         Quiet
                                                                        Quiet
                                                                     Destination      Family
                                                                     Destination      Family
                                                                                    Destination
                                                                                    Destination




                                                Complement restriction


F. Corno, L. Farinetti- Politecnico di Torino                                                     86
Step 4 – example 2                                  QuietDestination is a
                                                    QuietDestination is a
                                                    Destination that is not
                                                    Destination that is not
                                                    chosen by noisy families
                                                    chosen by noisy families
    <owl:Class rdf:ID=quot;QuietDestinationquot;>
    <owl:Class rdf:ID=quot;QuietDestinationquot;>
      <owl:equivalentClass>
      <owl:equivalentClass>
        <owl:Class>
        <owl:Class>
          <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
          <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
            <owl:Class>
            <owl:Class>
              <owl:complementOf rdf:resource=quot;#FamilyDestinationquot;/>
              <owl:complementOf rdf:resource=quot;#FamilyDestinationquot;/>
            </owl:Class>
            </owl:Class>
            <owl:Class rdf:about=quot;#Destinationquot;/>
            <owl:Class rdf:about=quot;#Destinationquot;/>
          </owl:intersectionOf>
          </owl:intersectionOf>
        </owl:Class>
        </owl:Class>
      </owl:equivalentClass>
      </owl:equivalentClass>
    </owl:Class>
    </owl:Class>




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


Step 4 – example 3                                                                                               TwoStarRating
                                                                                                                 TwoStarRating
                                                                                           Accommodation
                                                                                           Accommodation
                                                                                               Rating
                                                                                               Rating

                                                           Bed&Breakfast
                                                           Bed&Breakfast
                                                                                                                ThreeStarRating
                                                                                                                ThreeStarRating



                                                                               hasRating
                                                    Budget
                                                    Budget                                                    Camping
                                                                                                              Camping
                                                Accommodation
                                                Accommodation




                                                                           Accommodation
                                                                           Accommodation

   BudgetAccommodation is
   an Accommodation that has                                                                               Luxury Hotel
                                                                                                           Luxury Hotel
                                                                                            Hotel
                                                                                            Hotel

   either one or two star rating                                                                               Sheraton
                                                                                                               Sheraton




                                                   Existential restriction
F. Corno, L. Farinetti- Politecnico di Torino                                                                             88
Step 4 – example 3                                      BudgetAccommodation
                                                        BudgetAccommodation
                                                        is an Accommodation
                                                        is an Accommodation
                                                        that has either one or
                                                        that has either one or
                                                        two star rating
   <owl:Class rdf:ID=quot;BudgetAccommodationquot;>
                                                        two star rating
   <owl:Class rdf:ID=quot;BudgetAccommodationquot;>
     <owl:equivalentClass>
     <owl:equivalentClass>
       <owl:Class>
       <owl:Class>
         <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
         <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
           <owl:Restriction>
           <owl:Restriction>
             <owl:onProperty>
             <owl:onProperty>
               <owl:ObjectProperty rdf:ID=quot;hasRatingquot;/>
                <owl:ObjectProperty rdf:ID=quot;hasRatingquot;/>
             </owl:onProperty>
             </owl:onProperty>
             <owl:someValuesFrom>
             <owl:someValuesFrom>
               <owl:Class>
                <owl:Class>
                  <owl:oneOf rdf:parseType=quot;Collectionquot;>
                  <owl:oneOf rdf:parseType=quot;Collectionquot;>
                    <AccommodationRating rdf:ID=quot;OneStarRatingquot;/>
                    <AccommodationRating rdf:ID=quot;OneStarRatingquot;/>
                    <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/>
                    <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/>
                  </owl:oneOf>
                  </owl:oneOf>
               </owl:Class>
                </owl:Class>
             </owl:someValuesFrom>
             </owl:someValuesFrom>
           </owl:Restriction>
           </owl:Restriction>
           <owl:Class rdf:about=quot;#Accommodationquot;/>
           <owl:Class rdf:about=quot;#Accommodationquot;/>
         </owl:intersectionOf>
         </owl:intersectionOf>
       </owl:Class>
       </owl:Class>
     </owl:equivalentClass>
     </owl:equivalentClass>
   </owl:Class>
   </owl:Class>

F. Corno, L. Farinetti- Politecnico di Torino                             89
Bed&Breakfast
                                                                                                                   Bed&Breakfast
                                                                                                      Hotel


Step 4 – example 4
                                                                                                      Hotel

                                                                           Camping
                                                                           Camping


                                                                                                 Accommodation
                                                                                                 Accommodation
                                                                        Budget
                                                                        Budget
   BackpackerDestination                                            Accommodation
                                                                    Accommodation
                                                                                                                   hasAccommodation

   is a Destination that                                                                                             Backpacker
                                                                                                                     Backpacker
                                                                                                                     Destination
                                                                                                                      Destination
   provides budget
                                                                  Sports                hasActivity
                                                                  Sports



   accommodation and                                                                                          Destination
                                                                             Activity                         Destination
                                                Relaxation                   Activity
                                                Relaxation

   offers sport or
                                                             Adventure
   adventure activities
                                                             Adventure

                                                                                   Sightseeing
                                                                                   Sightseeing




F. Corno, L. Farinetti- Politecnico di Torino                                                                                       90
BackpackerDestination is
                                                                BackpackerDestination is
Step 4 – example 4                                              a Destination that provides
                                                                a Destination that provides
                                                                budget accommodation
                                                                budget accommodation
                                                                and offers sport or
                                                                and offers sport or
   <owl:Class rdf:ID=quot;BackpackerDestinationquot;>
   <owl:Class rdf:ID=quot;BackpackerDestinationquot;>
                                                                adventure activities
                                                                adventure activities
     <owl:equivalentClass>
     <owl:equivalentClass>
       <owl:Class>
        <owl:Class>
           <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
           <owl:intersectionOf rdf:parseType=quot;Collectionquot;>
              <owl:Restriction>
              <owl:Restriction>
                 <owl:onProperty>
                 <owl:onProperty>
                   <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/>
                    <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/>
                 </owl:onProperty>
                 </owl:onProperty>
                 <owl:someValuesFrom rdf:resource=quot;#BudgetAccommodationquot;/>
                 <owl:someValuesFrom rdf:resource=quot;#BudgetAccommodationquot;/>
              </owl:Restriction>
              </owl:Restriction>
              <owl:Class rdf:about=quot;#Destinationquot;/>
              <owl:Class rdf:about=quot;#Destinationquot;/>
              <owl:Restriction>
              <owl:Restriction>
                 <owl:onProperty>
                 <owl:onProperty>
                   <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/>
                    <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/>
                 </owl:onProperty>
                 </owl:onProperty>
                 <owl:someValuesFrom>
                 <owl:someValuesFrom>
                   <owl:Class>
                    <owl:Class>
                       <owl:unionOf rdf:parseType=quot;Collectionquot;>
                       <owl:unionOf rdf:parseType=quot;Collectionquot;>
                         <owl:Class rdf:about=quot;#Sportsquot;/>
                         <owl:Class rdf:about=quot;#Sportsquot;/>
                         <owl:Class rdf:about=quot;#Adventurequot;/>
                         <owl:Class rdf:about=quot;#Adventurequot;/>
                       </owl:unionOf>
                       </owl:unionOf>
                   </owl:Class>
                    </owl:Class>
                 </owl:someValuesFrom>
                 </owl:someValuesFrom>
              </owl:Restriction>
              </owl:Restriction>
           </owl:intersectionOf>
           </owl:intersectionOf>
       </owl:Class>
        </owl:Class>
     </owl:equivalentClass>
     </owl:equivalentClass>
F. </owl:Class>
   Corno, L. Farinetti- Politecnico di Torino                                         91
   </owl:Class>
Semantic annotation
Semantic annotation
     Explicit representation of a fact
           A given resource...
           ...is related to...
           ...a given conceptual representation




F. Corno, L. Farinetti- Politecnico di Torino     93
Annotation

                                                          xxxyxyxyyx xyxyx xyxy
                                                            xyx xyxyyx yyxyyx
                                                                yxyyyx yx
                                                            xyyx xyyx yxyyyxyx
                                                           xyxyyxxy xyx xyyxyx
                                                related
                                                           xyyx xyx yyyxyxyx
                                                           yyyxyxyyx xyyxyyx

                                                            xyxyyx yxy xyyxyx




F. Corno, L. Farinetti- Politecnico di Torino                                     94
“A given resource...”
     URI
                                                xxxyxyxyyx xyxyx xyxy
     URI Content                                  xyx xyxyyx yyxyyx
                                                      yxyyyx yx
           Text                                   xyyx xyyx yxyyyxyx
                                                 xyxyyxxy xyx xyyxyx
           XML / XHTML
                                                 xyyx xyx yyyxyxyx
           Multimedia                            yyyxyxyyx xyyxyyx

     Structured documents                         xyxyyx yxy xyyxyx

           Fragment

F. Corno, L. Farinetti- Politecnico di Torino                           95
Resource = fragment

                                                related
                                                          xyxyxyyx xyxyx xyxy
                                                           xyx xyxyyx yyxyyx
                                                               yxyyyx yx
                                                related    xyyx xyyx yxyyyxyx
                                                          xyxyyxxy xyx xyyxyx
                                                related   xyyx xyx yyyxyxyx
                                                          yyyxyxyyx xyyxyyx
                                                related    xyxyyx yxy xyyxyx




F. Corno, L. Farinetti- Politecnico di Torino                                   96
Resource fragmentation
     Identifying fragments
           Structure
                 XML nesting
                 XHTML sectioning
                 DIV nesting
           Visual appearance
                 Layout reverse-engineering
                 Exploit common usability conventions
                 Discard navigation information

F. Corno, L. Farinetti- Politecnico di Torino           97
Pushing fragmentation to the end

     Annotate each sentence, or each word
     In this way, we interpret semantics as
     linguistic semantics (deep semantics)
     The rest of this presentation favors the
     interpretation of conceptual semantics
     (shallow semantics)


F. Corno, L. Farinetti- Politecnico di Torino   98
“…to a given conceptual
representation”
     Identify a suitable conceptual
     representation of the resource
     Is a single concept a suitable
     representation?
           Weighted relationships
           Conceptual spectra
           Fuzzy logic
           …
F. Corno, L. Farinetti- Politecnico di Torino   99
“…is related to…”
     Annotation storage
     Annotation creation
     RDF (Resource
                                                related
     Description                                           xxxx
                                                          yyxyx
     Framework)




F. Corno, L. Farinetti- Politecnico di Torino                100
Explicit annotation
   This is the DREAM of the Semantic Web
   Each resource is explicitly (manually?)
   annotated
          by the author
          by an independent “classifier”
   Annotation may refer to different ontologies,
   and may relate to the resource or to [some
   of] its fragments
          see the Linked Data project
F. Corno, L. Farinetti- Politecnico di Torino   101
Automatic annotation
     Given a set of resources
     Given an ontology
     Generate a set of annotations, describing
     the resources with respect to the ontology
     concepts

     Also called “Information Extraction”

F. Corno, L. Farinetti- Politecnico di Torino   102
Automatic annotation creation
     Can a concept “know” if a resource is
     relevant?
           The concept name is not relevant
           The documents may be in other languages
     Bootstrap problem!
           Need “syntactical” ties with concepts
           Need “semantic” knowledge with resources


F. Corno, L. Farinetti- Politecnico di Torino         103
Bootstrap techniques
     Provide a set of words / patterns /
     sequences / rules / … for each concept
     (and for each language) that “activate” the
     concept
     Provide a set of relevant “real” resources
     classified on the ontology concepts
     …depends on the classification algorithm

F. Corno, L. Farinetti- Politecnico di Torino   104
Annotation for multimedia
     Semantic engines don’t care about
     resource format (text, video, image, ...)
     Automatic annotation is well developed
     and robust for text, only
           Text extraction, whenever possible (even if
           partially)
           Multimodal approaches to enrich knowledge
           Use user experience (Web 2.0)
F. Corno, L. Farinetti- Politecnico di Torino            105
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
 http://creativecommons.org/licenses/by-
 nc-sa/3.0/ or send a letter to Creative
 Commons, 171 Second Street, Suite 300,
 San Francisco, California, 94105, USA.

More Related Content

Similar to Ontologies: introduction, design, languages and tools

Similar to Ontologies: introduction, design, languages and tools (7)

Presentation for Demo.pptx
Presentation for Demo.pptxPresentation for Demo.pptx
Presentation for Demo.pptx
 
Pal gov.tutorial4.session1 2.whatisontology
Pal gov.tutorial4.session1 2.whatisontologyPal gov.tutorial4.session1 2.whatisontology
Pal gov.tutorial4.session1 2.whatisontology
 
Zoo 2
Zoo 2Zoo 2
Zoo 2
 
Sys Bio110sy(09)
Sys Bio110sy(09)Sys Bio110sy(09)
Sys Bio110sy(09)
 
Debate II: Phonics and Literacies
Debate II: Phonics and LiteraciesDebate II: Phonics and Literacies
Debate II: Phonics and Literacies
 
Continual Learning: Another Step Towards Truly Intelligent Machines
Continual Learning: Another Step Towards Truly Intelligent MachinesContinual Learning: Another Step Towards Truly Intelligent Machines
Continual Learning: Another Step Towards Truly Intelligent Machines
 
Brooks et al_1994_ch13_phylogenetics_systematics
Brooks et al_1994_ch13_phylogenetics_systematicsBrooks et al_1994_ch13_phylogenetics_systematics
Brooks et al_1994_ch13_phylogenetics_systematics
 

Recently uploaded

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
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
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
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
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
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
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 

Recently uploaded (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
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
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
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...
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
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
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
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
 

Ontologies: introduction, design, languages and tools

  • 1. Ontologies Fulvio Corno, Laura Farinetti Politecnico di Torino Dipartimento di Automatica e Informatica e-Lite Research Group – http://elite.polito.it
  • 2. Summary Introduction to ontologies Ontology “engineering” ontologies creation process Ontology languages Tools for ontologies design F. Corno, L. Farinetti- Politecnico di Torino 2
  • 3. Semantically rich descriptions to support search http://dictybase.org/db/html/help/GO.html http://dictybase.org/db/html/help/GO.html Topic = {metabolism, …} F. Corno, L. Farinetti- Politecnico di Torino 3
  • 4. Ontologies An ontology is an explicit description of a domain concepts properties and attributes of concepts constraints on properties and attributes individuals (often, but not always) An ontology defines a common vocabulary a shared understanding F. Corno, L. Farinetti- Politecnico di Torino 4
  • 5. “Ontology engineering” Defining terms in the domain and relations among them defining concepts in the domain (classes) arranging the concepts in a hierarchy (subclass-superclass hierarchy) defining which attributes and properties (slots) classes can have and constraints on their values defining individuals and filling in slot values F. Corno, L. Farinetti- Politecnico di Torino 5
  • 6. Why develop an ontology? To share common understanding of the structure of information among people among software agents To enable reuse of domain knowledge to avoid “re-inventing the wheel” to introduce standards to allow interoperability F. Corno, L. Farinetti- Politecnico di Torino 6
  • 7. An ontology takes Certificate 1 year Is_a Is_equivalent_to takes Is_a HNC Award Is_a Is_a takes HND 2 years Diploma takes F. Corno, L. Farinetti- Politecnico di Torino 7
  • 8. A more complex ontology [base.Entity] Person Worker Faculty Professor AssistantProfessor AssociateProfessor FullProfessor VisitingProfessor Lecturer PostDoc Assistant ResearchAssistant TeachingAssistant AdministrativeStaff Director Chair {Professor} Dean {Professor} ClericalStaff SystemsStaff Student UndergraduateStudent GraduateStudent F. Corno, L. Farinetti- Politecnico di Torino 8
  • 9. A more complex ontology Organization Department School University Program ResearchGroup Institute Publication Article TechnicalReport JournalArticle ConferencePaper UnofficialPublication Book Software Manual Specification Work Course Research Schedule F. Corno, L. Farinetti- Politecnico di Torino 9
  • 10. A more complex ontology Relation Argument 1 Argument 2 ====================================================== publicationAuthor Publication Person publicationDate Publication .DATE publicationResearch Publication Research softwareVersion Software .STRING softwareDocumentation Software Publication teacherOf Faculty Course teachingAssistantOf TeachingAssistant Course takesCourse Student Course age Person .NUMBER emailAddress Person .STRING head Organization Person undergraduateDegreeFrom Person University mastersDegreeFrom Person University doctoralDegreeFrom Person University advisor Student Professor subOrganization Organization Organization ……….. F. Corno, L. Farinetti- Politecnico di Torino 10
  • 11. Example of ontology engineering chair F. Corno, L. Farinetti- Politecnico di Torino 11
  • 12. Example of ontology engineering 1.A piece of furniture consisting of a seat, legs, back, and often arms, designed to accommodate one person. 2.A seat of office, authority, or dignity, such as that of a bishop. a.An office or position of authority, such as a professorship. b.A person who holds an office or a position of authority, such as one who presides over a meeting or administers a department of instruction at a college; a chairperson. 3.The position of a player in an orchestra. 4.Slang. The electric chair. 5.A seat carried about on poles; a sedan chair. 6.Any of several devices that serve to support or secure, such as a metal block that supports and holds railroad track in position. chair F. Corno, L. Farinetti- Politecnico di Torino 12
  • 13. Example of ontology engineering A piece of furniture consisting of a seat, legs, back, and often arms, designed to accommodate one person. chair F. Corno, L. Farinetti- Politecnico di Torino 13
  • 14. Example of ontology engineering chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 14
  • 15. Example of ontology engineering Something I can sit on ??? chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 15
  • 16. Example of ontology engineering Something I can sit on “sittable” chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 16
  • 17. Example of ontology engineering Something I can sit on “sittable” table chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 17
  • 18. Example of ontology engineering Something I can sit on “sittable” Something designed for sitting “for_sitting” table chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 18
  • 19. Ontology structure “sittable” “for_sitting” table chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 19
  • 20. Ingredients Concepts shorthand name (internal use) synthetic title (to be displayed) definition (real unambiguous shared definition) Relationships among concepts is_a other Annotations F. Corno, L. Farinetti- Politecnico di Torino 20
  • 21. Concepts Synthetic title Furniture to sit on “sittable” Definition Shorthand name Some piece of furniture that can be used to sit on, either by design or by its shape. F. Corno, L. Farinetti- Politecnico di Torino 21
  • 22. Internationalization Synthetic title Furniture to sit on Furniture to sit on Furniture to sit on Furniture to sit on Furniture to sit on Furniture to sit on Furniture to sit on “sittable” Definition Shorthand name Some piece of furniture that Some piece of furniture that Some piece of furniture that can Somepieceofoffurniturethat Some piece sitfurniture that canbe used totositon, eitherthat Some pieceof on, eitherby canbe used totositfurniture that Some piece of furniture by canbe used shape. either by on, designbe used tosit on, either by can be by its shape. either by or used tosit on, either by design be by its shape. either by designor used tosit on, can or used sit on, designbe by its shape. can designor by its shape. designor by its shape. designor by its shape. or by its F. Corno, L. Farinetti- Politecnico di Torino 22
  • 23. Relationships material room is_a is_a “sittable” is_a wood classroom is_a dining room “for_sitting” is_a is_a table is_a is_a is_a chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 23
  • 24. Relationships made_of material room is_a furnish is_a “sittable” is_a wood classroom ed is_a made_of dining room “for_sitting” is_a is_a table is_a is_a is_a chair seat stool bench F. Corno, L. Farinetti- Politecnico di Torino 24
  • 25. Ontology building blocks Ontologies generally describe: Individuals the basic or “ground level” objects Classes sets, collections, or types of objects Attributes properties, features, characteristics, or parameters that objects can have and share Relationships ways that objects can be related to one another F. Corno, L. Farinetti- Politecnico di Torino 25
  • 26. Individuals Also known as “instances” can be concrete objects animals molecules trees or abstract objects numbers words F. Corno, L. Farinetti- Politecnico di Torino 26
  • 27. Concepts Also known as “Classes” abstract groups, sets, or collections of objects They may contain individuals other classes a combination of both Examples Person: the class of all people Vehicle: the class of all vehicles F. Corno, L. Farinetti- Politecnico di Torino 27
  • 28. Concepts Can be defined extensionally … By defining every object that falls under the definition of the concept A class C is extensionally defined if and only if for every class C', if C' has exactly the same members of C, C and C' are identical E.g.: DayOfWeek = {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday} … or intensionally By defining the necessary and sufficient conditions for belonging to the concept E.g.: “bachelor” is an “unmarried man” F. Corno, L. Farinetti- Politecnico di Torino 28
  • 29. Concepts Defined by Name: any identifier, usually carefully chosen Definition: describes the well agreed meaning of the concept, in a human readable form Terms (Lexicon): list of terms (synonyms, etc.) usually adopted to identify the concept F. Corno, L. Farinetti- Politecnico di Torino 29
  • 30. Subsumption A concept (class) can subsume / be subsumed by any other class Subsumption is used to establish class hierarchies F. Corno, L. Farinetti- Politecnico di Torino 30
  • 31. Class partition A set of related classes and associated rules that allow objects to be placed into the appropriate class GEOMETRIC GEOMETRIC FIGURE FIGURE GEOMETRIC GEOMETRIC TWO TWO POINT POINT DIMENSIONAL DIMENSIONAL FIGURE FIGURE ONE ONE DIMENSIONAL DIMENSIONAL FIGURE FIGURE F. Corno, L. Farinetti- Politecnico di Torino 31
  • 32. Class partition Disjoint partition A disjoint partition rule guarantees that a single instance of a class cannot be in more than one sub-classes VEHICLE E.g. one specific truck VEHICLE cannot be in both 4-axle and TRUCK CAR TRUCK CAR 6-axle classes 6-AXLE 4-AXLE 6-AXLE 4-AXLE F. Corno, L. Farinetti- Politecnico di Torino 32
  • 33. Class partition Exhaustive partition every concrete object in the super-class is an instance of at least one of the partition classes F. Corno, L. Farinetti- Politecnico di Torino 33
  • 34. Attributes Describe specific features Can be complex (e.g.: list of values) Defined for a class/concept (e.g. car) Examples: number-of-doors: 4 number-of-wheels: 4 engine: {3.0L,4.0L} F. Corno, L. Farinetti- Politecnico di Torino 34
  • 35. Relationships Attributes that relate two or more concepts two concepts → binary relationship three concepts → ternary relationship Domain the concept(s) from which the relationship departs Range the concept(s) to which the relationship applies F. Corno, L. Farinetti- Politecnico di Torino 35
  • 36. Relationships Examples Car(MiniMinor) → individual definition Car(Mini) → individual definition Successor(Mini,MiniMinor) → relationship domain range F. Corno, L. Farinetti- Politecnico di Torino 36
  • 37. Commonly used relationships Subsumption the most important is-superclass-of usually denoted by its inverse is-a (is-subclass-of) Meronymy is-part-of describes how object are combined together to form composite objects F. Corno, L. Farinetti- Politecnico di Torino 37
  • 39. Ontology alignment http://www.webology.ir/2006/v3n3/a28.html http://www.webology.ir/2006/v3n3/a28.html F. Corno, L. Farinetti- Politecnico di Torino 39
  • 41. RDF / RDF Schema F. Corno, L. Farinetti- Politecnico di Torino 41
  • 42. RDF Schema example F. Corno, L. Farinetti- Politecnico di Torino 42
  • 43. RDFS problems 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 43
  • 44. RDFS problems it is not possible to define transitive, inverse or symmetrical statements (e.g. part of is a transitive property, hasPart is the inverse of isPartOf, touches is symmetrical) Reasoning is not well supported Non standard semantics, no native reasoner exists F. Corno, L. Farinetti- Politecnico di Torino 44
  • 45. Requirements for an ontology language Extend existing Web standards XML, RDF, RDFS, ... Easy to understand and to use based on well known KR languages Formally specified Adequate expressive power Automatic support for reasoning F. Corno, L. Farinetti- Politecnico di Torino 45
  • 46. Stack of Web languages W3C IST EU project OntoKnowledge OWL DARPA bioinformatics University of OIL community DAML+OIL Washington XOL SHOE OML RDF(S) University of XML Maryland F. Corno, L. Farinetti- Politecnico di Torino 46
  • 47. Ontology Web Language (OWL) 4th level on the semantic web cake Built on top of XML RDF/S Three versions Lite DL (maps to Description Logic) Full (not fully tractable) Serializable as XML F. Corno, L. Farinetti- Politecnico di Torino 47
  • 48. Ontology Web Language (OWL) F. Corno, L. Farinetti- Politecnico di Torino 48
  • 49. OWL-DL Based on Description Logic Well defined formal semantics well defined rules to treat sentence meaning well defined assumptions on the world being modeled Well known reasoning/inferencing algorithms tractable, conclusions can be derived in finite time Widely available reasoning systems F. Corno, L. Farinetti- Politecnico di Torino 49
  • 50. Building blocks in OWL Ontology declaration (XML syntax) <rdf:RDF xmlns:owl =http://www.w3.org/2002/07/owl#quot; <rdf:RDF xmlns:owl =http://www.w3.org/2002/07/owl#quot; xmlns:rdf =quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:rdf =quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#quot; xmlns:rdfs=quot;http://www.w3.org/2000/01/rdf-schema#quot; xmlns:rdfs=quot;http://www.w3.org/2000/01/rdf-schema#quot; xmlns:xsd =quot;http://www.w3.org/2001/XMLSchema#quot;> xmlns:xsd =quot;http://www.w3.org/2001/XMLSchema#quot;> Ontology metadata (information about the ontology) <owl:Ontology rdf:about=quot;quot;> <owl:Ontology rdf:about=quot;quot;> <rdfs:comment>An example OWL ontology</rdfs:comment> <rdfs:comment>An example OWL ontology</rdfs:comment> <owl:priorVersion <owl:priorVersion rdf:resource=quot;http://www.mydomain.org/uni-ns-oldquot;/> rdf:resource=quot;http://www.mydomain.org/uni-ns-oldquot;/> <owl:imports <owl:imports rdf:resource=quot;http://www.mydomain.org/personsquot;/> rdf:resource=quot;http://www.mydomain.org/personsquot;/> <rdfs:label>University Ontology</rdfs:label> <rdfs:label>University Ontology</rdfs:label> </owl:Ontology> </owl:Ontology> F. Corno, L. Farinetti- Politecnico di Torino 50
  • 51. Classes Every class is a descendant of owl:Thing Classes are defined using owl:Class <owl:Class rdf:ID=quot;Vehiclequot;/> <owl:Class rdf:ID=quot;Vehiclequot;/> Equivalence owl:equivalentClass <owl:Class rdf:ID=quot;Carquot;> <owl:Class rdf:ID=quot;Carquot;> <owl:equivalentClass rdf:resource=quot;#Automobilequot;/> <owl:equivalentClass rdf:resource=quot;#Automobilequot;/> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 51
  • 52. Subsumption Provided by owl:subClassOf <owl:Class rdf:ID=quot;2-Wheel-Drivequot;> <owl:Class rdf:ID=quot;2-Wheel-Drivequot;> <rdfs:subClassOf rdf:resource=quot;#Carquot;/> <rdfs:subClassOf rdf:resource=quot;#Carquot;/> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 52
  • 53. Partitions Disjoint partition owl:disjointWith <owl:Class rdf:about=quot;#2-Wheel-Drivequot;> <owl:Class rdf:about=quot;#2-Wheel-Drivequot;> <owl:disjointWith <owl:disjointWith rdf:resource=quot;#4-Wheel-Drivequot;/> rdf:resource=quot;#4-Wheel-Drivequot;/> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 53
  • 54. Partitions Exhaustive partition owl:oneOf <owl:Class rdf:ID=quot;Carquot;> <owl:Class rdf:ID=quot;Carquot;> <owl:oneOf rdf:parseType=quot;Collectionquot;> <owl:oneOf rdf:parseType=quot;Collectionquot;> <owl:Thing rdf:about=quot;#2-Wheel-Drivequot;/> <owl:Thing rdf:about=quot;#2-Wheel-Drivequot;/> <owl:Thing rdf:about=quot;#4-Wheel-Drivequot;/> <owl:Thing rdf:about=quot;#4-Wheel-Drivequot;/> </owl:oneOf> </owl:oneOf> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 54
  • 55. Attributes 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 55
  • 56. 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=quot;agequot;> <owl:DatatypeProperty rdf:ID=quot;agequot;> <rdfs:domain rdf:resource=quot;#Personquot;/> <rdfs:domain rdf:resource=quot;#Personquot;/> <rdfs:range rdf:resource=quot;http://www.w3.org/2001/ <rdfs:range rdf:resource=quot;http://www.w3.org/2001/ XMLSchema#nonNegativeIntegerquot;/> XMLSchema#nonNegativeIntegerquot;/> </owl:DatatypeProperty> </owl:DatatypeProperty> F. Corno, L. Farinetti- Politecnico di Torino 56
  • 57. 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 57
  • 58. Relationships Example <owl:ObjectProperty rdf:ID=quot;isTaughtByquot;> <owl:ObjectProperty rdf:ID=quot;isTaughtByquot;> <rdfs:domain rdf:resource=quot;#coursequot;/> <rdfs:domain rdf:resource=quot;#coursequot;/> <rdfs:range rdf:resource=quot;#academicStaffMemberquot;/> <rdfs:range rdf:resource=quot;#academicStaffMemberquot;/> <rdfs:subPropertyOf rdf:resource=quot;#involvesquot;/> <rdfs:subPropertyOf rdf:resource=quot;#involvesquot;/> </owl:ObjectProperty> </owl:ObjectProperty> F. Corno, L. Farinetti- Politecnico di Torino 58
  • 59. Instances (individuals) No unique name assumption in OWL 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 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 59
  • 60. Instances (individuals) Defined by means of rdf:Description + rdf:Type <academicStaffMember rdf:ID=quot;949352quot;> <academicStaffMember rdf:ID=quot;949352quot;> <uni:age rdf:datatype=quot;&xsd;integerquot;> <uni:age rdf:datatype=quot;&xsd;integerquot;> 39 39 </uni:age> </uni:age> </academicStaffMember> </academicStaffMember> <rdf:Description rdf:ID=quot;949353quot;> <rdf:Description rdf:ID=quot;949353quot;> <rdf:type rdf:resource=quot;#academicStaffMemberquot;/> <rdf:type rdf:resource=quot;#academicStaffMemberquot;/> </rdf:Description> </rdf:Description> F. Corno, L. Farinetti- Politecnico di Torino 60
  • 61. Advanced constructs OWL supports several advanced constructs to define classes and relationships Intensional definition of classes By defining constraints on attribute values (either object or datatype properties) <owl:Class rdf:about=quot;#academicStaffMemberquot;> <owl:Class rdf:about=quot;#academicStaffMemberquot;> <rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource=quot;#teachesquot;/> <owl:onProperty rdf:resource=quot;#teachesquot;/> <owl:someValuesFrom <owl:someValuesFrom rdf:resource=quot;#undergraduateCoursequot;/> rdf:resource=quot;#undergraduateCoursequot;/> </owl:Restriction> </owl:Restriction> </rdfs:subClassOf> </rdfs:subClassOf> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 61
  • 62. Advanced constructs 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=quot;#departmentquot;> <owl:Class rdf:about=quot;#departmentquot;> <rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource=quot;#hasMemberquot;/> <owl:onProperty rdf:resource=quot;#hasMemberquot;/> <owl:minCardinality <owl:minCardinality rdf:datatype=quot;&xsd;nonNegativeIntegerquot;> 10 rdf:datatype=quot;&xsd;nonNegativeIntegerquot;> 10 </owl:minCardinality> </owl:minCardinality> </owl:Restriction> </owl:Restriction> </rdfs:subClassOf> </rdfs:subClassOf> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 62
  • 63. Special properties 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 63
  • 64. Special properties owl:InverseFunctionalProperty defines a property for which two different objects cannot have the same value E.g.: the property “isTheSocialSecurityNumberFor”: a social security number is assigned to one person only F. Corno, L. Farinetti- Politecnico di Torino 64
  • 65. OWL class constructors F. Corno, L. Farinetti- Politecnico di Torino 65
  • 66. OWL axioms F. Corno, L. Farinetti- Politecnico di Torino 66
  • 67. OWL: what for? To build an ontology define classes and provide information on them 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 67
  • 68. Example of ontology building in OWL with Protégé
  • 69. 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/ F. Corno, L. Farinetti- Politecnico di Torino 69
  • 70. F. Corno, L. Farinetti- Politecnico di Torino 70
  • 71. Project steps 0. Conceptual design of the ontology 1. Classes definition 2. Properties definition 3. Individuals definition 4. Restrictions definition F. Corno, L. Farinetti- Politecnico di Torino 71
  • 72. Step 0 Conceptual design of the ontology F. Corno, L. Farinetti- Politecnico di Torino 72
  • 73. Bed&Breakfast Bed&Breakfast OneStarRating OneStarRating hasRating Accommodation Accommodation Rating Rating TwoStarRating TwoStarRating Accommodation Accommodation Camping Camping ThreeStarRating Budget ThreeStarRating Budget Accommodation Accommodation Hotel Hotel int hasZipCode hasAccommodation string Luxury Hotel Luxury Hotel Backpacker Contact Backpacker Contact Hiking Hiking hasStreet Destination Destination Surfing hasEMail Surfing string Sheraton hasContact Sheraton Sports isOffered Sports Destination Destination Beach Yoga Beach Yoga Caprera Caprera Activity Activity hasCity hasActivity Relaxation Relaxation Quiet Quiet string Destination Family Destination Family Gallipoli Gallipoli Destination Destination Sunbathing Sunbathing Sightseeing Adventure Sightseeing Adventure Bardonecchia Bardonecchia Rimini Rimini Safari Safari BunjeeJumping BunjeeJumping Museums Museums F. Corno, L. Farinetti- Politecnico di Torino 73
  • 74. Step 1a Define classes and subclasses Is-a relationship, or subsumption F. Corno, L. Farinetti- Politecnico di Torino 74
  • 75. Bed&Breakfast Bed&Breakfast Accommodation Accommodation Rating Rating Accommodation Accommodation Camping Camping Budget Budget Accommodation Accommodation Hotel Hotel Luxury Hotel Luxury Hotel Backpacker Contact Backpacker Contact Hiking Hiking Destination Destination Surfing Surfing Sports Sports Destination Destination Beach Yoga Beach Yoga Activity Activity Relaxation Relaxation Quiet Quiet Destination Family Destination Family Destination Destination Sunbathing Sunbathing Sightseeing Adventure Sightseeing Adventure Safari Safari BunjeeJumping BunjeeJumping Museums Museums F. Corno, L. Farinetti- Politecnico di Torino 75
  • 76. OWL code <owl:Class rdf:ID=quot;Campingquot;> <owl:Class rdf:ID=quot;Campingquot;> <rdfs:subClassOf> <rdfs:subClassOf> <owl:Class rdf:ID=quot;Accommodationquot;/> <owl:Class rdf:ID=quot;Accommodationquot;/> </rdfs:subClassOf> </rdfs:subClassOf> </owl:Class> </owl:Class> <owl:Class rdf:ID=quot;BudgetAccommodationquot;> <owl:Class rdf:ID=quot;BudgetAccommodationquot;> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> </owl:Class> </owl:Class> <owl:Class rdf:ID=quot;BedAndBreakfastquot;> <owl:Class rdf:ID=quot;BedAndBreakfastquot;> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> </owl:Class> </owl:Class> <owl:Class rdf:ID=quot;LuxuryHotelquot;> <owl:Class rdf:ID=quot;LuxuryHotelquot;> <rdfs:subClassOf> <rdfs:subClassOf> <owl:Class rdf:ID=quot;Hotelquot;/> <owl:Class rdf:ID=quot;Hotelquot;/> </rdfs:subClassOf> </rdfs:subClassOf> </owl:Class> </owl:Class> <owl:Class rdf:about=quot;#Hotelquot;> <owl:Class rdf:about=quot;#Hotelquot;> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 76
  • 77. Step 1b Disjoint Define disjoint Bed&Breakfast Bed&Breakfast classes Accommodation Accommodation Camping Camping Budget Budget Accommodation Accommodation Hotel Hotel <owl:Class rdf:about=quot;#Hotelquot;> <owl:Class rdf:about=quot;#Hotelquot;> <owl:disjointWith rdf:resource=quot;#Campingquot;/> <owl:disjointWith rdf:resource=quot;#Campingquot;/> <owl:disjointWith> <owl:disjointWith> <owl:Class rdf:about=quot;#BedAndBreakfastquot;/> <owl:Class rdf:about=quot;#BedAndBreakfastquot;/> </owl:disjointWith> </owl:disjointWith> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> <rdfs:subClassOf rdf:resource=quot;#Accommodationquot;/> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 77
  • 78. Step 1c Activity Activity Sightseeing Adventure Define multiple Sightseeing Adventure inheritance Safari Safari BunjeeJumping BunjeeJumping Museums Museums F. Corno, L. Farinetti- Politecnico di Torino 78
  • 79. Step 2a Range Accommodation Accommodation Define object properties hasAccommodation relationships Domain Destination Destination <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;> <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;> <rdfs:domain rdf:resource=quot;#Destinationquot;/> <rdfs:domain rdf:resource=quot;#Destinationquot;/> <rdfs:range rdf:resource=quot;#Accommodationquot;/> <rdfs:range rdf:resource=quot;#Accommodationquot;/> </owl:ObjectProperty> </owl:ObjectProperty> F. Corno, L. Farinetti- Politecnico di Torino 79
  • 80. Step 2b Define object properties characteristics E.g: define an inverse object property isOffered Destination Destination Activity Activity hasActivity <owl:ObjectProperty rdf:about=quot;#isOfferedquot;> <owl:ObjectProperty rdf:about=quot;#isOfferedquot;> <rdfs:range rdf:resource=quot;#Destinationquot;/> <rdfs:range rdf:resource=quot;#Destinationquot;/> <owl:inverseOf rdf:resource=quot;#hasActivityquot;/> <owl:inverseOf rdf:resource=quot;#hasActivityquot;/> <rdfs:domain rdf:resource=quot;#Activityquot;/> <rdfs:domain rdf:resource=quot;#Activityquot;/> </owl:ObjectProperty> </owl:ObjectProperty> F. Corno, L. Farinetti- Politecnico di Torino 80
  • 81. int Step 2c hasZipCode string Contact Contact hasStreet hasEMail string Define datatype properties The range specifies the data type <owl:DatatypeProperty rdf:ID=quot;hasEMailquot;> <owl:DatatypeProperty rdf:ID=quot;hasEMailquot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#stringquot;/> <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#stringquot;/> <rdfs:domain rdf:resource=quot;#Contactquot;/> <rdfs:domain rdf:resource=quot;#Contactquot;/> </owl:DatatypeProperty> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:ID=quot;hasZipCodequot;> <owl:DatatypeProperty rdf:ID=quot;hasZipCodequot;> <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#intquot;/> <rdfs:range rdf:resource=quot;http://www.w3.org/2001/XMLSchema#intquot;/> <rdfs:domain rdf:resource=quot;#Contactquot;/> <rdfs:domain rdf:resource=quot;#Contactquot;/> </owl:DatatypeProperty> </owl:DatatypeProperty> F. Corno, L. Farinetti- Politecnico di Torino 81
  • 82. Step 3 OneStarRating OneStarRating Accommodation Accommodation Rating Rating TwoStarRating TwoStarRating Define individuals ThreeStarRating ThreeStarRating instances Family Family Destination Destination Bardonecchia Bardonecchia Rimini Rimini <AccommodationRating rdf:ID=quot;OneStarRatingquot;/> <AccommodationRating rdf:ID=quot;OneStarRatingquot;/> <AccommodationRating rdf:ID=quot;ThreeStarRatingquot;/> <AccommodationRating rdf:ID=quot;ThreeStarRatingquot;/> <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/> <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/> <FamilyDestination rdf:ID=quot;Bardonecchiaquot;/> <FamilyDestination rdf:ID=quot;Bardonecchiaquot;/> <FamilyDestination rdf:ID=quot;Riminiquot;/> <FamilyDestination rdf:ID=quot;Riminiquot;/> F. Corno, L. Farinetti- Politecnico di Torino 82
  • 83. Step 4 Define restrictions To restrict the individuals that belong to a class Quantifier restrictions (existential, universal quantifiers) Cardinality restrictions hasValue restrictions F. Corno, L. Farinetti- Politecnico di Torino 83
  • 84. Step 4 – example 1 Accommodation Accommodation hasAccommodation >= 1 FamilyDestination is a Activity Activity Destination Destination Destination with at least one hasActivity >= 2 accommodation and at least Family Family 2 activities Destination Destination Necessary and sufficient condition Cardinality restriction F. Corno, L. Farinetti- Politecnico di Torino 84
  • 85. Step 4 – example 1 FamilyDestination is a FamilyDestination is a Destination with at least Destination with at least one accommodation and one accommodation and at least 2 activities at least 2 activities <owl:Class rdf:ID=quot;FamilyDestinationquot;> <owl:Class rdf:ID=quot;FamilyDestinationquot;> <owl:equivalentClass> <owl:equivalentClass> <owl:Class> <owl:Class> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:Restriction> <owl:Restriction> <owl:onProperty> <owl:onProperty> <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/> <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/> </owl:onProperty> </owl:onProperty> <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot; <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot; >1</owl:minCardinality> >1</owl:minCardinality> </owl:Restriction> </owl:Restriction> <owl:Restriction> <owl:Restriction> <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot; <owl:minCardinality rdf:datatype=quot;http://www.w3.org/2001/XMLSchema#intquot; >2</owl:minCardinality> >2</owl:minCardinality> <owl:onProperty> <owl:onProperty> <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/> <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/> </owl:onProperty> </owl:onProperty> </owl:Restriction> </owl:Restriction> <owl:Class rdf:about=quot;#Destinationquot;/> <owl:Class rdf:about=quot;#Destinationquot;/> </owl:intersectionOf> </owl:intersectionOf> </owl:Class> </owl:Class> </owl:equivalentClass> </owl:equivalentClass> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 85
  • 86. Step 4 – example 2 QuietDestination is a Destination Destination Destination that is not chosen by noisy families Quiet Quiet Destination Family Destination Family Destination Destination Complement restriction F. Corno, L. Farinetti- Politecnico di Torino 86
  • 87. Step 4 – example 2 QuietDestination is a QuietDestination is a Destination that is not Destination that is not chosen by noisy families chosen by noisy families <owl:Class rdf:ID=quot;QuietDestinationquot;> <owl:Class rdf:ID=quot;QuietDestinationquot;> <owl:equivalentClass> <owl:equivalentClass> <owl:Class> <owl:Class> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:Class> <owl:Class> <owl:complementOf rdf:resource=quot;#FamilyDestinationquot;/> <owl:complementOf rdf:resource=quot;#FamilyDestinationquot;/> </owl:Class> </owl:Class> <owl:Class rdf:about=quot;#Destinationquot;/> <owl:Class rdf:about=quot;#Destinationquot;/> </owl:intersectionOf> </owl:intersectionOf> </owl:Class> </owl:Class> </owl:equivalentClass> </owl:equivalentClass> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 87
  • 88. OneStarRating OneStarRating Step 4 – example 3 TwoStarRating TwoStarRating Accommodation Accommodation Rating Rating Bed&Breakfast Bed&Breakfast ThreeStarRating ThreeStarRating hasRating Budget Budget Camping Camping Accommodation Accommodation Accommodation Accommodation BudgetAccommodation is an Accommodation that has Luxury Hotel Luxury Hotel Hotel Hotel either one or two star rating Sheraton Sheraton Existential restriction F. Corno, L. Farinetti- Politecnico di Torino 88
  • 89. Step 4 – example 3 BudgetAccommodation BudgetAccommodation is an Accommodation is an Accommodation that has either one or that has either one or two star rating <owl:Class rdf:ID=quot;BudgetAccommodationquot;> two star rating <owl:Class rdf:ID=quot;BudgetAccommodationquot;> <owl:equivalentClass> <owl:equivalentClass> <owl:Class> <owl:Class> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:Restriction> <owl:Restriction> <owl:onProperty> <owl:onProperty> <owl:ObjectProperty rdf:ID=quot;hasRatingquot;/> <owl:ObjectProperty rdf:ID=quot;hasRatingquot;/> </owl:onProperty> </owl:onProperty> <owl:someValuesFrom> <owl:someValuesFrom> <owl:Class> <owl:Class> <owl:oneOf rdf:parseType=quot;Collectionquot;> <owl:oneOf rdf:parseType=quot;Collectionquot;> <AccommodationRating rdf:ID=quot;OneStarRatingquot;/> <AccommodationRating rdf:ID=quot;OneStarRatingquot;/> <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/> <AccommodationRating rdf:ID=quot;TwoStarRatingquot;/> </owl:oneOf> </owl:oneOf> </owl:Class> </owl:Class> </owl:someValuesFrom> </owl:someValuesFrom> </owl:Restriction> </owl:Restriction> <owl:Class rdf:about=quot;#Accommodationquot;/> <owl:Class rdf:about=quot;#Accommodationquot;/> </owl:intersectionOf> </owl:intersectionOf> </owl:Class> </owl:Class> </owl:equivalentClass> </owl:equivalentClass> </owl:Class> </owl:Class> F. Corno, L. Farinetti- Politecnico di Torino 89
  • 90. Bed&Breakfast Bed&Breakfast Hotel Step 4 – example 4 Hotel Camping Camping Accommodation Accommodation Budget Budget BackpackerDestination Accommodation Accommodation hasAccommodation is a Destination that Backpacker Backpacker Destination Destination provides budget Sports hasActivity Sports accommodation and Destination Activity Destination Relaxation Activity Relaxation offers sport or Adventure adventure activities Adventure Sightseeing Sightseeing F. Corno, L. Farinetti- Politecnico di Torino 90
  • 91. BackpackerDestination is BackpackerDestination is Step 4 – example 4 a Destination that provides a Destination that provides budget accommodation budget accommodation and offers sport or and offers sport or <owl:Class rdf:ID=quot;BackpackerDestinationquot;> <owl:Class rdf:ID=quot;BackpackerDestinationquot;> adventure activities adventure activities <owl:equivalentClass> <owl:equivalentClass> <owl:Class> <owl:Class> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:intersectionOf rdf:parseType=quot;Collectionquot;> <owl:Restriction> <owl:Restriction> <owl:onProperty> <owl:onProperty> <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/> <owl:ObjectProperty rdf:ID=quot;hasAccommodationquot;/> </owl:onProperty> </owl:onProperty> <owl:someValuesFrom rdf:resource=quot;#BudgetAccommodationquot;/> <owl:someValuesFrom rdf:resource=quot;#BudgetAccommodationquot;/> </owl:Restriction> </owl:Restriction> <owl:Class rdf:about=quot;#Destinationquot;/> <owl:Class rdf:about=quot;#Destinationquot;/> <owl:Restriction> <owl:Restriction> <owl:onProperty> <owl:onProperty> <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/> <owl:ObjectProperty rdf:ID=quot;hasActivityquot;/> </owl:onProperty> </owl:onProperty> <owl:someValuesFrom> <owl:someValuesFrom> <owl:Class> <owl:Class> <owl:unionOf rdf:parseType=quot;Collectionquot;> <owl:unionOf rdf:parseType=quot;Collectionquot;> <owl:Class rdf:about=quot;#Sportsquot;/> <owl:Class rdf:about=quot;#Sportsquot;/> <owl:Class rdf:about=quot;#Adventurequot;/> <owl:Class rdf:about=quot;#Adventurequot;/> </owl:unionOf> </owl:unionOf> </owl:Class> </owl:Class> </owl:someValuesFrom> </owl:someValuesFrom> </owl:Restriction> </owl:Restriction> </owl:intersectionOf> </owl:intersectionOf> </owl:Class> </owl:Class> </owl:equivalentClass> </owl:equivalentClass> F. </owl:Class> Corno, L. Farinetti- Politecnico di Torino 91 </owl:Class>
  • 93. Semantic annotation Explicit representation of a fact A given resource... ...is related to... ...a given conceptual representation F. Corno, L. Farinetti- Politecnico di Torino 93
  • 94. Annotation xxxyxyxyyx xyxyx xyxy xyx xyxyyx yyxyyx yxyyyx yx xyyx xyyx yxyyyxyx xyxyyxxy xyx xyyxyx related xyyx xyx yyyxyxyx yyyxyxyyx xyyxyyx xyxyyx yxy xyyxyx F. Corno, L. Farinetti- Politecnico di Torino 94
  • 95. “A given resource...” URI xxxyxyxyyx xyxyx xyxy URI Content xyx xyxyyx yyxyyx yxyyyx yx Text xyyx xyyx yxyyyxyx xyxyyxxy xyx xyyxyx XML / XHTML xyyx xyx yyyxyxyx Multimedia yyyxyxyyx xyyxyyx Structured documents xyxyyx yxy xyyxyx Fragment F. Corno, L. Farinetti- Politecnico di Torino 95
  • 96. Resource = fragment related xyxyxyyx xyxyx xyxy xyx xyxyyx yyxyyx yxyyyx yx related xyyx xyyx yxyyyxyx xyxyyxxy xyx xyyxyx related xyyx xyx yyyxyxyx yyyxyxyyx xyyxyyx related xyxyyx yxy xyyxyx F. Corno, L. Farinetti- Politecnico di Torino 96
  • 97. Resource fragmentation Identifying fragments Structure XML nesting XHTML sectioning DIV nesting Visual appearance Layout reverse-engineering Exploit common usability conventions Discard navigation information F. Corno, L. Farinetti- Politecnico di Torino 97
  • 98. Pushing fragmentation to the end Annotate each sentence, or each word In this way, we interpret semantics as linguistic semantics (deep semantics) The rest of this presentation favors the interpretation of conceptual semantics (shallow semantics) F. Corno, L. Farinetti- Politecnico di Torino 98
  • 99. “…to a given conceptual representation” Identify a suitable conceptual representation of the resource Is a single concept a suitable representation? Weighted relationships Conceptual spectra Fuzzy logic … F. Corno, L. Farinetti- Politecnico di Torino 99
  • 100. “…is related to…” Annotation storage Annotation creation RDF (Resource related Description xxxx yyxyx Framework) F. Corno, L. Farinetti- Politecnico di Torino 100
  • 101. Explicit annotation This is the DREAM of the Semantic Web Each resource is explicitly (manually?) annotated by the author by an independent “classifier” Annotation may refer to different ontologies, and may relate to the resource or to [some of] its fragments see the Linked Data project F. Corno, L. Farinetti- Politecnico di Torino 101
  • 102. Automatic annotation Given a set of resources Given an ontology Generate a set of annotations, describing the resources with respect to the ontology concepts Also called “Information Extraction” F. Corno, L. Farinetti- Politecnico di Torino 102
  • 103. Automatic annotation creation Can a concept “know” if a resource is relevant? The concept name is not relevant The documents may be in other languages Bootstrap problem! Need “syntactical” ties with concepts Need “semantic” knowledge with resources F. Corno, L. Farinetti- Politecnico di Torino 103
  • 104. Bootstrap techniques Provide a set of words / patterns / sequences / rules / … for each concept (and for each language) that “activate” the concept Provide a set of relevant “real” resources classified on the ontology concepts …depends on the classification algorithm F. Corno, L. Farinetti- Politecnico di Torino 104
  • 105. Annotation for multimedia Semantic engines don’t care about resource format (text, video, image, ...) Automatic annotation is well developed and robust for text, only Text extraction, whenever possible (even if partially) Multimodal approaches to enrich knowledge Use user experience (Web 2.0) F. Corno, L. Farinetti- Politecnico di Torino 105
  • 106. 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 http://creativecommons.org/licenses/by- nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.