Semantic_Web by wpr1947

VIEWS: 3 PAGES: 43

									Semantic Web

     &

 RDF/XML
         What is Semantic Web?
 Semantic web is an extension of the www
   Describes things in a way that they are understandable by the Computer




"If HTML and the Web made all the online documents look like one huge book,
 RDF, schema, and inference languages will make all the data in the world look
like one huge database"
                                      Tim Berners-Lee, Weaving the Web, 1999
  How can they be understood by
           computers?
Semantic web uses some descriptive
 technologies like

 Resource Descriptive Framework (RDF)
 Web Ontology Language (OWL)
 Extensible Markup Language (XML)
                    Semantic Web Layer
•   XML provides a surface syntax for
    structured documents.

•   XML Schema is a language for restricting
    the structure and content elements of XML
    documents.

•   RDF is a simple data model for referring to
    objects and how they are related.

•   RDF Schema is a vocabulary for
    describing properties and classes of RDF
    resources.

•   OWL adds more vocabulary for describing
    properties and classes,

•   SPARQL is a protocol and query language
    for Semantic Web data sources.


                                                  “courtesy : http://en.wikipedia.org/wiki/Semantic_Web”
    Resource Descriptive Framework


•   RDF is a W3C Recommendation and part of a semantic web activity

•   RDF is a framework for describing resources on the web

•   RDF provides a model for data, and a syntax so that independent parties can
    exchange and use it

•   RDF is designed to be read and understood by computers

•   RDF is not designed for being displayed to people

•   RDF is written in XML
                  Structure of RDF
• It is a collection of triples
                  Subject (Resource)
                  predicate (Property)
                  Object (property
                 value)

• A set of such triples are called RDF graph
                 Example for RDF
<?xml version="1.0"?>

<RDF>
   <Description about="http://www.w3schools.com/RDF">
        <author>Jan Egil Refsnes</author>
        <homepage>http://www.w3schools.com</homepage>
   </Description>
</RDF>




Statement:
     “The author of http://www.w3schools.com/RDF is Jan Egil Refsnes".
RDF graph for example

                http://www.w3schools.com/RDF




       author




                   Jan Egil Refsnes
             RDF Elements
            Root element          <rdf:RDF>

            Description element <rdf:Description>


<?xml version="1.0"?>


<rdf:RDF
xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
    rdf:about="http://www.recshop.fake/cd/Empire Burlesque">
       <cd:artist>Bob Dylan</cd:artist>
       <cd:country>USA</cd:country>
       <cd:company>Columbia</cd:company>
       <cd:price>10.90</cd:price>
       <cd:year>1985</cd:year>
</rdf:Description>
</rdf:RDF>
                                   RDF Container
                                  Unordered List        <rdf:Bag>

                                  Ordered List          <rdf:Seq>

                                  Alternate values      <rdf:Alt>

<?xml version="1.0"?>
<rdf:RDF                                                        <?xml version="1.0"?>
xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#           <rdf:RDF
xmlns:cd="http://www.recshop.fake/cd#">                         xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#
<rdf:Description                                                xmlns:cd="http://www.recshop.fake/cd#">
  rdf:about="http://www.recshop.fake/cd/Beatles">               <rdf:Description
  <cd:artist>                                                     rdf:about="http://www.recshop.fake/cd/Beatles">
   <rdf:Bag>                                                      <cd:artist>
     <rdf:li>John</rdf:li>                                         <rdf:Seq>
                                                                     <rdf:li>George</rdf:li>
     <rdf:li>Ringo</rdf:li>                                          <rdf:li>John</rdf:li>
     <rdf:li>Paul</rdf:li>                                           <rdf:li>Paul</rdf:li>
    <rdf:li>George</rdf:li>                                          <rdf:li>Ringo</rdf:li>
   </rdf:Bag>                                                      </rdf:Seq>
  </cd:artist>                                                    </cd:artist>
</rdf:Description>                                              </rdf:Description>
</rdf:RDF>                                                      </rdf:RDF>
                  Collection element
Container are not closed
Collections specify only these members are allowed other are not allowed
A collection is described by the attribute rdf:parseType="Collection".

   <?xml version="1.0"?>
   <rdf:RDF
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:cd="http://recshop.fake/cd#">
   <rdf:Description
        rdf:about="http://recshop.fake/cd/Beatles">
        <cd:artist rdf:parseType="Collection">
        <rdf:Description rdf:about="http://recshop.fake/cd/Beatles/George"/>
        <rdf:Description rdf:about="http://recshop.fake/cd/Beatles/John"/>
        <rdf:Description rdf:about="http://recshop.fake/cd/Beatles/Paul"/>
        <rdf:Description rdf:about="http://recshop.fake/cd/Beatles/Ringo"/>
        </cd:artist>
   </rdf:Description>
   </rdf:RDF>
               RDF Schema (RDFS)
