Ontology construction II

 Course “Ontology Engineering”




                                 1
Overview
• Part-whole relations
• Vocabulary representation with SKOS
• Examples of commonly-used ontologies




                                         2
PART-WHOLE RELATIONS
Part-whole relations
• “Mereology” = theory of part-whole
  – “meros” is Greek for part
• Common in many domains
  – Human body, cars, installations, documents
• Different from the subclass/generalization
  relation
• No built-in modeling constructs in OWL
• Different types of part-whole relations exist
  – With important semantic differences
                                                 4
UML Aggregation
• Aggregation denotes a binary association
  in which one side is an "assembly" and the
  other side a "part".
• "Assembly" and "part" act as predefined
  roles involved in the aggregation
  association.
• Cardinality of a part can be defined
  – precisely one; optional (0-1); many, ...
• No semantics in UML!
                                               5
Aggregation example in UML

            0-1                 audio
CD player                      system



 record     0-1
 player
                   0-1

              tuner
                         0-1            0-1   2,4
                                                          amplifier
                  tape deck          head       speaker
                                    phones



                                                                      6
UML Composition
• Sub-type of aggregation
• Existence of part depends on aggregate




                                           7
Aggregation vs. generalization
• Similarities:
  – Tree-like structure
  – Transitive properties
• Differences:
  – AND-tree (aggregation) vs. OR-tree
    (generalization)
  – instance tree (aggregation) vs. class tree
    (generalization)

                                                 8
Examples: partOf or subClassOf?

•   House – Building
•   Brick – House
•   Antique book – Antique book collection
•   Silvio – Married Couple
•   Veronica – Married Couple
•   Hand – Body part
•   Finger ‐ Hand

                                             9
Confusion with non-
compositional relations
• Temporal topological inclusion
   – The customer is in the store, but not part of it
• Classification inclusion
   – A Bond movie is an instance of “film” but part of my
     film collection
• Attribution
   – The height and width of a ship are not part of the ship
• Attachment
   – A wrist watch is not part of the wrist
• Ownership
   – I own a bicycle but it is not part of me
                                                            10
Representing part-whole
       relations




                          11
Representing part-whole
relations
• Part-whole relation is transitive
  – If A is part of B and B is part of C then A is
    part of C
  – But see the caveats later on
• Usually there is a a need to distinguish:
  – Part in a transitive sense
  – Direct part


                                                     12
Basic scheme
• Define a property e.g. partOf and
  (usually needed) the inverse hasPart
• Define a subproperty of partOf to
  represent direct parts, e.g. partOfDirect
• Choose the primary property for
  expressing part-whole: part of or
  hasPart?
  – partOf is generally more intuitive. Why?

                                               13
Transitivity
• A subproperty of a transitive property is
  not by definition transitive
  – Make sure you understand why
• Example: direct-part properties are not
  transitive




                                              14
Part-whole specification with
individuals
:Amsterdam a :InhabitatedPlace ;
  :partOf :North-Holland .

:North-Holland a :Province ;
  :partOf :Netherlands .

:Place a owl:Class ;
  rdfs:subClassOf
    [ a owl:Restriction ;
      owl:onProperty :partOf ;
      owl:allValuesFrom :Place ] .   15
Part-whole specification with
classes
AudioSystem hasPart
 someValuesFrom Amplifier
 someValuesFrom Loudspeaker
 someValuesFrom InputSystem

[assume CD, tuner and cassette player
  defined as subclasses of input system]

                                           16
Characteristics of part-whole
relations
• Vertical relationships
  – Existence dependency between whole and
    part
  – Feature dependencies:
     • Inheritance from part to whole: “defective”
     • Inheritance from whole to part: “owner”
     • Systematic relation: weight whole = sum weight
       parts
• Horizontal relationships
  – Constraints between parts
                                                        17
Types of part‐ whole
     relations




                       18
Types of part-whole relations
Based on three distinctions
  1. Configurability
       Functional/structural relation with the other parts
        or the whole yes/no
  2. Homeomerous
       Parts are same kind as the whole yes/no
  3. Invariance
       Parts can be separated from the whole


                                                          19
Component-integral
• Functional/structural relation to the whole
• Parts can be removed and are different
  from whole
