Download presentation
Presentation is loading. Please wait.
1
Linking Background Information
MLG Appendix 8.6 Linking Background Information (Focus on basic linking: Alignment Ontologies & Linking Data Sets)
2
Contents W3C Linked Data (LD)/Semantic Web (SW) Approach Basic Linking
Linking Background Information Contents W3C Linked Data (LD)/Semantic Web (SW) Approach Basic Linking More Background Info on L1/L2/L3 levels Advanced Linking Issues
3
W3C Linked Data (LD)/Semantic Web (SW) approach 5 Stars
Linking Background Information W3C Linked Data (LD)/Semantic Web (SW) approach 5 Stars Linked with others (Aligned data, converted data) W3C open Standards (HTTP, URI, RDF, RDFS, OWL2, Turtle, Open Standards (EXPRESS, SPFF, XSD, XML, CSV) Machine processable (Excel, REVIT) Available in the cloud (potentially limited by security model)
4
W3C Linked Data (LD)/Semantic Web (SW) approach Basic Assumptions
Linking Background Information W3C Linked Data (LD)/Semantic Web (SW) approach Basic Assumptions A general “RDF/RDFS/OWL dataset” can be an Ontology or a Data Set (of individuals) or a Link Set For Link Sets we distinguish: ‘Linking Rule Sets (LRS)’ containing ontology/class-level links Alignment Ontologies (AO) for Data Alignment (‘Basic Linking’) Conversion Rule Sets (CRS) for Data Conversion (‘Basic Linking’ and/or ‘Advanced Linking’ involving Rules’) ‘Linking Data Sets (LDS)’ containing data/individual-level links only (‘Basic Linking’) Both LRSs & LDSs are, ideally, just like the RDF/RDFS/OWL data sets to be linked, RDF/RDFS/OWL Data Sets themselves Typically however, RDF/RDFS/OWL-power is not enough for CRS Other (rule) languages are needed like SPIN, SWRL, N3, RIF, … We will only discuss Basic Linking here (RDF/RDFS/OWL-based)
5
Exact Choices for V-Con
Ontology Linking Rule Set (LRS) Basic (/OWA) RDF/RDFS/OWL2 == Alignment Ontology (AO) RDFS/OWL SUBSET: rdfs:subClassOf (unidirectional) rdfs:subPropertyOf (unidirectional) owl:equivalentClass (bidirectional) owl:equivalentProperty (bidirectional) owl:sameAs (bidirectional) Advanced (/CWA) SPIN (constraint subset) (incl. SPARQL Ask queries) or SHACL == Conversion Rule Set (CRS) RDFS/OWL-RL+ SPIN (unidirectional rule subset) (incl. SPARQL Construct queries) * V-Con Test Scenarios * In that case AO plays ‘Basic Conversion Rule Set’ role (the actual situation in the V-Con Test Scenarios) Sweden experiments only Mix (in 1 file) or import (both as CWA), or Generate SPIN/SHACL (CWA) Linking Background Information
6
Basic Linking: Four relevant dimensions
Linking Background Information Basic Linking: Four relevant dimensions Three key Meta concepts: Classes (owl:Class) Properties (owl:DatatypeProperty or owl:ObjectProperty) Individuals (owl:NamedIndividual) 12 “Venn situations” representing intended semantics 5 for Classes, same 5 for Properties, 2 others involving individuals Three Semantic Levels for classes Asserted versus Inferred data
7
Basic Linking: Assume …
Linking Background Information Basic Linking: Assume … 2 ontologies: x and y Where x, y are prefixes for their name space URIs asserted or inferred 1 Class A in ontology x > x:A 1 Class B in ontology y > y:B 1 Property in ontology x > x:c 1 Property in ontology y > y:d 1 Individual in ontology x > x:a of type x:A 1 Individual in ontology y > y:b of type y:B Classes represented by circles, Individuals represented by dots in the next three figures
8
Basic Linking: 5 Venn situations for classes
Linking Background Information Basic Linking: 5 Venn situations for classes The “default”, unconstrained situation. Independent classes, no linking rules relevant 1. 2. 3. 4. 5. • • • • • • • • • x:A rdfs:subClassOf y:B • • • • • y:B rdfs:subClassOf x:A 2. AND 3. x:A owl:EquivalentClass y:B (symmetric) • • • • • • • x:A owl:DisjointWith y:B (symmetric) • • • • • •
9
Basic Linking: 5 Venn situations for properties
Linking Background Information Basic Linking: 5 Venn situations for properties • 1. 2. 3. 4. 5. • • The “default”, unconstrained. Independent properties, no mapping rule (any area CAN also be empty) • • • • • • x:c rdfs:subPropertyOf y:d • • • • • y:d rdfs:subPropertyOf x:c 2. AND 3. x:A owl:EquivalentProperty y:B (symmetric) • • • • • • • • • • x:c owl:propertyDisjointWith y:d (symmetric) • •
10
Notes on Classes Declared Classes (rdf:type owl:Class), or
Linking Background Information Notes on Classes Declared Classes (rdf:type owl:Class), or Restriction Classes (rdf:type owl:RestrictionClass) Cardinalities (qualified or not) hasValue someValuesFrom / allValuesFrom
11
Basic Linking: 2 Venn situations for individuals
Linking Background Information Basic Linking: 2 Venn situations for individuals • • 1. 2. • • a • b x:a owl:sameAs y:b (symmetric) • • • • • • • a/b • x:a rdf:type y:B • • •
12
Basic Linking: Link Types represented in RDF/RDFS/OWL (#8)
Linking Background Information Basic Linking: Link Types represented in RDF/RDFS/OWL (#8) Class/Property level (in Alignment Ontology) x:A rdfs:subClassOf y:B (== y:B rdfs:subClassOf x:A) x:A owl:EquivalentClass y:B (syntactic sugar really) x:c rdfs:subPropertyOf y:d (==y:d rdfs:subPropertyOf x:c) x:A owl:EquivalentProperty y:B (syntactic sugar really) x:A owl:disjointWith y:B x:c owl:propertyDisjointWith y:d Individual level (in Alignment Ontology (reference individuals!) or Linking Data Set) x:a owl:sameAs y:b Individual <> class level x:a rdf:type y:B (== y:B rdf:type x:A) == means: same type of link
13
Basic Linking: Inference potential
Linking Background Information Basic Linking: Inference potential Depending on the semantic level of the classes in ontologies more or less can be inferred from assertions (available in ontologies, LRS, LDS and/or (individual) data sets) Standard OWL2 inferences (‘entailments regimes’ or ‘meta-rules’) apply Example meta-rule IF (x:a rdf:type x:A) AND (x:A rdfs:subClassOf y:B) THEN (x:a rdf:type y:B) Where “x:A rdfs:subClassOf y:B” would be an actual “Link”
14
Basic Linking: Two more meta-rule examples
Linking Background Information Basic Linking: Two more meta-rule examples IF (x:a rdf:type x:A) AND (x:A rdf:type owl:Class AND rdfs:subClassOf [ a owl:Restriction ; owl:hasValue ? ; owl:onProperty x:c ] .) THEN (x:a x:c ?) IF (x:a rdf:type x:A) AND (y:b rdf:type y:B) AND (x:a owl:sameAs y:b) AND (x:a x:c x:z) THEN (y:b x:c x:z)
15
Basic Linking: 3 Semantic Levels for Classes
Linking Background Information Basic Linking: 3 Semantic Levels for Classes L1: Class without restrictions (the class is just ‘declared’) L2: Class with only “necessary” Restrictions L3: Class with “necessary & sufficient“ (n&s) Restrictions An ontology can have a mix of 1/2/3-type classes An ontology can be “semantically complete”, having only L3 classes In practice an ontology is typically a mix of many L1s, some L2s and often no L3s, i.e. “semantically not that strong”
16
Basic Linking: Nine resulting (bi-directional) linking situations
Linking Background Information Basic Linking: Nine resulting (bi-directional) linking situations We distinguish the following 9 situations for classes in ontology x and y: Situation 1: L1/L1: worst case (but often encountered in practice) Situation 9: L3/L3: best case (but very unlikely) L3 often not needed/relevant rdf:type’s are often asserted, so no automatic classification is required Links are often asserted, so automatic linking not required So we can simplify to … x/y L1 L2 L3 Situation 1 Situation 2 Situation 5 Situation 3 Situation 4 Situation 7 Situation 6 Situation 8 Situation 9
17
Basic Linking: Four most relevant linking situations
Linking Background Information Basic Linking: Four most relevant linking situations We will now analyse a simple example and show for each of the four situations what can be inferred (for a given intended linking) x/y L1 L2 Situation 1 Situation 2 Situation 3 Situation 4
18
Example: legenda Class Property Individual
Linking Background Information Example: legenda Class Property Individual
19
Example: Graphically (both classes are L1)
Linking Background Information Example: Graphically (both classes are L1) owl:equivalentProperty x:Red Car y:Car x:colour y:color Classes/ Properties rdfs:subClassOf rdf:type rdf:type x:MyRed Car y:My Car Individuals owl:sameAs x ontology y ontology LRS
20
This knowledge becomes part of the LRS
Linking Background Information Example: Intended linking between x and y classes/properties in Venn-diagram x:RedCar is a subclass of y:Car . x:colour is equivalent property for y:color . This knowledge becomes part of the LRS
21
Example: Situation 1: L1/L1 (full correspondence to diagram)
Linking Background Information Example: Situation 1: L1/L1 (full correspondence to diagram) Ontology x asserts: x:RedCar rdf:type owl:Class . x:colour rdf:type owl:DatatypeProperty ; rdfs:range xsd:string . Ontology y asserts: y:Car rdf:type owl:Class . y:color rdf:type owl:DatatypeProperty ; LRS asserts: x:RedCar rdfs:subClassOf y:Car . x:colour owl:equivalentProperty y:color .
22
Example: Situation 1: L1/L1 - What can be inferred?
Linking Background Information Example: Situation 1: L1/L1 - What can be inferred? In case we first extra assert x:MyRedCar rdf:type x:RedCar . we can infer: x:MyRedCar rdf:type y:Car . In case we next extra assert x:MyRedCar x:colour “red”^^xsd:string . we can extra infer: x:MyRedCar y:color “red”^^xsd:string . In case we next extra assert: y:MyCar rd:type y:Car . x:MyRedCar owl:sameAs y:MyCar . * y:MyCar x:colour “red”^^xsd:string . y:MyCar y:color “red”^^xsd:string . In case we first extra assert y:MyCar rdf:type y:Car . (we cannot infer: y:MyCar rdf:type x:RedCar .) In case we next extra assert y:MyCar y:color “red”^^xsd:string . we can extra infer: x:MyCar x:colour “red”^^xsd:string . In case we next extra assert: x:MyRedCar rdf:type x:RedCar . y:MyCar owl:sameAs x:MyRedCar . * x:MyRedCar y:color “red”^^xsd:string . x:MyRedCar x:colour “red”^^xsd:string . * In Linking Data Set
23
Example: Situation 2: L1/L2 – ontology y gets smarter (L2)
Linking Background Information Example: Situation 2: L1/L2 – ontology y gets smarter (L2) Since y:Car has no restriction wrt the relevant property y:color this class is already L2 wrt this property I.e. ontology y cannot be made ‘smarter’ wrt this property So the situation is the same as Situation 1 Same inferences as in Situation 1
24
Example: Situation 3: L2/L1 - ontology x gets smarter (L2)
Linking Background Information Example: Situation 3: L2/L1 - ontology x gets smarter (L2) Ontology x asserts as extra in red: x:RedCar rdf:type owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:hasValue "red"^^xsd:string ; owl:onProperty x:colour ] . Ontology y stays the same (i.e. stays level L1)
25
Example: Situation 3: L2/L1 - What can be inferred?
Linking Background Information Example: Situation 3: L2/L1 - What can be inferred? In case we first extra assert x:MyRedCar rdf:type x:RedCar . we can infer: x:MyRedCar rdf:type y:Car . x:MyRedCar x:colour “red”^^xsd:string . x:MyRedCar y:color “red”^^xsd:string . In case we next extra assert: y:MyCar rd:type y:Car . x:MyRedCar owl:sameAs y:MyCar . * we can extra infer: y:MyCar x:colour “red”^^xsd:string . y:MyCar y:color “red”^^xsd:string . In case we first extra assert y:MyCar rdf:type y:Car . )we cannot infer: y:MyCar rdf:type x:RedCar .) In case we next extra assert y:MyCar y:color “red”^^xsd:string . we can extra infer: x:MyCar x:colour “red”^^xsd:string . In case we next extra assert: x:MyRedCar rdf:type x:RedCar . y:MyCar owl:sameAs x:MyRedCar . * x:MyRedCar y:color “red”^^xsd:string . x:MyRedCar x:colour “red”^^xsd:string . * In Linking Dat Set Which is consistent with the restriction…
26
Example: Situation 4: L2/L2 – Both x and y get smarter
Linking Background Information Example: Situation 4: L2/L2 – Both x and y get smarter Again, since y:Car has no restriction wrt the relevant property y:color this class is already L2 wrt this property I.e. ontology y cannot be made ‘smarter’ wrt this property So the situation is the same as Situation 3 Same inferences as in Situation 3
27
Basic Linking Observations
Linking Background Information Basic Linking Observations L1 level classes are most likely for existing/practical specifications When in control we can have the ambition/manage to make them L2 or even L3 On individual-level we can use owl:sameAs to compensate missing ‘L2-ness’ Class-level L2 gives more inferences then L1 in case the property has constrained values for that class (i.e. reflects a ‘necessary condition’) We can only exploit ‘L2-ness’ if the relevant properties are linked too (preferable via property equivalence, like in the example) We can define L2 variants of L1 classes in the Linking Ontology and make them equivalent to the originating L1 variants. This way we do not change the original ontology (typically under foreign authority) but provide our own interpretation/’more precise variant’ of it.
28
Example of adding knowledge to the LRS
Linking Background Information Example of adding knowledge to the LRS Ontology x asserts: x:RedCar rdf:type owl:Class . x:colour rdf:type owl:DatatypeProperty ; rdfs:range xsd:string . Ontology y asserts: y:Car rdf:type owl:Class . y:color rdf:type owl:DatatypeProperty ; LRS assert: l:RedCar rdf:type owl:Class ; l:RedCar owl:EquivalentClass x:RedCar ; rdfs:subClassOf [ a owl:Restriction ; owl:hasValue "red"^^xsd:string ; owl:onProperty x:colour ] . l:RedCar rdfs:subClassOf y:Car . x:colour owl:equivalentProperty y:color .
29
One more Linking Example Source ontology (s)
Linking Background Information One more Linking Example Source ontology (s) s:Vegetation rdf:type owl:Class . s:height rdf:type owl:DatatypeProperty ; rdfs:range xsd:float . -- relevant for linking case s:kind rdf:type owl:ObjectProperty ; rdfs:range s:kindType . s:KindType rdf:type owl:Class. s:HedgeLike rdf:type s:SoortType .
30
One more Linking Example Target ontology (t)
Linking Background Information One more Linking Example Target ontology (t) t:Hedge rdf:type owl:Class . t:maintainer rdf:type owl:DatatypeProperty ; rdfs:range xsd:string . -- relevant for linking case
31
Create an LRS/LDS (ontology) l Import s and t
Linking Background Information How to do it the OWL way? Create an LRS/LDS (ontology) l Import s and t Enrich s and/or t where needed Make all ‘semantic intentions’ explicit Link s to t in l Use a Reasoner to convert or link s data to t data or vice versa using s, l & t
32
Schematic 1. s ontology l LRS t ontology import import 2. 2.
Linking Background Information Schematic 1. s ontology l LRS t ontology import import 2. 2. 3. and/or 4. s data rdf:type l LDS rdf:type t data rdf:type 5.
33
Linking Example 3./4. t:Hedge owl:equivalentClass [
Linking Background Information Linking Example 3./4. t:Hedge owl:equivalentClass [ rdf:type owl:Class ; owl:intersectionOf ( s:Vegetation [a owl:Restriction ; owl:onProperty s:kind ; owl:hasValue s:HedgeLike ] ) ] .
34
Linking Example Use a Reasoner to convert s data to t data using l
Linking Background Information Linking Example Use a Reasoner to convert s data to t data using l Assume data in s :Vegetation_1 rdf:type :Vegetation ; :soort s:HedgeLike . What can we now infer by reasoner? Can we infer (using l)?: s:Vegetation_1 rdf:type t:Hedge . Yes!, (and the other way round too) (TopBraid Composer, SwiftOWLIM reasoner)
35
Schematic Black: asserted Red: inferred
Linking Background Information Schematic s:Vegetation rdf:type owl:Class . s:height rdf:type owl:DatatypeProperty ; rdfs:range xsd:float . s:kind rdf:type owl:ObjectProperty ; rdfs:range s:KindType . s:KIndType rdf:type owl:Class . s:HedgeLike rdf:type s:KIndType . t:Hedge owl:equivalentClass [ rdf:type owl:Class ; owl:intersectionOf ( s:Vegetation [a owl:Restriction ; owl:onProperty s:kind ; cmo:hasValue s:HedgeLike ] ) ] . t:Hedge rdf:type owl:Class . t:maintainer rdf:type owl:DatatypeProperty ; rdfs:range xsd:string . s:Vegetation_1 rdf:type s:Vegetation ; s:kind s:HedgeLike . s:Vegetation_1 rdf:type t:Hedge . t:Hedge_1 rdf:type s:Vegetation ; t:kind s:HedgeLike . t:Hedge_1 rdf:type t:Hedge . Black: asserted Red: inferred
36
Linking Example Use a Reasoner to link s data to t data using l
Linking Background Information Linking Example Use a Reasoner to link s data to t data using l Assume data in s2 :Vegetation_1 rdf:type s:Vegetation ; :height “2.0”^^xsd:float ; :kind s:HedgeLike . Assume data in t2 :Hedge_1 rdf:type t:Hedge ; :maintainer “Piet”^^xsd:string . Assume data in l2 s2:Vegetation_1 owl:sameAs t2:Hedge_1 . What can we now infer by reasoner? (TopBraid Composer, SwiftOWLIM reasoner)
37
Schematic Black: asserted Red: inferred
Linking Background Information Schematic s2:Vegetation rdf:type owl:Class . s2:height rdf:type owl:DatatypeProperty ; rdfs:range xsd:float . s2:kind rdf:type owl:ObjectProperty ; rdfs:range s2:KindType . s2:KindType rdf:type owl:Class . s2:HedgeLike rdf:type s2:KindType . t2:Hedge rdf:type owl:Class . t2:maintainer rdf:type owl:DatatypeProperty ; rdfs:range xsd:string . s2:Vegetation_1 rdf:type s2:Vegetation ; s2:kind s:HedgeLike ; s2:height “2.0^^xsd:float . t2:Hedge_1 rdf:type t2:Hedge ; t2:maintainer “Piet”^^xsd:string . s2:Vegetation_1 owl:sameAs t2:Hedge_1 . s2:Vegetation_1 t2:maintainer “Piet”^^xsd:string . t1:Hedge_1 s2:height “2.0”^^xsd:float . Black: asserted Red: inferred
38
More background info on L1/L2/L3 levels /1
Linking Background Information More background info on L1/L2/L3 levels /1 L1: The class is just declared L2: The class is declared and restrictions are added that indicate “necessary conditions” for one or more properties (can be a specific value or a range or complex combination, etc.) Example (having 2 such conditions): RoadSegment rdf:type owl:Class ; rdfs:subClassOf [ a owl:Restriction ; owl:hasValue "transport"^^xsd:string ; owl:onProperty :functionPerformed ] . owl:hasValue "vehicles"^^xsd:string ; owl:onProperty :applicationArea L3: Like L2 but now so many restrictions that this set of restrictions is sufficient to fully define the class. In other words: the class and the set of combined restrictions are equivalent. So when you encounter an individual in the real world and you can see/know that it has all the values for those properties (in general: ‘it satisfies all restrictions’) it is a member of that set defined by the restrictions and hence, because of the equivalence, a member of the class. In short: automatic classification becomes possible, you don’t have to assert anymore that MyRoadSegment rdf:type :RoadSegment.
39
More background info on L1/L2/L3 levels /2
Linking Background Information More background info on L1/L2/L3 levels /2 Also note that in case all classes were defined on L3-level we could in principle infer all rdfs:subClass relationships, including the ones linking one ontology to another! (in that sense, in that case, an asserted rdfs:subClass relationship is just a shorthand). In practice an ontology has a mix of L1, L2 and L3 level classes. Not many ontologies are only having L3 classes, the ideal semantic level. Clearly this level influences the capabilities to link different ontologies. In practice we will find typically L1-ontologies (coming from existing classifications, schemas like IFC, CityGML etc.) and maybe some of L2 (with defining properties).
40
More background info on L1/L2/L3 levels /3
Linking Background Information More background info on L1/L2/L3 levels /3 These semantic level considerations are essential in any modelling/linking endeavour and also influence the way we can use RDF/RDFS/OWL-based reasoners. Often, case L3 seems less relevant because often data is already typed/classified anyway. The difference in L1 <> L2 is more important because if some L2 info is not in the ontology we might have to add it to the linking to not loose knowledge and that means we have to define linking rules that go beyond RDF/RDFS/OWL-rules involving extra conditions on source or target side or make a specific interpretation explicit by introducing (equivalent) L2-variants of L1-classes.
41
Advanced Linking issues
Linking Background Information Advanced Linking issues In practice we see the need for more complex rules In general: all of the those supported by the OWL-RL variant, involving Intersections, unions Restriction classes (cardinalities, hasValue, all/someValuesFrom etc.) It seems handy to distinguish two Kind of LRS Alignment Ontologies (AOs), and Conversion Rule Sets, OWL-RL and beyond (OWL-DL, SPIN, ...) Even involving ‘calculations’ (via library functions etc.) CRSs might import AO (as basic CRS) Some Tools (like TBC) can convert OWL-RL based AO to SPIN (via SPIN Templates) to keep all conversion in SPIN
42
Special Issue: Classes <> Properties <> Individuals
Linking Background Information Special Issue: Classes <> Properties <> Individuals It is recommended to model represent ‘attributes’ the simple way as (datatype) properties There are however ontologies (like BIR COINS/CB-NL, RWS-OTL or Rioned’s GWSW (NL) that model ‘attributes’ as classes QUDTv2.0 represents quantitative attributes as individuals Since we want to interrelate such ontologies (for conversion and/or linking data) the issue arises of mapping "classes” to/from “properties“ to/and from individuals A small example is depicted in the next sheet
43
Special Issue: Example: Classes <> Properties
Linking Background Information Special Issue: Example: Classes <> Properties i.e. V-Con Common import import WidthTheClassWay.ttl Link.ttl WidthThePropertyWay.ttl owl:equivalentClass :Road :Width :Road cmo:hasAspect :hasWidth rdfs:range :Width :width :hasValue :Road_1 :hasWidth Width_1 :Width_1 hasValue “10”^^xsd:float How can we infer? :Road_1 :width “10”^^xsd:float .
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.