Presentation is loading. Please wait.

Presentation is loading. Please wait.

OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,

Similar presentations


Presentation on theme: "OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,"— Presentation transcript:

1 OWL – Part II

2 owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent, we do similarly as we did to make two classes equivalent (used rdfs:subclassOf ). Here, we use rdfs:subPropertyOf both ways or use owl:equivalentProperty  For example, make the folds and buckles properties equivalent: struc : foldsrdfs : subPropertyOf:buckles. struc : bucklesrdfs : subPropertyOfstruc:folds.  or, use owl:equivalentProperty : struc:foldsowl:equivalentPropertystruc : buckles. folds buckles owl:equivalentProperty

3 Example  The process of Shortening folds the Bedding structure  The above diagram infers that any triple using the ‘ folds ’ property, can use its equivalent ‘ buckles ’ property! struc:Shortening struc:foldsstruc:Bedding. struc:Shortening struc:bucklesstruc:Bedding.  Note that the equivalent property is a symmetric property owl:equivalentProperty rdf:type owl:symmetricProperty Shortening buckles folds Bedding equivalentProperty

4 Combining Properties  When we write procedures for example for a laboratory experiment or workflow management, or model a geological process, we commonly combine several types of properties, e.g., inverseOf, transitiveProperty, subPropertyOf  In such cases, some activities may depend on the completion of others  For example, making thin section may require several steps (the workflow of which is listed below), each of which may depend on the completion of others.   Thin section preparation workflow: Slice the rock specimen; square the slice into chip; polish the chip to fine grit; mount the chip to slide; cut and polish the section; and finally, mount the slide with cover slide

5 Thin section preparation Workflow Since these steps (see previous slide) are in order, each step enables the next step, and each next step depends on, or requires, the previous step: makeChipmountChippolishChippolishSection putCoverSlidesliceSpecimen dependsOn or requires Start: followFinish enable s or requiredFor

6 :dependsOnowl:inverseOf:enables :sliceSpecimen:enables:makeChip. :makeChip:enables:polishChip. :polishChip:enables:mountChip. :mountChip:enables:polishSection. :polishSection:enables:putCoverslide. :dependsOnrdfs:subPropertyOf:requires. :requiresrdf:typeowl:TransitiveProperty. :enablesrdfs:subPropertyOf:requiredFor. :requiredForrdf:typeowl:TransitiveProperty  From the above, we infer the following requirements for ‘mountChip’: :mountChip:requires :polishChip; :requires :makechip; :requires :sliceSpecimen. makeChipmountChippolishChippolishSection putCoverSlidesliceSpecimen dependsOn or requires enable s or requiredFor

7 OWL Class OWL allows constructing complex classes using restrictions of the properties of existing classes OWL also includes: owl:disjointWith owl:Thing owl:Nothing owl:equivalentClass owl:oneOf owl:intersectionOf owl:union owl:complementOf

8 Declaring classes in OWL An owl class is defined in two different long and short ways: Or in short hand, using the owl:Class constructor or

9 Owl uses the rdfs:subClassOf This is used to create a class hierarchy Note: rdfs:subClassOf is transitive Every owl class is a subclass of the owl:Thing

10 owl:disjointWith Two classes can be declared to be disjoint if they cannot have a common instance That is, if their intersection is empty For example: Solid and Liquid; Solid and Gas Inorganic and Organic Crystalline and Amorph Mineral and Gas, Mineral and Organic

11 Definition: Mineral is a naturally occurring, inorganic, solid, crystalline substance with definite chemical composition. We must allow inferring that Mineral be disjoint with amorph, artificial, gas, and organic substances!

12 Put the Artificial, Gas, and Organic classes here Mineral class

13 owl:Thing (Τ) and owl:Nothing (  ) OWL has two predefined classes: owl:Thing and owl:Nothing All individuals are members of the owl:Thing Owl:Thing is the top, most general class, and represents the universe, which means all individuals are its instances Owl:Nothing has no instance Because the intersection of two disjoint sets is empty, it is represented by the owl:Nothing