• Organization of the parts
• Examples: car wheels, film scenes
• N.B. difference between “wheel” and “car
  wheel”

                                                20
Material-object
• Invariant configuration
• Examples:
  – A bicycle is partly iron
  – Wine is partly alcohol
  – Human body is partly water
• The “made-off” relation
• Relation between part and whole is not
  known
                                           21
Portion-object
• Homeomeric configuration of parts
• Examples:
  – A lice of bread is part of a loaf of bread
  – A sip of coffee is part of a cup o coffee
• Portions can be quantified with standard
  measures (liter, gram, ..)
• Homeomeric: a sip of coffee is coffee (but
  a bicycle wheel is not a bicycle)
  – Ingredients of portion and object are the same
                                                 22
Place-area
• Homeomeric invariant configuration
• Examples:
  – North-Holland is part of The Netherlands
  – The Mont Blanc peak is part of the Mont Blanc
    mountain
  – The head is part of the human body (?!)
• Typically between places and locations


                                               23
Member-bunch
• No configuration, no invariance, not
  homeomeric
• Members of a collection
• Examples:
  – A tree is part of a wood
  – The hockey player is part of a club
• Differentiate from classification-based
  collections
  – A tree is a member of the class of trees

                                               24
Member-partnership
• Same as member-bunch, but invariant
• If a part is removed, the whole ceases to
  exist
• Examples:
  – Bonny and Clyde
  – Laurel and Hardy
  – A married couple


                                              25
Example: types of part of
   relations
• Vitamin – Orange
• Branch – Tree
• Student – the class of ’02
• Book – library
• Chair – Faculty Board
• Engine – Car
• Artuicle - newspaper
                               26
Transitivity of part-whole types
• Transitivity does not (necessarily) hold
  when traversing different types of part-
  whole relation
  – I am a member of a club (member-bunch)
  – My head is part of me (place-area)
  – But: my head is not a part of the club




                                             27
Practical example of
ontology modelling




                       28
Use case
:SelectionCommittee
   a owl:Class ;
   rdfs:subClassOf
     [ a owl:Restriction ;
       owl:onProperty :committeeMember ;

       owl:allValuesFrom :Person
    ] .
• How can we define that a selection committee
  must have two female members?                  29
Qualified cardinality restrictions
(QCRs)
• Restriction on the number of values of a
  certain type (hence “qualified”)
• owl:someValuesFrom is an example of such
  a constraint
  – cardinality of 1 or more of a certain type of
    value
• Typically used to specify the component
  types in some part-of structure

                                                    30
Workaround for QCRs
    1. Define a subproperty of the property on
       which you want to define a QCR
    2. Define a value constraint (using either
       owl:allValuesFrom or rdfs:range) and a
       cardinality constraint on the subproperty

•   Cumbersome for complex part-whole
    relations
•   QCR constructs in OWL2

                                                   31
Example workaround
:SelectionCommittee a owl:Class
   rdfs:subClassOf
     [ a owl:Restriction ;
       owl:onProperty :committeeMemberFemale ;
       owl:allValuesFrom :FemalePerson ] ;
   rdfs:subClassOf
     [ a owl:Restriction ;
       owl:onProperty :committeeMemberFemale ;
       owl:minCardinality "2"^^xsd:int] .


                                           32
Literature
• Simple part-whole relations in OWL Ontologies

• Six Different Kinds of Composition

• (A foundation for composition)




                                          33
Classroom exercise "Bitterness"


 • In certain combinations and minimum
   concentrations one or more amino acids
   can cause bitterness. Amino acids are
   divided into three groups: Group I, II and
   III. Every amino acid has a unique
   chemical formula.


                                                34
SKOS &
VOCABULARIES
Overview
• Commonly used schemas about:
  – Thesauri (SKOS)
  – People and what they do and like (FOAF)
  – Finding documents (Dublin Core)
  – Time
  – Provenance




                                              36
Thesauri (and vocabularies)
• “Standard” terminology in a particular
  domain
• Developed by a community over years
• ISO standard for thesauri
• Starting point for ontologies
  – enrichment



                                           37
Example thesauri
• WordNet: lexical resource
  http://wordnet.princeton.edu/cgi-bin/webwn
