레이블이 OWL인 게시물을 표시합니다. 모든 게시물 표시
레이블이 OWL인 게시물을 표시합니다. 모든 게시물 표시

2017년 6월 7일 수요일

Web Ontology Language

1. Introducing Web Ontology Language (OWL)
 - OWL has more expressive formalism than RDF Schema
  1) instance classification
  2) consistency checking
  3) subsumption reasoning

 - two versions of OWL
  1) OWL 1.0: different subsets of OWL features give rise to the following sublanguages (colloquially known as species)
   * OWL Lite: SHIF(D)
    ! less complex reasoning at the expense of less expressive language
   * OWL DL: SHOIN(D) + complete and decidable + higher worst-case complexity than OWL Lite
    ! supports all OWL constructs, with some restrictions
   * OWL Full: no restrictions on use of language constructs
    ! potentially, undecidable (you can still receive some answers but not for all questions)
 http://www.cs.man.ac.uk/~ezolin/dl/


  2) OWL 2.0: more expressive than OWL 1.0, and takes advantage of developments in DL reasoning techniques in the intervening time


2. OWL 1.0 Features and Syntax
 - Ontology header
 <owl:Ontology rdf:about="">
     <owl:versionInfo>1.4</owl:versionInfo>
     <rdfs:comment>An example ontology</rdfs:comment>
  </owl:Ontology>

 - Versioning support
  1) owl:versionInfo: version number etc
  2) owl:priorVersion: an ontology is a previous version of this
  3) owl:backwardCompatibleWith: the specified ontology is a previous version of this one, and this is compatible with it
  4) owl:incompatibleWith: the specified ontology is a previous version of this one, but this is incompatible with it

 - OWL class types
  1) owl:Class: distinct from rdfs:Class
  2) owl:Thing: the class that includes everything
  3) owl:Nothing: the empty class

 - OWL property types
  1) owl:ObjectProperty: the class of resource-valued properties
  2) owl:DatatypeProperty: the class of literal-valued properties
  3) owl:AnnotationProperty: used to type properties
 !! OWL versus RDF Schema
  * reflexive definitions of RDF Schema means that some resources are treated as both classes and instances, or instances and properties
   => ambiguous semantics for these resources
    can't tell from context whether they're instances or classes
    can't select the appropriate interpretation function
  * the introduction of owl:Class, owl:ObjectProperty and owl:DatatypeProperty eliminates this ambiguity

 - OWL local cardinality constraints
  1) owl:minCardinality: property R has at least n values
  2) owl:maxCardinality: property R has at most n values
  3) owl:cardinality: property R has exactly n values

  <owl:Restrictions>                              <!-- OWL restriction format -->
      <owl:onProperty rdf:resource="#distilledBy"/>
      <owl:cardinality>1</owl:cardinality>     <!-- constraint expression -->
  </owl:Restriction>

 - OWL local range constraints
  1) owl:someValuesFrom: there exists a value for property R of type C
  2) owl:allValuesFrom: property R has only values of type C

  <owl:Class rdf:about="#Vegetarian">
      <owl:equivalentClass>
         <owl:Restrictions>
            <owl:onProperty rdf:resource="#eat"/>
            <owl:allValuesFrom rdf:resource="#Plant"/>
         </owl:Restriction>
      </owl:equivalentClass>
  </owl:Class>

 - OWL local value constraints
  1) owl:hasValue: property R has a value which is X
  <owl:Restrictions>                            
      <owl:onProperty rdf:resource="#hasColour"/>
      <owl:hasValue rdf:resource="#Green"/>
  </owl:Restriction>

 - OWL set constructs
  1) owl:intersectionOf
  2) owl:unionOf
  3) owl:complementOf

 - Equivalence and identity relations
  1) owl:sameAs
  2) owl:equivalentClass
  3) owl:equivalentProperty
  <owl:Thing rdf:about="#MorningStar">
     <owl:sameAs rdf:resource="#EveningStar"/>
  </owl:Thing>

 - Non-equivalence relations
  1) owl:differentFrom: can be used to specify a limited unique name assumption
  2) owl:AllDifferent / owl:distinctMembers
  <owl:AllDifferent>
     <owl:distinctMembers rdf:oarseType="Collection">
       <rdf:Description rdf:about="#John"/>
       <rdf:Description rdf:about="#Paul"/>
       <rdf:Description rdf:about="#Ringo"/>
     </owl:distinctMembers>
  </owl:AllDifferent>
  3) OWL (and DLs in general) make the Open World Assumption

 - Necessary Class Definitions
  1) If we know that something is a X, then it must fulfil the conditions ...
  2) defined using rdfs:subClassOf

 - Sufficient Class Definitions
  1) if we know that something has this property, then it belongs to this class ...
  2) defined using rdfs:subClassOf - in the other direction

 - Necessary and sufficient Class Definitions
  1) if something fulfils the conditions ..., then it is an X
  2) defined using owl:equivalentClass

 - Inverse: defines a property as the inverse of another property
  <owl:ObjectProperty rdf:about="#hasAuthor">
     <owl:InverseOf rdf:resource="#write"/>
  </owl:ObjectProperty>

 - Symmetric: P(x, y) iff P(y, x)
  <owl:SymmetricProperty rdf:about="#hasSibiling"/>

 - Transitive: P(x, y) and P(y, z) implies P(x, z)
  <owl:TransitiveProperty rdf:about="#hasAncestor"/>

 - Functional: P(x, y) and P(x, z) implies y = z
  <owl:FuntionalProperty rdf:about="#hasBirthdate"/>

 - Inverse Functional: P(y, x) and P(z, x) implies y = z
  <owl:InverseFunctionalProperty rdf:about="#hasFingerPrint"/>

 - Disjoint classes: members of one class cannot also be members of some specified other class
  <owl:Class rdf:about="#MaleHuman">
     <rdfs:subClassOf rdf:resource="#Human"/>
     <owl:disjointWith rdf:resourcce="#FemaleHuman"/>
  </owl:Class>

 - Ontology modularisation
  1) owl:imports mechanism for including other ontologies
  2) also possible to use terms form other ontologies without explicitly importing them
  3) importing requires certain entailments, whereas simple use does not require those entailments