14 Intersection (п) of two disjoint classes, that subclass owl:Thing, is owl:Nothing

15 <rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Thing"/>

16 Set Equivalence (  ) by owl:equivalentClass  When we want to assert that two URIs refer to the same thing, we use owl:equivalentClass :XRDowl:equivalentClass:XRayDiffraction. struc:Jointowl:equivalentClassstruc:TensileFracture.  We can also make two classes to be equal if we make each a subclass of the other, for example, if we want to say that a joint is the same thing as a tensile fracture, we assert: struc:Jointrdfs:subClassOf struc:TensileFracture. struc:TensileFracture rdfs:subClassOf struc:Joint.

17 Inference for owl:equivalentClass A owl:equivalentClass B. x rdf:type A then x rdf:type B  Moreover, from the rdfs:subClassOf property we additionally infer that the two classes have the same members: A rdfs:subClassOf B. x rdf:type B. then x rdf:type A.  Notice that: owl:equivalentClassrdfs:type owl:SymmetricProperty. AB xx=y 

18 owl:oneOf  x 1,…, x n  The owl:oneOf construct allows defining a class by enumerating its member Enumeration is a list of options that a user can select from The list is usually exhaustive, like the list of planets, types of rock or minerals, or names of oceans

19 Sun hasPlanet SolarPlanet and SolarPlanet is the enumeration: {Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune} Example (code on next slide)

20 Declare each planet as an instance of the SolarPlanet Repeat this for all planets …

21 Individuals (instances, objects)  These are instances of physical or virtual types, i.e., same type individuals are members of the same class  Any individual belongs to the owl:Thing class  An individual can belong to one or more classes  Individuals may be assigned to a class as follows: Example:

22 Short form of class assignment  Alternatively, we can instantiate a class as: Example:  Or, use the rdf:ID  Or, do it using rdf:type as shown on next slide!  These statements assert that the ZagrosFault is a Thing, and Babaie is a (has type) Person

23 Instantiating an individual

24 Same Individuals ( owl:sameAs )  In many cases we want to assert that two individual things are actually the same  For example, two samples with different numbers may be the same, or two faults with different assigned names may be the same fault  e.g., Zagros Fault, Zagros shear zone, Zagros Crush zone, Zagros Thrust are the same geochem:sample1owl:sameAsstruc:sample22. tect:ZagrosFaultowl:sameAsstruc:ZagrosShearZone.

25 Inference  Notice that owl:sameAs is a symmetric property: owl:sameAsrdf:typeowl:SymmetricProperty. Therefore, we can infer that: struc:sample22owl:sameAsgeochem:sample1. struc:ZagrosShearZoneowl:sameAs tect:ZagrosFault.

26 owl:differentFrom Is used to declare that individuals are mutually different It uses owl:distinctMembers and rdf:parseType=“Collection” to represent an exhaustive list

27 Merging Different Databases with owl:sameAs  The owl:sameAs is very useful when merging data from different databases  For example, let’s assume that the following ‘ Sample ’ and ‘ Sampling ’ tables (next slide) are from two autonomous relational databases distributed on the Web  As we can see, some concepts are named differently in the two databases. We want to merge related data from the two tables  Recall that in a relational database, every row is a record of an individual  The Sample table has 6 rows and 6 columns, which means that we can extract 36 RDF triples from this table  The Sampling table has 6 rows and 8 columns, yielding 48 triples

28 IDSampleNumberPaleontAgeRockAbsoluteAge Researcher 1N100Basalt75 Ma Babaie 2N110MioceneLimestone Babaie 3N120MioceneLimestone Babaie 4N130Basalt73 Ma Babaie 5N140OligoceneShale Babaie 6N150Gabbro70 Ma Babaie petr: Sample Table, Petrology DB petr: SampleID1 petr: Sample_SampleNumber petr: Sample_PaleonAge petr: SampleID2 petr: Sample_AbsoluteAge petr: SampleID4