• Getty thesauri
  – AAT: Art & Architecture Thesaurus
  – TGN: Thesaurus of Geographic Names
  – ULAN: Union List of Artist Names
• Iconclass
          http://www.iconclass.nl
• MeSH: Medical Subject Headings
                                               38
ISO standard for representing
thesauri
• Term
  – Descriptor / Preferred term (USE)
  – Non-descriptor / Non-preferred term (UF)
• Hierarchical relation between terms
  – Broader/narrower term (BT/NT)
• Association between terms (RT)



                                               39
SKOS:
pattern for thesaurus modeling
• Based on ISO standard
• RDF representation
• Documentation:
 http://www.w3.org/TR/swbp-skos-core-guide/
• Base class: SKOS Concept




                                              40
Classes versus Concepts
• skos:Concepts are “subjects” used to index
  things, while rdfs:Classes are sets of things
  themselves
  – Apart from the meaning of a subject, the ordering of
    skos:Concepts can also have to do with how
    documents are grouped.
• A skos:Concept can correspond to both instance
  and class
• The narrower skos:Concept can be of a different
  type than its broader skos:Concept
                                                           41
Multi-lingual labels for
concepts




                           42
Difference between WordNet
and SKOS




                             43
Documenting concepts




                       44
Semantic relation:
broader and narrower
• No subclass semantics assumed!




                                   45
broader vs subClassOf
• Broader is more generic than subClassOf
• Broader can be
  – Generic (subclass or type)
  – Partitive (structural, location, membership,
    etc.)
  – Topic implication (e.g. cow milk under cows)




                                                   46
Semantic relations:
related
• Symmetric relation




                       47
Facets
• Thesauri are often structured into facets,
  high-level groups of similar concepts
  – Objects, People, Places, Events, etc.
• Facets typically correspond to fields that
  are useful in a fielded search engine
  – Subject, Author, Publisher, etc.
• In SKOS a facet can be modeled with
  skos:ConceptScheme
                                               48
Defining the top level of the
hierarchy




                                49
Collections:
role-type trees




            50
COMMON ONTOLOGIES
Friend of a Friend (FOAF)
• Describing people:
  – names
  – depictions
  – friends, acquaintances, relations
  – organizations
  – e-mail addresses
  – webpages
  – ...
• see http://xmlns.com/foaf/spec/
                                        52
Agents: People and Groups




                            53
FOAF Basics




              54
Agent identity
• When are two Agents the same?
  – definitely when they have the same URI or openID
  – probably when they have the same e-mail address...
    owl:InverseFunctionalProperty?
  – maybe when they have the same name...
    William of Orange (I the Silent? III of England? the
    Bishop? of Beax? the pigeon in WWII?)
• AAA, so you have to do disambiguation, also
  called “smushing”


                                                           55
FOAF Personal Info




                     56
FOAF Documents




                 57
Dublin Core
• A basic schema to improve resource
  discovery on the web, i.e. finding stuff.
• Consists of 15 basic elements that are all
  optional, extensible, and repeatable.
• International and interdisciplinary.
• see http://purl.org/dc/
• Newest version: 1.1
   http://dublincore.org/documents/dces/
                                               58
Dublin Core 1.0 Elements
  – Title                            – Format
  – Creator                          – Identifier
  – Subject                          – Source
  – Description                      – Language
  – Publisher                        – Relation
  – Contributor                      – Coverage
  – Date                             – Rights
  – Type     think of possible links with: FOAF, SKOS,
                  Creative Commons, MPEG-7, XML Schema,
                  RSS, etc. Facets?                       59
Element Refinement




                     60
Provenance Definition

• Oxford English Dictionary:
  – the fact of coming from some particular source or
    quarter; origin, derivation
  – the history or pedigree of a work of art, manuscript,
    rare book, etc.;
  – concretely, a record of the passage
    of an item through its various
    owners.
• The provenance of a piece of data is the
   process that led to that piece of data
Open Provenance Model




                        62
Time ontology
• Time point versus time interval
  – View point as special case of an interval with
    identical start and end
• Representation of time and duration
  concepts
• See
      http://www.w3.org/TR/owl-time/


                                                     63
Allen’s time relations




                         64