https://en.wikipedia.org/wiki/Web_Ontology_Language

https://www.w3.org/TR/owl-guide/


3. OWL 2
 - From OWL 1 to OWL 2: changes between 1 and 2 fall into the following categories
  1) syntactic sugar
   * owl:AllDisjointClasses : allows to define a class as the union of a number of other classes, all of which are pairwise disjoint
   * owl:NegativePropertyAssertions : lets us assert that an individual does not have a particular property value

  2) constructs for increased expressivity
   * owl:hasSelf: defines a class of individuals which are related to themselves by a given property
   * qualified cardinality: lets us specify both the local range of a property and the number of values taken by the property
   <owl:Restriction>
      <owl:onProperty rdf:resource="#hasPart"/>
      <owl:onClass rdf:resource="#Wheel"/>
      <owl:cardinality rdf;datatype="&xsd;integer">4</owl:cardinality>
   </owl:Restriction>

   * owl:ReflexiveProperties: allows to assert that a property is globally reflexive (relates every object to itself)
   * owl:IrreflexiveProperties: allows to assert that a property relates no object to itself
   * owl:AsymmetricProperties: allows to assert that a property is asymmetric - If p(x, y), then not p(y, x)
   * owl:propertyDisjointWith: allows to state that two individuals cannot be related to each other by two different properties that have been declared disjoint

   * property chain inclusion: defines a property as a composition of other properties
   <owl:ObjectProperty rdf:about="#hasUncle">
       <owl:propertyChainAxiom rdf:parseType="Collection">
          <owl:ObjectProperty rdf:about="#hasParent"/>
          <owl:ObjectProperty rdf:about="#hasBrother"/>
       </owl:propertyChainAxiom>
   </owl:ObjectProperty>

   * owl:hasKey: let's define uniquely identifying keys that comprise several properties
   * owl:onDatatype: allows to define subsets of datatypes that constrain the range of values allowed by a datatype

  3) datatype support

  4) metamodelling
   * Punning: OWL 1 required the names used to identify classes, properties, individuals and datatypes to be disjoint but OWL 2 relaxes this (the same name can be used for both a class and an individual>
 https://www.w3.org/2007/OWL/wiki/Punning


  5) annotation

https://www.w3.org/TR/owl2-primer/

http://semanticweb.org/wiki/OWL_2.html