29 Make the RDF Triples from the RDB data  To make the triples, we use the namespace for each group (e.g., ‘ petr ’ for the petrology, and ‘ tect ’ for the tectonics domains)  Every cell of each table is a triple, with subject (individual corresponding to the row) designated with the namespace and table name attached to the id of the row, e.g., petr:SampleID1  The predicate for each triple is designated with the namespace and table name attached to field name for the corresponding cell petr:Sample_SampleNumber  The object is the content of the corresponding cell N100 RDF Triple: petr:SampleID1 petr:Sample_SampleNumber N100

30 Data from the Sample table: Triples for the top two rows are shown below petr : SampleID1petr : Sample_SampleNumber N100. petr : SampleID1petr : Sample_PaleontAge “”. petr : SampleID1petr : Sample_Rock Basalt. petr : SampleID1petr : Sample_AbsoluteAge75 Ma. petr : SampleID1petr : Sample_ResearcherBabaie. petr : SampleID2petr : Sample_SampleNumberN110. petr : SampleID2petr : Sample_PaleontAge“Miocene”. petr : SampleID2petr : Sample_RockLimestone. petr : SampleID2petr : Sample_AbsoluteAge “”. petr : SampleID2petr : Sample_ResearcherBabaie. … SPO

31 ID SampleNumberRegionSamplingDateProjectInvestigatorMapName IsotopicAge 1 N130Neyriz11/2/2007 Neyriz OphioliteBabaie Neyriz 1:24000 73 Ma 2 N150Neyriz11/6/2007 Neyriz OphioliteBabaie Neyriz 1:24000 70 Ma 3 N100Neyriz11/6/2007 Neyriz OphioliteBabaie Neyriz 1:24000 75 Ma 4 N120Neyriz11/3/2007 Neyriz OphioliteBabaie Neyriz 1:24000 5 N140Neyriz11/3/2007 Neyriz OphioliteBabaie Neyriz 1:24000 6 N110Neyriz11/5/2007 Neyriz OphioliteBabaie Neyriz 1:24000 tect: Sampling Table, Tectonics DB tect: SamplingID3 Tect:Sampling_SampleNumber

32 tect : SamplingID1tect : Sampling_SampleNumberN130. tect : SamplingID1 tect : Sampling_RegionNeyriz. tect : SamplingID1tect : Sampling_SamplingDate11/2/2007. tect : SamplingID1tect : Sampling_ProjectNeyriz Ophiolite. tect : SamplingID1tect : Sampling_InvestigatorBabaie. tect : SamplingID1tect : Sampling_MapName Neyriz1:24000. tect : SamplingID1tect : Sampling_IsotopicAge73 Ma. tect : SamplingID2tect : Sampling_SampleNumberN150. tect : SamplingID2tect : Sampling_RegionNeyriz. tect : SamplingID2tect : Sampling_SamplingDate11/6/2007. tect : SamplingID2tect : Sampling_ProjectNeyriz Ophiolite. tect : SamplingID2tect : Sampling_InvestigatorBabaie. tect : SamplingID2tect : Sampling_MapNameNeyriz 1:24000. tect : SamplingID2tect : Sampling_IsotopicAge70 Ma. Data from the Sampling table: Triples for the top two rows are shown below SPO

33 Mapping the Databases  We need to map the two tables to each other using some of the rdfs and owl constructs if we want to run a federated query on the two tables  Because the records (rows) in each table are actually individual data, we use the owl:sameAs to assert that some individuals are the same  Notice that sample number 130 is in the 4 th row for the Sample table, but is in the 1 st row of the Sampling table (same situation for other samples)  Assume that sample 130 in both tables are the same sample

