the semantic web #9 - web ontology language (owl)

Download The Semantic Web #9 - Web Ontology Language (OWL)

Post on 17-Nov-2014




1 download

Embed Size (px)


This is a lecture note #9 for my class of Graduate School of Yonsei University, Korea. It describes Web Ontology Language (OWL) for authoring ontologies.


  • 1. Linked Data &Semantic WebTechnologyThe Semantic WebPart 9. Web Ontology Language (OWL)Dr. Myungjin Lee

2. Linked Data & Semantic Web TechnologyWhy RDF(S) is not enough2Man Woman = Person PersondescendantPersondescendantdescendantHusband Wife1:1_01 ActionhasGenreActionMoviesubClassOfGenretype 3. Linked Data & Semantic Web TechnologyWeb Ontology Language (OWL) to provide a language that can be used to describe the classesand relations between them Recommendations for OWL OWL: W3C Recommendation 2004 OWL 2: W3C Recommendation 2009 RDF(S) and OWL RDF Schema enables you to express very rudimentary relationshipsand has limited inferencing capability. OWL enables you to express much richer relationships, thus yielding amuch enhanced inferencing capability.3 4. Linked Data & Semantic Web TechnologyThe Species of OWL OWL Lite primarily needing a classification hierarchy and simple constraintfeatures ex. only to permit cardinality values of 0 or 1 SHIF(D) OWL DL the maximum expressiveness without losing computationalcompleteness and decidability of reasoning systems SHOIN(D) OWL Full the maximum expressiveness and the syntactic freedom of RDF with nocomputational guarantees4 5. Linked Data & Semantic Web TechnologyThe Species of OWL OWL Lite Synopsis OWL DL and Full Synopsis5 6. Linked Data & Semantic Web TechnologyNamespaces for Ontology Namespace a precise indication of what specific vocabularies are being used to include a set of XML namespace declarations enclosed in an openingrdf:RDF tag6 7. Linked Data & Semantic Web TechnologyOntology Headers Ontology Headers a collection of assertions about the ontology grouped under anowl:Ontology tag for comments, version control and inclusion of otherontologies Syntax owl:Ontology element a place to collect much of the OWL meta-data for the document owl:priorVersion element a standard tag intended to provide hooks for version control systems working withontologies owl:imports element an include-style mechanism7An example OWL ontologyWine Ontology... 8. Linked Data & Semantic Web TechnologyBuilding Blocks of OWL Classes comparable with classes in RDFS Individuals comparable with objects in RDFS Properties comparable with properties in RDFS8 9. Linked Data & Semantic Web TechnologySimple Named Classes owl:Thing Every individual in the OWL world is a member of the classowl:Thing. Each user-defined class is implicitly a subclass of owl:Thing. owl:Class to define a group of individuals a subclass of rdfs:Class rdfs:subClassOf the fundamental taxonomic constructor for classes If X is a subclass of Y, then every instance of X is also an instance of Y. The rdfs:subClassOf relation is transitive. If X is a subclass of Y and Y a subclass of Z then X is a subclass of Z.9... 10. Linked Data & Semantic Web TechnologyIndividuals Individuals to describe members of classes using rdf:type10 11. Linked Data & Semantic Web TechnologyDefining Properties Property a binary relation Two types of properties distinguish properties according to whether they relate individuals toindividuals (object properties) or individuals to datatypes (datatypeproperties) datatype property relations between instances of classes and RDF literals and XML Schemadatatypes object property relations between instances of two classes11rdf:Propertyowl:ObjectPropertyrdfs:subClassOfowl:DatatypePropertyrdfs:subClassOf 12. Linked Data & Semantic Web TechnologyObject Property Declaration of Object Property12rdf:type 13. Linked Data & Semantic Web TechnologyProperties and Datatypes OWL uses most of the built-in XML Schema datatypes.13xsd:string xsd:normalizedString xsd:booleanxsd:decimal xsd:float xsd:doublexsd:integer xsd:nonNegativeInteger xsd:positiveIntegerxsd:nonPositiveInteger xsd:negativeInteger xsd:longxsd:int xsd:short xsd:bytexsd:unsignedLong xsd:unsignedInt xsd:unsignedShortxsd:unsignedByte xsd:hexBinary xsd:base64Binaryxsd:dateTime xsd:time xsd:datexsd:gYearMonth xsd:gYear xsd:gMonthDayxsd:gDay xsd:gMonth xsd:anyURIxsd:token xsd:language xsd:NMTOKENxsd:Name xsd:NCName1998 14. Linked Data & Semantic Web TechnologyProperties in a Hierarchy14...hasWineDescriptorhasColorrdfs:subPropertyOfWineDescriptorWinerdfs:domain rdfs:rangeWineDescriptorrdfs:rangerdfs:domain 15. Linked Data & Semantic Web TechnologyProperty Characteristics TransitiveProperty SymmetricProperty FunctionalProperty inverseOf InverseFunctionalProperty15 16. Linked Data & Semantic Web TechnologyTransitiveProperty If a property, P, is specified as transitive then for any x, y, and z: P(x,y) and P(y,z) implies P(x,z)16CaliforniaRegion USRegionSantaCruzMountainsRegionlocatedIn locatedInlocatedIn 17. Linked Data & Semantic Web TechnologySymmetricProperty If a property, P, is tagged as symmetric then for any x and y: P(x,y) iff P(y,x)17SonomaRegionMendocinoRegionadjacentRegionadjacentRegion 18. Linked Data & Semantic Web TechnologyFunctionalProperty If a property, P, is tagged as functional then for all x, y, and z: P(x,y) and P(x,z) implies y = z18year1998FormanChardonnay2000These two instances mustrefer to the same thing.y1998 19. Linked Data & Semantic Web TechnologyinverseOf If a property, P1, is tagged as the owl:inverseOf P2, then forall x and y: P1(x,y) iff P2(y,x)19SantaCruzMountainVineyardCabernetSauvignonhasMakerproducesWine 20. Linked Data & Semantic Web TechnologyInverseFunctionalProperty If a property, P, is tagged as InverseFunctional then for all x, yand z: P(y,x) and P(z,x) implies y = z20CabernetSauvignonSantaCruzMountainVineyardVineyard023853Two resources mustrefer to the same thing. 21. Linked Data & Semantic Web TechnologyEquivalence between Classes and Properties owl:equivalentClass to indicate that two classes have precisely the same instances owl:equivalentProperty to tie together properties21 22. Linked Data & Semantic Web TechnologyIdentity between Individuals owl:sameAs to declare two individuals to be identical22BancroftBancroftChardonnayhasMakerBeringerhasMakerowl:sameAs 23. Linked Data & Semantic Web TechnologyDifferent Individuals owl:differentFrom to provide the opposite effect from sameAs owl:AllDifferent to define a set of mutually distinct individuals23 24. Linked Data & Semantic Web TechnologyProperty Restrictions Property Restrictions to further constrain the range of a property in specific contexts to indicate the restricted property using the owl:onProperty elementwithin the context of an owl:Restriction the Various Forms of Restriction allValuesFrom, someValuesFrom Cardinality hasValue24 25. Linked Data & Semantic Web TechnologyallValuesFrom owl:allValuesFrom to require that for every instance of the class that has instances of thespecified property the values of the property are all members of the class indicated by theowl:allValuesFrom clause25......anonymousclassPotableLiquidAnonymous ClassWine 26. Linked Data & Semantic Web TechnologyallValuesFrom26......SantaCruzMountainVineyardCabernetSauvignonhasMakerWineryrdf:typeWinerdf:type 27. Linked Data & Semantic Web TechnologysomeValuesFrom owl:someValuesFrom at least one of the hasMaker properties of a Wine must point to anindividual that is a Winery27...SantaCruzMountainVineyardCabernetSauvignonhasMakerWinerdf:typeBancrofthasMakerAt least one value forhasMaker must be aninstance of Winery, in thecontext of the Wine class. 28. Linked Data & Semantic Web TechnologyallValuesFrom vs. someValuesFrom28 owl:allValuesFrom Wherever there is an emptiesInto property, all its values must be instances ofSea. [There may be zero emptiesInto properties.] owl:someValuesFrom There must be at least one connectsTo property whose value is BodyOfWater.[There must be at least one connectsTo property.]Relation ImplicationsallValuesFrom For all wines, if they have makers, all the makers are wineries.someValuesFrom For all wines, they have at least one maker that is a winery. 29. Linked Data & Semantic Web TechnologyCardinality owl:cardinality the specification of exactly the number of elements in a relation291every Vintage has exactly one VintageYear 30. Linked Data & Semantic Web TechnologyCardinality owl:minCardinality to specify a lower bound owl:maxCardinality to specify an upper bound3015 31. Linked Data & Semantic Web TechnologyhasValue owl:hasValue to specify classes based on the existence of particular property values at least one of its property values is equal to the hasValue resource31...all Burgundy wines are dry.their hasSugar property must have at least one value that is equal to Dry. 32. Linked Data & Semantic Web TechnologyComplex Classes Set Operators intersectionOf, unionOf, complementOf Enumerated Classes oneOf Disjoint Classes disjointWith32 33. Linked Data & Semantic Web TechnologyintersectionOf33Burgundy WhiteWineWhiteBurgundy 34. Linked Data & Semantic Web TechnologyintersectionOf Contrast with defining Fleuve using two subClassOf statements Contrast Defining a WhiteBurgundy using two subClassOf elements: all instances ofWhiteBurgundy must be a Burgundy and WhiteWine. Defining a WhiteBurgundy using intersectionOf: a WhiteBurgundy is thecollection of all instances that is both a Burgundy and WhiteWine. Thus, the subClassOf form merely characterizes a WhiteBurgundy, whereasthe intersectionOf form defines a WhiteBurgundy .34Burgundy WhiteWineWhiteBurgundy 35. Linked Data & Semantic Web TechnologyunionOf35SweetFruit NonSweetFruitFruit 36. Linked Data & Semantic Web TechnologyExample of Intersection and Union36AnonymousClassAnonymousClassRivireRiverThe members of this anonymous class areinstances which have an emptiesInto propertyin which all values are instances of River.The members of this anonymousclass are instances which have anemptiesInto property in whichall values are instances of Lake.a River that emptiesInto a Lake or another River. 3


View more >