Ontology Engineering: ontology construction II

  • 1.
    Ontology construction II Course “Ontology Engineering” 1
  • 2.
    Overview • Part-whole relations •Vocabulary representation with SKOS • Examples of commonly-used ontologies 2
  • 3.
  • 4.
    Part-whole relations • “Mereology”= theory of part-whole – “meros” is Greek for part • Common in many domains – Human body, cars, installations, documents • Different from the subclass/generalization relation • No built-in modeling constructs in OWL • Different types of part-whole relations exist – With important semantic differences 4
  • 5.
    UML Aggregation • Aggregationdenotes a binary association in which one side is an "assembly" and the other side a "part". • "Assembly" and "part" act as predefined roles involved in the aggregation association. • Cardinality of a part can be defined – precisely one; optional (0-1); many, ... • No semantics in UML! 5
  • 6.
    Aggregation example inUML 0-1 audio CD player system record 0-1 player 0-1 tuner 0-1 0-1 2,4 amplifier tape deck head speaker phones 6
  • 7.
    UML Composition • Sub-typeof aggregation • Existence of part depends on aggregate 7
  • 8.
    Aggregation vs. generalization •Similarities: – Tree-like structure – Transitive properties • Differences: – AND-tree (aggregation) vs. OR-tree (generalization) – instance tree (aggregation) vs. class tree (generalization) 8
  • 9.
    Examples: partOf orsubClassOf? • House – Building • Brick – House • Antique book – Antique book collection • Silvio – Married Couple • Veronica – Married Couple • Hand – Body part • Finger ‐ Hand 9
  • 10.
    Confusion with non- compositionalrelations • Temporal topological inclusion – The customer is in the store, but not part of it • Classification inclusion – A Bond movie is an instance of “film” but part of my film collection • Attribution – The height and width of a ship are not part of the ship • Attachment – A wrist watch is not part of the wrist • Ownership – I own a bicycle but it is not part of me 10
  • 11.
  • 12.
    Representing part-whole relations • Part-wholerelation is transitive – If A is part of B and B is part of C then A is part of C – But see the caveats later on • Usually there is a a need to distinguish: – Part in a transitive sense – Direct part 12
  • 13.
    Basic scheme • Definea property e.g. partOf and (usually needed) the inverse hasPart • Define a subproperty of partOf to represent direct parts, e.g. partOfDirect • Choose the primary property for expressing part-whole: part of or hasPart? – partOf is generally more intuitive. Why? 13
  • 14.
    Transitivity • A subpropertyof a transitive property is not by definition transitive – Make sure you understand why • Example: direct-part properties are not transitive 14
  • 15.
    Part-whole specification with individuals :Amsterdama :InhabitatedPlace ; :partOf :North-Holland . :North-Holland a :Province ; :partOf :Netherlands . :Place a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :partOf ; owl:allValuesFrom :Place ] . 15
  • 16.
    Part-whole specification with classes AudioSystemhasPart someValuesFrom Amplifier someValuesFrom Loudspeaker someValuesFrom InputSystem [assume CD, tuner and cassette player defined as subclasses of input system] 16
  • 17.
    Characteristics of part-whole relations •Vertical relationships – Existence dependency between whole and part – Feature dependencies: • Inheritance from part to whole: “defective” • Inheritance from whole to part: “owner” • Systematic relation: weight whole = sum weight parts • Horizontal relationships – Constraints between parts 17
  • 18.
    Types of part‐whole relations 18
  • 19.
    Types of part-wholerelations Based on three distinctions 1. Configurability  Functional/structural relation with the other parts or the whole yes/no 2. Homeomerous  Parts are same kind as the whole yes/no 3. Invariance  Parts can be separated from the whole 19
  • 20.
    Component-integral • Functional/structural relationto the whole • Parts can be removed and are different from whole • Organization of the parts • Examples: car wheels, film scenes • N.B. difference between “wheel” and “car wheel” 20
  • 21.
    Material-object • Invariant configuration •Examples: – A bicycle is partly iron – Wine is partly alcohol – Human body is partly water • The “made-off” relation • Relation between part and whole is not known 21
  • 22.
    Portion-object • Homeomeric configurationof parts • Examples: – A lice of bread is part of a loaf of bread – A sip of coffee is part of a cup o coffee • Portions can be quantified with standard measures (liter, gram, ..) • Homeomeric: a sip of coffee is coffee (but a bicycle wheel is not a bicycle) – Ingredients of portion and object are the same 22
  • 23.
    Place-area • Homeomeric invariantconfiguration • Examples: – North-Holland is part of The Netherlands – The Mont Blanc peak is part of the Mont Blanc mountain – The head is part of the human body (?!) • Typically between places and locations 23
  • 24.
    Member-bunch • No configuration,no invariance, not homeomeric • Members of a collection • Examples: – A tree is part of a wood – The hockey player is part of a club • Differentiate from classification-based collections – A tree is a member of the class of trees 24
  • 25.
    Member-partnership • Same asmember-bunch, but invariant • If a part is removed, the whole ceases to exist • Examples: – Bonny and Clyde – Laurel and Hardy – A married couple 25
  • 26.
    Example: types ofpart of relations • Vitamin – Orange • Branch – Tree • Student – the class of ’02 • Book – library • Chair – Faculty Board • Engine – Car • Artuicle - newspaper 26
  • 27.
    Transitivity of part-wholetypes • Transitivity does not (necessarily) hold when traversing different types of part- whole relation – I am a member of a club (member-bunch) – My head is part of me (place-area) – But: my head is not a part of the club 27
  • 28.
  • 29.
    Use case :SelectionCommittee a owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :committeeMember ; owl:allValuesFrom :Person ] . • How can we define that a selection committee must have two female members? 29
  • 30.
    Qualified cardinality restrictions (QCRs) •Restriction on the number of values of a certain type (hence “qualified”) • owl:someValuesFrom is an example of such a constraint – cardinality of 1 or more of a certain type of value • Typically used to specify the component types in some part-of structure 30
  • 31.
    Workaround for QCRs 1. Define a subproperty of the property on which you want to define a QCR 2. Define a value constraint (using either owl:allValuesFrom or rdfs:range) and a cardinality constraint on the subproperty • Cumbersome for complex part-whole relations • QCR constructs in OWL2 31
  • 32.
    Example workaround :SelectionCommittee aowl:Class rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :committeeMemberFemale ; owl:allValuesFrom :FemalePerson ] ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty :committeeMemberFemale ; owl:minCardinality "2"^^xsd:int] . 32
  • 33.
    Literature • Simple part-wholerelations in OWL Ontologies • Six Different Kinds of Composition • (A foundation for composition) 33
  • 34.
    Classroom exercise "Bitterness" • In certain combinations and minimum concentrations one or more amino acids can cause bitterness. Amino acids are divided into three groups: Group I, II and III. Every amino acid has a unique chemical formula. 34
  • 35.
  • 36.
    Overview • Commonly usedschemas about: – Thesauri (SKOS) – People and what they do and like (FOAF) – Finding documents (Dublin Core) – Time – Provenance 36
  • 37.
    Thesauri (and vocabularies) •“Standard” terminology in a particular domain • Developed by a community over years • ISO standard for thesauri • Starting point for ontologies – enrichment 37
  • 38.
    Example thesauri • WordNet:lexical resource http://wordnet.princeton.edu/cgi-bin/webwn • Getty thesauri – AAT: Art & Architecture Thesaurus – TGN: Thesaurus of Geographic Names – ULAN: Union List of Artist Names • Iconclass http://www.iconclass.nl • MeSH: Medical Subject Headings 38
  • 39.
    ISO standard forrepresenting thesauri • Term – Descriptor / Preferred term (USE) – Non-descriptor / Non-preferred term (UF) • Hierarchical relation between terms – Broader/narrower term (BT/NT) • Association between terms (RT) 39
  • 40.
    SKOS: pattern for thesaurusmodeling • Based on ISO standard • RDF representation • Documentation: http://www.w3.org/TR/swbp-skos-core-guide/ • Base class: SKOS Concept 40
  • 41.
    Classes versus Concepts •skos:Concepts are “subjects” used to index things, while rdfs:Classes are sets of things themselves – Apart from the meaning of a subject, the ordering of skos:Concepts can also have to do with how documents are grouped. • A skos:Concept can correspond to both instance and class • The narrower skos:Concept can be of a different type than its broader skos:Concept 41
  • 42.
  • 43.
  • 44.
  • 45.
    Semantic relation: broader andnarrower • No subclass semantics assumed! 45
  • 46.
    broader vs subClassOf •Broader is more generic than subClassOf • Broader can be – Generic (subclass or type) – Partitive (structural, location, membership, etc.) – Topic implication (e.g. cow milk under cows) 46
  • 47.
  • 48.
    Facets • Thesauri areoften structured into facets, high-level groups of similar concepts – Objects, People, Places, Events, etc. • Facets typically correspond to fields that are useful in a fielded search engine – Subject, Author, Publisher, etc. • In SKOS a facet can be modeled with skos:ConceptScheme 48
  • 49.
    Defining the toplevel of the hierarchy 49
  • 50.
  • 51.
  • 52.
    Friend of aFriend (FOAF) • Describing people: – names – depictions – friends, acquaintances, relations – organizations – e-mail addresses – webpages – ... • see http://xmlns.com/foaf/spec/ 52
  • 53.
  • 54.
  • 55.
    Agent identity • Whenare two Agents the same? – definitely when they have the same URI or openID – probably when they have the same e-mail address... owl:InverseFunctionalProperty? – maybe when they have the same name... William of Orange (I the Silent? III of England? the Bishop? of Beax? the pigeon in WWII?) • AAA, so you have to do disambiguation, also called “smushing” 55
  • 56.
  • 57.
  • 58.
    Dublin Core • Abasic schema to improve resource discovery on the web, i.e. finding stuff. • Consists of 15 basic elements that are all optional, extensible, and repeatable. • International and interdisciplinary. • see http://purl.org/dc/ • Newest version: 1.1 http://dublincore.org/documents/dces/ 58
  • 59.
    Dublin Core 1.0Elements – Title – Format – Creator – Identifier – Subject – Source – Description – Language – Publisher – Relation – Contributor – Coverage – Date – Rights – Type think of possible links with: FOAF, SKOS, Creative Commons, MPEG-7, XML Schema, RSS, etc. Facets? 59
  • 60.
  • 61.
    Provenance Definition • OxfordEnglish Dictionary: – the fact of coming from some particular source or quarter; origin, derivation – the history or pedigree of a work of art, manuscript, rare book, etc.; – concretely, a record of the passage of an item through its various owners. • The provenance of a piece of data is the process that led to that piece of data
  • 62.
  • 63.
    Time ontology • Timepoint versus time interval – View point as special case of an interval with identical start and end • Representation of time and duration concepts • See http://www.w3.org/TR/owl-time/ 63
  • 64.