Introduction to the Semantic Web

1. What is the Semantic Web?
 : an extension of the current Web in which information is given a well-defined meaning, better enabling computers and people to work in cooperation.

 - The annotated Web
  1) Enrich existing web pages with annotations
  2) Annotations enable enhanced browsing and searching

 - The Web of Data
  1) Expose existing databases in a common format: it allows the integration of data in unexpected ways
  2) Express existing database schemas in a machine-understandable form: it allows reasoning about data

https://www.w3.org/standards/semanticweb/


2. The Origins of the Semantic Web
 - Interwoven themes: Knowledge Based Systems + Hypertext/Hypermedia + Library and Information Science
  1) Knowledge representation 
   * Long-standing discipline within Artificial Intelligence
   * Knowledge representation languages should handle qualitative knowledge
     e.g. RDF, RDF Schema and OWL
  2) Hypertext/Hypermedia
   * Links: essence of hypermedia is connection
   * Open hypermedia makes links between different bits of knowledge but Network knowledge representation makes links that are knowledge
  3) Library and Information Science
   * Library cataloguing = metadata
   * Metadata: data about data

http://artint.info/html/ArtInt_8.html


3. Basic Concepts

The World Wide Web
The Semantic Web
 the web for people  the web for machines
 machine readable: information needs humans to give it interpretation  machine understandable: information is structured so that it can be interpreted by machines
 technologies include URI, HTTP, XML and HTML  technologies include RDF, RDFS and OWL

4. Semantic Web Technical Architecture
 - Fundamental Principles
  1) Anyone can make assertions about anything
  2) Entities are referred to using Uniform Resource Identifiers
  3) Based on XML technologies
  4) Formal Semantics

 - The Semantic Web layer cake: https://en.wikipedia.org/wiki/Semantic_Web_Stack

 - The triple: underlying model of triples used to describe the relations between entities in the Semantic Web
   (subject) -- [predicate] --> (object)

 - RDF: Resource Description Framework
  1) a framework for representing information about resources on the WWW and beyond
  http://melancholy8914.blogspot.co.uk/2017/06/resource-description-framework.html

 - RDF Schema: RDF Vocabulary Description Language
  1) an RDF vocabulary which we can use to define other vocabularies
  http://melancholy8914.blogspot.co.uk/2017/06/rdf-schema.html

 - OWL: Web Ontology Language
  1) OWL provides more expressive features than RDF Schema
  http://melancholy8914.blogspot.co.uk/2017/06/ontologies.html

  http://melancholy8914.blogspot.co.uk/2017/06/web-ontology-language.html

 - SPARQL: the SPARQL Protocol and RDF Query Language
  http://melancholy8914.blogspot.co.uk/2017/06/sparql-protocol-and-rdf-query-language.html


5. Vocabularies and Applications
 - Social Networking
  1) FOAF
   * Friend Of A Friend
   * a machine readable ontology describing persons, their activities, and their relations to other people and objects
  http://www.ldodds.com/foaf/foaf-a-matic.html

  2) SIOC
   * Semantically-Interlinked Online Communities
   * ontology for describing interconnecting discussion methods like wikis, bulletin boards, blogs etc
  http://sioc-project.org/

 - Bibliographic Metadata
  1) Dublin Core
   * A standard set of 15 metadata elements for cross-domain information resource description
   * possibly the most widely used Semantic Web vocabulary
  http://dublincore.org

 - Cultural Heritage
  1) CIDOC CRM
   * ICOM's International committee for DOCumentation Conceptual Reference Model
   * ontology for heterogeneous cultural heritage information
  http://www.cidoc-crm.org/

 - Knowledge Organisation
  1) SKOS
   * Simple Knowledge Organisation System
   * standard vocabulary to support thesauri, classification schemes, subject heading lists, taxonomies, and other types of controlled vocabulary
   * semantic relationships: broader, narrower, related terms
  https://www.w3.org/2004/02/skos/

 - Web Annotation
  1) Annotea
   * shared annotations for the Web
   * Annotea-enabled browsers can query server to obtain annotations for pages
   * Open Annotation Data Model: a framework for creating associations between resources
 http://www.openannotation.org/spec/core/

 - Commerce
  1) Good Relations
   * standardised vocabulary for product, price, and company data