•   RDF Schema provides the framework to describe application-specific classes and
    properties
•   RDFS allows resources to be defined as instances of classes, and subclasses of
    classes.


               <?xml version="1.0"?>
               <rdf:RDF
               xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
               xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
               xml:base= "http://www.animals.fake/animals#">
               <rdf:Description rdf:ID="animal">
                 <rdf:type
                   rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
               </rdf:Description>
               <rdf:Description rdf:ID="horse">
                 <rdf:type
                   rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
                 <rdfs:subClassOf rdf:resource="#animal"/>
               </rdf:Description>
               </rdf:RDF>
OWL
               Overview
• Web Ontology Language
• OWL is used to publish and share sets of
  terms called ontologies
• Supports advanced web search and
  knowledge management.
                Ontology
• An ontology is a description (like a formal
  specification of a program) of the concepts
  and relationships that can exist for an
  agent or a community of agents
                        -Tom Gruber, Stanford University

• An ontology defines a common vocabulary
  for researchers who need to share
  information in a domain.
  Elements Of An Ontology…..
• Individuals
       - Individuals (instances) are the basic
  components of an ontology

• Classes
      - Classes (concepts) are abstract
  groups or collections of objects.
     Elements of An Ontology
• Attributes
        - Describes objects in the ontology
        - Used to store information specific to
  the object
• Relationships
       - Important use of attributes is to
  describe relationships between objects.
Basic Ontology




   “Courtesy: http://en.wikipedia.org/wiki/Ontology_(computer_science)”
   Why develop an ontology?
• To share common understanding of the
  structure of information among people or
  software agents
• To enable reuse of domain knowledge
• To make domain assumptions explicit
• To separate domain knowledge from the
  operational knowledge
• To analyze domain knowledge
                  OWL
• OWL is a language for making ontological
  statements.
• OWL can formally describe the semantics
  of classes and properties used in web
  documents.
• OWL is used to publish and share
  ontologies
                      OWL
• The OWL Web Ontology Language is designed
  for use by applications that need to process the
  content of information instead of just presenting
  information to humans.
• OWL facilitates greater machine interpretability
  of Web content than that supported by XML,
  RDF and RDF-S by providing additional
  vocabulary along with a formal semantics.
   Vocabulary Added by OWL
• Relation between classes
   - Ex: disjointness
• Cardinality
   - Ex: exactly one
• Characteristics of properties
   - Ex: symmetry
• Enumerated Classes
      Sublanguages of OWL
 OWL provides three increasingly
 expressive sublanguages for use by
 specific communities of users:

• OWL Lite
• OWL DL
• OWL Full
               OWL Lite
• Less expressive language
• Supports users primarily needing a
  classification hierarchy and simple
  constraints
• Lower formal complexity than other
  languages.
               OWL DL
• Supports users who want maximum
  expressiveness
• Retains:
          - computational completeness
          - decidability
• Named due to its correspondence with
  descriptive logic
               OWL Full
• Attains maximum expressiveness and
  syntactic freedom
• No computational guarantees
• Unlikely that any reasoning software could
  support all the features of OWL Full
           More About OWL
• OWL Full and OWL DL support the same
  set of OWL language constructs
• Difference lies in the restrictions on use of
  some of the features
• OWL DL puts constraints on mixing with
  RDF and requires disjointness of classes,
  properties, attributes…
• OWL Full allows free mixing of OWL with
  RDF schema
  Contd..
• OWL Lite supports only a subset of OWL
  language constructs.
• Particularly targeted at tool builders, who
  want to start with a simple set of language
  features.
• OWL Lite abides by the same semantic
  restrictions as OWL DL
              OWL Syntax
A class is declared as follows:
<owl:Class rdf:ID="ConsumableThing" />

Properties are created as:
<owl:ObjectProperty rdf:ID="madeFromFruit">
<rdfs:domain rdf:resource="#ConsumableThing" />
  <rdfs:range rdf:resource="#Fruit" />
  </owl:ObjectProperty>
       OWL Class Descriptions
• A class description describes an OWL class, either by a
  class name or by specifying the class extension of an
  unnamed anonymous class.
• OWL distinguishes six types of class descriptions:
      a class identifier (a URI reference)
      an exhaustive enumeration of individuals that
  together form the instances of a class
      a property restriction
      the intersection of two or more class descriptions
      the union of two or more class descriptions
      the complement of a class description
    Type 1 Class description

   <owl:Class rdf:ID="Human"/>