Editor's Notes

  • #4 SHIT ik ben de nieuwe part-of lecture in pptx kwijt ….ik heb alleen de pdf nog. Agenda: 3 things -qcr -part-of -ass1
  • #6 Comparison. Build in in uml, not in rdf/owl. Aggregatie no semantics in UML.
  • #9 Instance tree in owl, but not in uml??
  • #13 What are the parts of a car, what is a house made of?
  • #14 Part of is a transitive property, is partOfDirectly also? What is an engine? It is part of a car? What is a car?
  • #15 Remember transitivity of hasAncestor, but not hasParent.
  • #16 Restriction: a place can only be part of a place. Provinces and InhabitedPlaces are Places. You could add some part of directly statements: e.g. Amsterdam part of directly North-Holland.
  • #17 You could decompose these parts further into smaller parts: e.g
  • #20 1. Engine has clear function in a car. 2. water. 3. Can part be removed, and will the whole still exist?
  • #21 What do you want to say with last line? Not all wheels are part of car?
  • #22 Cannot take the iron out of a nail.
  • #26 Silvio and Veronica
  • #30 What does this say? We want to restrict the cardinality of a property, but only for a certain value. In owl options for cardinality contraints: minCardinality, maxCardinality, cardinality. Options for value contraints: allValuesFrom, someValuesFrom, hasValue. But not two combine the two. Do you see that it is not straightforward?
  • #31 someValuesFrom: existential quantifier: E omgekeerd. Cardinality 1..* allValuesFrom: universal quantifier A omgekeerd. No cardinality. Bike: onproperty haspart somevaluesfrom wheel, somevaluesfrom pedal.
  • #32 What if you want another cardinality than 1…*