34 The merging assertions: petr : SampleID1owl : sameAs tect : SamplingID3. petr : SampleID2 owl : sameAs tect : SamplingID6. petr : SampleID3 owl : sameAs tect : SamplingID4. petr : SampleID4 owl : sameAs tect : SamplingID1. petr : SampleID5 owl : sameAs tect : SamplingID5. petr : SampleID6 owl : sameAs tect : SamplingID2.

35 Boolean class constructors OWL provides Boolean constructors such as owl:intersectionOf, owl:unionOf, and owl:complementOf to allow modeling complex knowledge These constructors, respectively, represent logical and ( , conjunction) or ( , disjunction) not ( , negation) The purpose of these constructors is to combine simple classes into more complex classes with increased expressivity

36 owl:intersectionOf (A∩B) The class defined by the intersection of two classes contains instances of both classes

37 Owl:unionOf (A  B) The class defined by the union of two classes has instances of either or both classes

38 owl:complementOf (~A) The complement of a class contains no instance of the class For example, the complement of Fault contains instances of Cat, Fruit, hamburger, and River, but no member of the Fault class Even though this looks correct, but it is not! Because the instances of the Land class can include parmesan cheese and apple (not to mention air and mustard)!

39 Combination of Boolean constructors A better definition of the Land class may, for example, be defined by first defining a class (e.g., SolidGround) that annotates all land features, such as continents, islands, and then declare Land at the intersection of the SolidGround class and the complement of the BodyOfWater class i.e., it should not be body of water but be solid ground. See next slide! NOTE: In such cases we use the owl:intersectionOf and owl:unionOf constructors with the owl:subClassOf for the case of owl:complementOf

40 definition here …

41 owl.disjointUnionOf  OWL 2 DL’s owl.disjointUnionOf defines a class as the union of other classes, all of which are pairwise disjoint  It is a shorthand for separate axioms making the classes pairwise disjoint and one setting up the union class  For example, we can define Mesozoic as the owl:disjointUnionOf Triassic, Jurassic, and Cretaceous: </owl.Class

42 owl:AlldisjointClasses OWL 2 also defines the owl:AlldisjointClasses to collectively define a set of classes as mutually disjoint Use the owl:members and rdf:parseType=“Collection”

43 Other alternative ways  We can also use OWL 1 and mutually define the Triassic, Jurassic, and Cretaceous periods as disjoint, with the owl:disjointWith for example We can also define the Cretaceous, Jurassic, and Triassic classes as disjoint, and then find the union of these disjoint sets (see owl code below), which is equivalent to the owl 2.0 owl:disjointUnionOf shortcut

44 Example: Laramide Orogeny The Laramide orogeny in Montana and Wyoming occurred during the Late Cretaceous and Eocene (i.e., some processes occurred in either Cretaceous or Eocene, which are disjoint) The two periods have no intersection! Let’s define time:LateCretaceousEocene (may be defined in the Time ontology) using the owl.disjointUnion, that occurred either in Cretaceous or in Eocene, but not in their intersection (i.e., A xor B) AxorB: Exclusive disjunction or exclusive or: One or the other, but not both (red is true in the image, and is false if neither or both are true)

45 N3 Code for Laramide Orogeny owl:disjointUnionOf (:LateCretaceousEocene :Cretaceous :Eocene).  Assuming that we have the LateCretaceousEocene class: tect:LaramideOrogeny rdf : type tect:Orogeny. tect:LaramideOrogeny time:occurredIn time:LateCretaceousEocene. time:intervalFor owl.inverseOf time :occurredIn.  We infer that: time : LateCretaceousEocene intervalFor tect : LaramideOrogeny  Query: Which orogeny occurred in Late Cretaceous-Eocene? ?orogeny time : occurredIn time : LateCretaceousEocene.  The query will return: LaramideOrogeny

46 LateCretaceousEocene </owl.Class

47

48

49


Download ppt "OWL – Part II. owl:equivalentProperty  Already we have learned about asserting that two properties behave in the same way  To make two properties equivalent,"

Similar presentations


Ads by Google