This will assert the tuple
    ex:Human rdf:type owl:Class .

Where “ex” is the namespace of relevant
ontology
                 Enumeration type
• A class description of the "enumeration"
  kind is defined with the owl:oneOf property
   <owl:Class>
     <owl:oneOf rdf:parseType="Collection">
          <owl:Thing rdf:about="#Eurasia"/>
          <owl:Thing rdf:about="#Africa"/>
          <owl:Thing rdf:about="#NorthAmerica"/>
          <owl:Thing rdf:about="#SouthAmerica"/>
          <owl:Thing rdf:about="#Australia"/>
          <owl:Thing rdf:about="#Antarctica"/>
     </owl:oneOf>
   </owl:Class>
     Intersection Type
<owl:Class>
   <owl:intersectionOf rdf:parseType="Collection">
       <owl:Class>
          <owl:oneOf rdf:parseType="Collection">
              <owl:Thing rdf:about="#Tosca" />
              <owl:Thing rdf:about="#Salome" />
          </owl:oneOf>
       </owl:Class>
       <owl:Class>
          <owl:oneOf rdf:parseType="Collection">
              <owl:Thing rdf:about="#Turandot" />
              <owl:Thing rdf:about="#Tosca" />
          </owl:oneOf>
       </owl:Class>
   </owl:intersectionOf>
</owl:Class>
                       Union Type
An owl:unionOf statement describes the union of class
 descriptions in the list.
       <owl:Class>
              <owl:unionOf rdf:parseType="Collection">
                 <owl:Class>
                   <owl:oneOf rdf:parseType="Collection">
                          <owl:Thing rdf:about="#Tosca" />
                          <owl:Thing rdf:about="#Salome" />
                   </owl:oneOf>
                 </owl:Class>
                 <owl:Class>
                    <owl:oneOf rdf:parseType="Collection">
                          <owl:Thing rdf:about="#Turandot" />
                          <owl:Thing rdf:about="#Tosca" />
                    </owl:oneOf>
                </owl:Class>
              </owl:unionOf>
        </owl:Class>
SWRL
              Introduction
• Semantic Web Rule Language
• It is roughly an Union of OWL AND
  RULEML language
• It is proposed to W3C by National
  Research Council of Canada, Network
  inference and Stanford university in 2004
                              Example
hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)

    <ruleml:imp>
     <ruleml:_rlab ruleml:href="#example1"/>
       <ruleml:_body>
        <swrlx:individualPropertyAtom swrlx:property="hasParent">
          <ruleml:var>x1</ruleml:var>
          <ruleml:var>x2</ruleml:var>
         </swrlx:individualPropertyAtom>
         <swrlx:individualPropertyAtom swrlx:property="hasBrother">
          <ruleml:var>x2</ruleml:var>
          <ruleml:var>x3</ruleml:var>
          </swrlx:individualPropertyAtom>
        </ruleml:_body>
       <ruleml:_head>
         <swrlx:individualPropertyAtom swrlx:property="hasUncle">
          <ruleml:var>x1</ruleml:var>
          <ruleml:var>x3</ruleml:var>
         </swrlx:individualPropertyAtom>
       </ruleml:_head>
    </ruleml:imp>
                     Implementations
•   SWRLTab is an extension to Protege that supports editing and execution of SWRL
    rules
•   R2ML (REWERSE Rule Markup Language) supports SWRL
•   Bossam, a forward-chaining rule engine supports SWRL
•   Hoolet, an implementation of an OWL-DL reasoner that uses a first order prover
    supports SWRL
•   Pellet, an open-source Java OWL DL reasoner has SWRL-support
•   KAON2 is an infrastructure for managing OWL-DL, SWRL, and F-Logic ontologies
•   RacerPro, supports processing of rules in a SWRL-based syntax by translating them
    into nRQL rules
RIF
             Introduction
• Rule Interchange Format will provide a
  way to allow rules written for one
  application to be published, shared,
  merged and reused in other applications
  by other rule engines
• It is a W3C proposal
                The idea
• RIF working group standardizes the rules
  that propel data across the web regardless
  of the format
• Improves the integration of data sources
  and the ability to draw new conclusions
                    RIF
• W3C said an RIF can trigger the
  integration and transformation of data from
  multiple sources.
• The functionality aims at giving data more
  meaning through the use of metadata and
  how metadata is formatted and how it is
  integrated.
                References
•   http://www.w3schools.com/rdf/default.asp
•   http://www.w3.org/RDF/
•   http://en.wikipedia.org/wiki/Semantic_web
•   http://www.daml.org/2002/06/webont/owl-
    ref-proposed#Purpose

								
To top