seman+c%web%ontology%design%stlab.istc.cnr.it/documents/slides/phdcourse/bologna2011/ontology... ·...
Post on 16-Feb-2020
1 Views
Preview:
TRANSCRIPT
5/9/11
1
Seman+c Web Ontology Design
Valen+na Presu< and Eva Blomqvist Lecture 3 @ Corso DoForato 2011
Dipar+mento di Scienze dell’Informazione Bologna, Italy
Computa+onal ontologies
• Ontologies as (soPware) components, expressed and managed in standard W3C languages like RDF, OWL, RIF, SPARQL
• Ontology design is the core aspect • Quality is associated with good design
2
5/9/11
2
Quality • Three quality dimensions: Structural-‐Content-‐Sustainability – Content is the primary dimension
• Content compliance spans Coverage-‐Task-‐SelfExplana+on – Task is the immediately measurable aspect – Quality is not maximal and abstract, but bound to context – Par+al orders of problems and reusable solu+ons (locality) – Good prac+ces (history)
• Empirical methods for evalua+on (measurability)
What is ontology design? 1/2
• Computa+onal Ontologies are ar+facts – Have a structure (linguis+c, logical, etc.) – Their func+on is to “encode” a descrip(on of the world (actual, possible, counterfactual, impossible, desired, etc.) for some purpose
5/9/11
3
What is ontology design? 2/2 • Ontologies must match both domain and task – Allow the descrip+on of the en++es (“domain”) whose aFributes and rela+ons are concerned because of some purpose • social events and agents as en++es that are considered in a legal case
• research topics as en++es that are dealt with by a project, worked on by academic staff, and can be topics of documents
– Serve a purpose (“task”) • finding en++es that are considered in a same legal case • finding people that work on a same topic • matching project topics to staff competencies, +me leP, available funds, etc.
Standard languages help
• Transform all in RDF, or even OWL – Cf. Triplify ini+a+ve – Datasets extracted from heterogeneous sources, and triplified
– Seman+cs depends on intended task of data and rela+ons used for linking
• Then search/visualize RDF data, or make integra+ng applica+ons
5/9/11
4
Knowledge search over the seman+c web
Ontology Design PaFerns
Valen+na Presu< and Eva Blomqvist Lecture 3 @ Corso DoForato 2011
Dipar+mento di Scienze dell’Informazione Bologna, Italy
5/9/11
5
Outline
• Mo+va+on for ontology design paFerns • Types of ontology design paFerns • Catalogue of ODPs • Content ODPs • Logical ODPs
Two kinds of ontologies
• Coverage-‐oriented ontologies – They cover the terminology/metadata/textual corpora/
folksonomies ... that fit a specific domain [big reengineering problem -‐ exploited for annota+on, retrieval, etc.]
• Task-‐oriented ontologies – They are able to give a structure to a knowledge base that can be
used to answer competency ques+ons [big design and reuse problem -‐ exploited for automated reasoning and querying]
• Currently – a mass of heterogeneous data and ontologies, either expressed or
portable to RDF (DB liPing, rdf-‐ized sources, etc.) – with generally low quality in some quality dimension/aspect
10
5/9/11
6
11
city -‐ subClassOf -‐> country
What we can do with OWL
• ... (maybe) we can check the consistency, classify, and query all this knowledge
• this is great, but ... • ... remember the Scarlet example – City subClassOf Country
• Logical consistency is not the main problem – e.g. owl:sameAs can be wrongly used and s+ll we have consistency
• Why OWL is not enough?
12
5/9/11
7
When to use owl:Individual, owl:Class, owl:ObjectProperty, owl:DatatypeProperty?
• OWL gives us logical language constructs, but does not give us any guidelines on how to use them in order to solve our tasks.
• E.g. modeling something as an individual, a class, or an object property can be quite arbitrary
13
New problems arising on the Web...
• cf. Seman+c Web Interest Group post May 27th, 2008 by Zille Huma: "I have been wondering for some>me now that why isn't it a popular trend to store standard ac>vi>es of a domain in the ontology
and not only the concepts, e.g., for the tourism domain, ontologies normally contain concepts like Tourist, Resort, etc. but I have not so far come across an ontology that also contains the standard ac>vi>es like searchResort, bookHotel, etc. Why is it so? What support is provided in the ontology langauges to model the standard ac>vi>es of the domain as well?"
• (1) “searching resorts is a type of func+onality required for this kind of services” – owl:Class(searchResort) rdfs:subClassOf(Func+onality)
• (2) “a func+onality for searching resorts is implemented in our web service” – owl:Individual(searchResort) rdf:type(Func+onality)
• (3) “who has been searching for what resorts in our web service?” – owl:ObjectProperty(searchResort) rdfs:domain(Customer) rdfs:range(Resort)
• (4) “how many users have been using our resort searching func+onality?” – owl:DatatypeProperty(searchResort) rdfs:domain(Customer) rdfs:range(xsd:boolean)
14 14
5/9/11
8
Solu+ons? • ... OWL is not enough for building a good ontology,
and we cannot ask all web users either to learn logic, or to study ontology design
• Reusable solu+ons are described here as Ontology Design PaFerns, which help reducing arbitrariness without asking for sophis+cated skills ...
• ... provided that tools are built for any user "
A well-‐designed ontology ...
• Obeys to “capital ques+ons”: – What are we talking about? – Why do we want to talk about it? – Where to find reusable knowledge? – Do we have the resources to maintain it?
• Whats, whys and wheres cons+tute the Problem Space of an ontology project
• Ontology designers need to find solu+ons from a Solu>on Space
• Matching problems to solu+ons is not trivial
16
5/9/11
9
From the lessons learnt ...
• Small ontologies with explicit documenta+on of design ra>onales – components supported by specific func+onali+es • selec+on, matching, composi+on, etc.
– implemented in repositories, registries, catalogues, open discussion and evalua+on forums, and in new-‐genera+on ontology design tools • ontologydesignpaFern.org • ODP and Watson APIs • NeOn ODP Plugin • etc.
17
Ontology Design PaFerns An ontology design paJern is a reusable successful solu>on to a recurrent modeling problem
18
5/9/11
10
Logical Ontology Design PaFerns
Types of ODPs: Structural ODPs
5/9/11
11
Logical ODPs
• Defini>on • A Logical ODP is a formal expression, whose only parts are expressions from a logical vocabulary e.g., OWL DL, that solves a problem of expressivity • Logical ODPs are independent from a specific domain of interest – i.e. they are content-‐independent
Logical ODPs
• A Logical ODP describes a formal expression that can be exemplified, morphed, and instan>ated in order to solve a domain modelling issue
• owl:Class:_:x rdfs:subClassOf owl:Restric(on:_:y • Inflamma>on rdfs:subClassOf (localizedIn some BodyPart) • Coli>s rdfs:subClassOf (localizedIn some Colon) • John’s_coli>s localizedIn John’s_colon
5/9/11
12
Logical macros
• Logical macros provide a shortcut to model a recurrent intui+ve logical expression
• Example: • Formally: R some Thing and R only C • Things that R, R at least one thing that is only C • Carnivore animals eat only animals + Carnivore animals eat some (at least one) animals
Transforma+on Ontology Design PaFerns
5/9/11
13
N-‐ary rela+on
• Chad Smith was the drum player of Red Hot Chili Peppers when they recorded their album Stadium Arcadium from September 2004 to December 2005.
• A person plays a certain role in a band during an album recording, taking place during a certain +me interval
• PlaySitua+on(Person, MusicianRole, Band, Album, TimeInterval)
N-‐ary rela+on • PlaySituation hasKey[playsRole, forAlbum, inBand,
recordingTime, personPlaying]!
5/9/11
14
Let’s remove the domain • NaryRelation hasKey[relation1, relation2,
relation3, relation4]!
Transi+ve Reduc+on
• I want to represent that a car is composed of several parts – part of – transi+ve property
• I also want to represent that each part can have “direct” components – e.g. the turbine is a component of the engine
• The turbine is a component of the engine, hence it is part of the car, but not its “direct” component
5/9/11
15
Direct components in a car
partOf
partOf partOf
Transi+ve reduc+on
aProperty rdf:type owl:Transi+veProperty anotherProperty rdfs:subPropertyOf aProperty anotherProperty does not inherit transi>vity, but: en+ty1 anotherProperty en+ty2 implies en+ty1 aProperty en+ty2
16
5/9/11
16
Exhaus+ve par++on
• A class with a number of sub-‐classes, all disjoint with each other – its individuals can belong only to one of its sub-‐classes
– it is equivalent to the union of its subclasses • The “BeFer Cars” sells only three products: cars, motorcycles and dolls.
Exhaus+ve par++on: meta-‐level descrip+on
• Sibling par++on classes are disjoint with each other • Exhaus+vePar++onClass is the union of its Par++onClass
5/9/11
17
Transforma+on ODPs
• N-‐ary rela+on – Allows to represent rela+ons with more than two arguments
• Transi+ve reduc+on – Allows to create transi+ve closure over one or more non-‐transi+ve
property • Exhaus+ve par++on
– Allows to represent classes that have a set of disjoint subclasses cons+tu+ng a complete par++on of the class
Types of ODPs
5/9/11
18
Content ODPs
Content ODPs (CPs) 1/3
• CPs encode conceptual, rather than logical design paFerns. – Logical ODPs solve design problems independently of a par+cular conceptualiza+on
– CPs are paFerns for solving design problems for the domain classes and proper+es that populate an ontology, therefore they address content problems
36
5/9/11
19
Content ODPs (CPs) 2/3
• CPs are instan+a+ons of Logical ODPs (or of composi+ons of Logical ODPs), featuring a non-‐empty signature – Hence, they have an explicit non-‐logical vocabulary for a specific domain of interest, i.e. they are content-‐dependent
Content ODPs (CPs) 3/3
• Modeling problems solved by CPs have two components: domain and requirements. – A same domain can have many requirements (e.g. different scenarios in a clinical informa+on context)
– A same requirement can be found in different domains (e.g. different domains with a same “expert finding” scenario)
• A typical way of capturing requirements is by means of competency ques+ons
38
5/9/11
20
Catalogues of CPs 1/2
• Content ODPs are collected and described in catalogues and comply to a common presenta+on template
• The ontologydesignpaFerns.org ini+a+ve maintains a repository of CPs and a seman+c wiki for their descrip+on, discussion, evalua+on, cer+fica+on, etc.
Catalogues of CPs 2/2
5/9/11
21
Pragma+c characteris+cs of CPs • Domain-‐dependent
– Expressed with a domain-‐specific (non-‐logical) vocabulary • Requirement-‐covering
– Solve domain modeling problems (expressible as use-‐cases, tasks or “competency ques+ons”), at a typical maximum size (cf. blink)
• Reasoning-‐relevant components – Allow some form of inference (minimal axioma+za+on, e.g. not an isolated
class) • Cogni+vely-‐relevant components
– Catch relevant core no+ons of a domain and the related exper+se -‐-‐ blink knowledge
• Linguis+cally-‐relevant components – Are lexically grounded, e.g. they match linguis+c frames, or at least a domain
terminology • Examples:
– PartOf, Par+cipa+on, Plan, Legal Norm, Legal Fact, Sales Order, Research Topic, Legal Contract, Inflamma+on, Medical Guideline, Gene Ontology Top, Situa+on, TimeInterval, etc.
Generic ontology requirements Generic Competency Questions! Specific Modelling Use Case!
Who does what, when and where? Production reports, schedules Which objects take part in a certain event? Resource allocation, biochemical pathways
What are the parts of something? Component schemas, warehouse management What’s an object made of? Drug and food composition, e.g. for safety (comp.)
What’s the place of something? Geographic systems, resource allocation What’s the time frame of something? Dynamic knowledge bases
What technique, method, practice is being used? Instructions, enterprise know-how database Which tasks should be executed in order to achieve a certain goal? Planning, workflow management
Does this behaviour conform to a certain rule? Control systems, legal reasoning services
What’s the function of that artifact? System description How is that object built? Control systems, quality check
What’s the design of that artifact? Project assistants, catalogues How did that phenomenon happen? Diagnostic systems, physical models What’s your role in that transaction? Activity diagrams, planning, organizational models
What that information is about? How is it realized? Information and content modelling, computational models, subject directories
What argumentation model are you adopting for negotiating an agreement?
Cooperation systems
What’s the degree of confidence that you give to this axiom? Ontology engineering tools
5/9/11
22
Examples of CPs
Content PaFern (generic TBox)
Content PaFern (specific TBox)
Examples of CPs
5/9/11
23
Opera+ons
• CP crea+on and reuse relies on a set of opera+ons: – Import – specializa+on – composi+on
45
Sample Specializa+on
• A content paFern CP2 specializes CP1 if at least one ontology element of CP2 is subsumed by an ontology element of CP1 – i.e., either by rdfs:subClassOf or rdfs:subPropertyOf
46
5/9/11
24
Composi+on • The composi+on opera+on relates two CPs and results into a new
ontology
• The resul+ng ontology is composed of the union of the ontology elements and axioms from the two CPs, plus the axioms (e.g. disjointness, equivalence, etc.) that are added in order to link the CPs
• The composi+on of CP1 and CP2 consists of crea+ng a seman+c associa+on between CP1 and CP2 by adding at least one new axiom, which involves ontology elements from both CP1 and CP2
• Typically, also new elements (“expansion”) are added when composing
47
Sample composi+on
48
The resul+ng ontology is composed of the union of the ontology elements and axioms from the two CPs, plus the axioms (e.g. disjointness, equivalence, etc.) that are added in order to link the CPs
5/9/11
25
General Content ODPs
General Content ODPs
• Classifica+on – Roles of objects
• Containment – Part-‐whole rela+onships – Membership
• Informa+on and its realiza+ons • Time and Places • Situa+on • Descrip+on
5/9/11
26
Roles of objects
• Objects can play different roles in different situa+ons
• Depending on the constraints given by the requirements, modeling of objects and their roles can be addressed differently
• Do we want to represent proper+es of roles? • Do we want to classify objects based on their roles?
• Do we want to assert facts about roles?
Roles of objects
• A beer mug used as vase • Books used as table’s legs • A sax player (person) • A song writer (person)
5/9/11
27
Roles as classes
Roles as classes
• An object and its roles are related through the rdf:type property
• rdf:type rela+ons can be either asserted or inferred through classifica+on
• In order to automa+cally classify individuals in a certain class the ontology has to define appropriate axioms
5/9/11
28
Roles as classes • Consequences
– Low expressivity – Roles are described at TBox level – Class taxonomy is bigger -‐ a class for each role – Class taxonomy is entangled -‐ mul+-‐typing – ABox is smaller – same individual, several (role) types – Automa+c classifica+on of individuals through rdfs:subClassOf
inheritance – with proper axioms – Roles cannot be indexed in terms of space and +me – Facts about roles cannot be expressed e.g. “Roles in UniBo can be
student, professor, researcher”, “Valen+na is teacher for KMDM course”
– Queries: ?x a SongWriter!• General CQs
– What objects have a (role) type?
Roles as individuals
5/9/11
29
Roles as individuals
• An object and its roles are related through domain-‐specific rela+ons
• Rela+ons between an object and its roles have to be asserted
• Automa+c inference of rela+ons between an object and its roles can be obtained through property sub-‐sump+on
Roles as individuals • Consequences
– Expressivity is improved – Roles are described at ABox level – Class taxonomy is smaller – roles are individuals – Abox is bigger – Facts on roles can be asserted – Roles can be indexed in terms of +me and space -‐ through n-‐ary rela+ons – N-‐ary rela+ons are needed for rela+ng an object to its role with respect to
some other object e.g. Valen+na is teacher for KMDM course • kmdm_teacher involvesPerson Valen+na • kmdm_teacher involvesRole teacher • kmdm_teacher involvesCourse KMDM • Valen+na hasRole teacher
– Roles do not type objects, no automa+c classifica+on of objects – Queries: ?x hasRole ?y ; ?x a Role !
• General CQs – What roles has an object? What objects have a role?
5/9/11
30
Roles as proper+es
Roles as proper+es
• The seman+cs of “having a role” is embedded in the name of a property
• Typically proper+es conveying a role informa+on are verbs
• Objects are not explicitly related to their roles, they are related to other things through a property expressing an ac+on they perform, a role they play
• Most common paFern in the web of data for modeling roles
5/9/11
31
Roles as proper+es • Consequences
– Smaller taxonomy of classes – Bigger taxonomy of proper+es – a property for each role – Simpler graph of data – one triple for “Valen+na is teacher for KMDM course” • Valentina teaches KMDM!
– Roles cannot be indexed in terms of space and +me – Seman+cs of roles is implicit (embedded in a property name) – Facts about roles cannot be expressed – Queries: ?x teaches ?y
• General CQs – Who did something?
Roles of objects
• The three solu+ons differ in expressivity, simplicity, and CQs – Simplest is roles as proper+es – Most expressive is roles as individuals – Least expressive is roles as classes
• Each of them has pros and cons • The choice depends on requirements • What about combining them?
5/9/11
32
Combining roles as instances with roles as classes
• A class Role • A class for each Role e.g. SaxPlayer • A property restric+on on classes represen+ng roles, for automa+c classifica+on
Combining roles as instances with roles as classes
• In this example John_Coltrane is a Person • He has the role of sax_player • The property restric+on on SaxPlayer allows to classify John_Coltrane as a SaxPlayer
5/9/11
33
…and add roles as proper+es
• Note the restric+on on property writerOf
Indexing roles in terms of +me and space
5/9/11
34
Indexing roles in terms of +me and space
Content ODPs for roles of objects
• Object-‐Role – OWL paFern represen+ng roles as individuals – hFp://ontologydesignpaFerns.org/cp/owl/dul/objectrole.owl
• Classes as roles – Sample paFern (template) represen+ng roles as classes
– hFp://ontologydesignpaFerns.org/cp/owl/classesasrole.owl
• Time-‐place-‐indexed-‐object-‐role – N-‐ary rela+on represen+ng an objects, the roles it plays at a certain date in a certain place
– hFp://www.ontologydesignpaFerns.org/cp/owl/dul/+meplaceindexedobjectrole.owl
5/9/11
35
Object classifica+on • The object-‐role rela+on can be generalized • An object is classified by a concept
– Project hasStatus Status • IKS hasStatus ac+ve
– Person hasRole Role • John_Coltrane hasRole sax_player
– Object hasType Type • MacBookPro hasType laptop
– Color hasParameter Parameter • Black hasParameter posi+ve
– Document hasTopic Topic • hFp://en.wikipedia.org/wiki/Paris hasTopic hFp://dbpedia.org/resource/Paris
– Ac+on addresses Task • email_to_partners addresses mee+ng_no+fica+on
Object classifica+on
• The discussion on modeling objects and their roles holds for any classifica+on rela+on
• The general paFern is called “classifica+on”
5/9/11
36
Parthood • Objects can have different parts • Parthood rela+on is intui+vely similar to set inclusion • The parthood rela+on is
– Reflexive ex:obj1 partOf ex:obj1
– An+-‐symmetric ex:obj1 partOf ex:obj2 ∧
ex:obj2 part of ex:obj1 ex:obj1 owl:sameAs ex:obj2
– Transi+ve ex:obj1 partOf ex:obj2 ∧ ex:obj2 part of ex:obj3 ex:obj1 partOf ex:obj3
Parthood modeling
• Depending on the constraints given by the requirements, modeling of objects and their parts can be addressed differently
• Do we want to dis+nguish parts of an object at different points in +me?
• Do we want to dis+nguish parts of a whole from its direct parts?
5/9/11
37
Parthood examples
• The CPU is part of the motherboard • The motherboard is part of the computer
partOf
partOf
partOf
Parthood examples
• The CPU is part of the matherboard • The matherboard is part of the computer
partOf Time 1
partOf
Time 2
5/9/11
38
Parthood examples
• The CPU is direct part of the motherboard • The motherboard is part of the computer
directPartOf
partOf
partOf
directPartOf
Part of • Note that reflexivity and an+-‐symmetry are not modeled • An+-‐symmetry is not representable in OWL • Reflexivity would cause the materializa+on of numerous
somehow redundant triples, possibly not desirable in LOD – it can be easily added as local axiom
5/9/11
39
Direct part
• directPartOf does not inherit transi+vity • directPartOf implies part of
Time-‐indexed parthood • We need an n-‐ary rela+on • Transi+vity for +me-‐indexed parthood is not expressible in OWL • The range of datatype proper+es is not set, it depends on local
needs – Datatypes are all disjoint with each other e.g. xsd:date owl:disjointWith xsd:gYear
5/9/11
40
Time indexed parthood
• …and if we want to have +me intervals in our domain of discourse?
Time Interval
• hasDate allows us to set any date within the +me interval
• The range of the datatype proper+es is set locally
5/9/11
41
Time indexed parthood with +me intervals
Membership
• Objects can belong to a collec>on of objects • Membership is similar the no+on of set membership
• The membership rela+on is not transi+ve – if an object O belongs to a collec+on C, which in turn belongs to a collec+on D, O is not said to belong to D
• The membership rela+on chained with the parthood rela+on implies parthood – if an object O belongs to a collec+on C, which in turn is part of a collec+on D, O belongs to D
5/9/11
42
Membership modeling
• Depending on the constraints given by the requirements, modeling of collec+ons and their members can be addressed differently
• Do we want to iden+fy members of a collec+on at a certain point in +me?
Membership examples
memberOf
memberOf memberOf
5/9/11
43
Membership examples
memberOf memberOf
memberOf
Membership examples
memberOf
memberOf
partOf
5/9/11
44
Membership examples
memberOf memberOf From 2006
From 1997
Membership
• Note the property chain of memberOf and partOf that implies memberOf
5/9/11
45
Time indexed membership
• Analogously to parthood, we can have the variant with +me intervals
Containment • Parthood and membership can be generalized as containment rela+ons • Containment rela+on represents a general cogni+ve schema • A containment schema involves a physical or metaphorical
– boundary – enclosed area or volume, or – excluded area or volume
• A containment schema can have addi+onal op+onal proper+es, such as – transi+vity of enclosure (whereby if one object is enclosed by a second, and
that by a third, the first is also enclosed by the third) – objects inside or outside the boundary – protectedness of an enclosed object – the restric+on of forces inside the enclosure, and – the rela+vely fixed posi+on of an enclosed object
• We model containment as a general transi+ve rela+on between objects
5/9/11
46
Containment • Time indexed containment and +me indexed con+anment
with +me intervals are analogous to the previous ones (+me indexed membership and parthood with/without +me intervals).
• .
Informa+on objects and their realiza+ons
• An informa+on object is a piece of informa+on independently from how it is concretely realized
• Examples of informa+on objects are musical composi+ons, texts, words, pictures, etc.
• An informa+on realiza+on is a concrete realiza+on of an Informa+on object
• Examples of informa+on realiza+on are the wriFen document containing the text of a law, an mp3 file, etc.
• The dis+nc+on between informa+on objects and their realiza+ons is a key requirements in copyright management
5/9/11
47
Modeling Informa+on Objects
• Depending on the constraints given by the requirements, modeling informa+on objects and their realiza+ons can be addressed differently
• Do we want to temporarily index the realiza+on of an informa+on object?
• Do we want to spa+ally index the realiza+on of an informa+on object?
Example of informa+on objects and their realiza+ons
L’inferno della divina commedia di
Dante
isRealizedBy
isRealizedBy
5/9/11
48
Examples of informa+on objects and their realiza+ons
• Pictures of a party are realized in JPG files
Examples of informa+on objects and their realiza+ons
• The realiza+ons of pictures of the party are available on my laptop at the moment I download the aFachments to this email
5/9/11
49
Informa+on Realiza+on
Time and Place indexed informa+on realiza+on
5/9/11
50
Situa+on
• A general vocabulary for n-‐ary rela+ons • Situa+on is able to represent reified n-‐ary rela+ons, by defining a top-‐level rela+on for all binary projec+ons of the n-‐ary rela+on
• A way somebody conceives a state of affairs, a set of things, a fact
• All +me indexed (and place indexed) paFerns we have seen so far are (in principle) subclass of Situa+on
Situa+on
5/9/11
51
Descrip+on
• A Descrip+on is represents a conceptualiza+on • It can be thought also as a 'descrip+ve context' • It uses or defines concepts in order to create a view on a 'rela+onal context' (Situa+on) out of a set of data or observa+ons
• Examples of descrip+ons are: – a Plan of some ac+ons to be executed by agents in a certain way, with certain parameters;
– a Diagnosis that provides an interpreta+on for a set of observed en++es
Descrip+on
5/9/11
52
Descrip+on example
Descrip+on and Situa+on
• A situa+on is a view, consistent with ('sa+sfying') a descrip+on, on a set of en++es.
5/9/11
53
Example of descrip+on and situa+on
• A workflow is a descrip+on, its execu+on is a situa+on sa+sfying it
top related