Semantic Modeling With OWL - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

Semantic Modeling With OWL

Description:

Semantic Modeling With OWL A Gentle Introduction Gerald McCollam OpenMine, LLC The web infrastructure provides a data model whereby information about a single entity ... – PowerPoint PPT presentation

Number of Views:139
Avg rating:3.0/5.0
Slides: 45
Provided by: GeraldM61
Learn more at: http://ww16.swnyc.org
Category:

less

Transcript and Presenter's Notes

Title: Semantic Modeling With OWL


1
Semantic Modeling With OWL
  • A Gentle Introduction

Gerald McCollam
OpenMine, LLC
2
My background
  • Principal Consultant, OpenMine, LLC
  • 10 years as a web developer and systems
    integrator.
  • Reuters Health, Razorfish, Opsware, EDS,
    Bladelogic

Charles Sanders Peirce
Current Project The Design Library, NY
Founder of Pragmatism, a theorist of logic,
language, communication, and the general theory
of signs (semiotics).
Image has repeating element Element has
attribute of medium density Element has
attribute of diagonal orientation Element is
figurative Image has a background Background
is solid Background is black Image has a
foreground Foreground has repeating
element Foreground is white Element is
foreground Element is a bird
OpenMine, LLC
3
What will we cover?
  • Data modeling for the Semantic Web
  • RDF (W3C recommendation since 2003.)
  • RDF Schema (RDFS) (W3C recommendation since
    2003.)
  • RDF Plus (also known as OWL-Fast, considered a
    subset of WOL, not currently a recommendation.)
  • OWL (W3C recommendation since 2003.)

Semantic Web for the Working Ontologist
Effective Modeling in RDFS and OWL - Dean
Allemang and Jim Hendler (2007) Morgan Kaufman.
OpenMine, LLC
4
What we wont cover
  • Full details of OWL.
  • Tools available for building SW apps.
  • Pitfalls and gotchas of this technology.
  • Arguments for or against, flame wars, or
    anything controversial.

OpenMine, LLC
5
Why A Semantic Web?
  • Part of the original design idea for the WWW (as
    proposed by Sir Tim Berners-Lee).
  • Very Basic Idea is to use metadata to add (and
    extract) meaning to (and from) documents.
  • An Even Better Idea is to utilize Semantic Web
    methodologies to create a web of data in addition
    to the current web of documents.
  • Misconception Semantic Web is just AI for the
    Web.
  • Misconception One must learn formal logic to use
    Semantic Web technology.
  • Misconception Everything must be converted!
  • .

water molecule triple
Foundational RDF RdfResource Anything that can
be defined in terms of a triple. RdfProperty Res
ources that are used as predicates. RdfStatement
A resource that reifies a triple.
OpenMine, LLC
OpenMine, LLC
6
Where is Semantic Web being applied today?
66
Vodafone, a leading mobile phone company, has
used RDF to describe and search ring tones,
games and pictures in their Web site. As a
result, the page viewed per download has
decreased by 50 and revenues have risen by 20.
Jorge Cardoso, The Semantic Web Vision Where
are We? IEEE Intelligent Systems,
September/October 2007, pp.22-26, 2007.
OpenMine, LLC
OpenMine, LLC
7
Where are ontologies being applied?
The basic challenge for ontology identifying the
subject, the object and any relationships between
the two.
Jorge Cardoso, The Semantic Web Vision Where
are We? IEEE Intelligent Systems,
September/October 2007, pp.22-26, 2007.
OpenMine, LLC
OpenMine, LLC
8
Simple ontologies Guitars and Cars
OpenMine, LLC
OpenMine, LLC
9
Making sense of RDF, RDF Schema, etc.
  • Resource Description Framework (RDF).
  • RDF Schema.
  • RDF Plus.
  • OWL.

OpenMine, LLC
OpenMine, LLC
10
RDF The Resource Description Framework
  • A W3C specification for representing information
    so that it can be shared between applications
    without ambiguity.
  • A standard way to make statements about resources
    on the Web (and elsewhere).
  • Examples
  • Subject Predicate Object
  • Led Zeppelin wrote Stairway To Heaven
  • Jimmy Page is a guitarist
  • Jimmy Page is part of Led Zeppelin

Definition The base element of the RDF model is
the triple a resource (the subject) is linked to
another resource (the object) through an arc
labeled with a third resource (the predicate).
Historical note The triplet form of RDF adheres
to the triadic form found in Peircean semiotics.
Peirce refers to the subject as the
representamen, the form the sign takes, the
object as what the sign refers to, and the
predicate or interpretant as the sense the sign
makes.
OpenMine, LLC
OpenMine, LLC
11
RDF Managing conflicting interpretations.
Given the following triples
Subject
Predicate Object Jimmy Page
is part of Led Zeppelin
Jimmy Pages index finger is part of
Jimmy Page
Interpretation 1
Interpretation 2
Is Jimmy Pages index finger really part of Led
Zeppelin? We will see how two interpretations
can exist side by side.
OpenMine, LLC
OpenMine, LLC
12
RDF Managing a more dramatic merge.
married
lived in
part of
part of
wrote
Subject Predicate Object Wm.
Shakespeare wrote King Lear Wm.
Shakespeare wrote Hamlet Anne
Hathaway married Wm. Shakespeare Wm.
Shakespeare lived in Stratford
Stratford is part of England England is
part of U.K.
Subject Predicate Object Wm.
Shakespeare author of The Tempest Wm.
Shakespeare author of As You Like It Wm.
Shakespeare author of Othello Wm.
Shakespeare author of King Lear
OpenMine, LLC
OpenMine, LLC
13
RDF Identity issues when merging triple stores
ns1married
ns1lived in
ns1part of
ns1part of
ns1wrote
ns2author of
When is a node in one graph the same as a node
in another graph?
Subject Predicate Object Wm.
Shakespeare ns1wrote King Lear Wm.
Shakespeare ns1wrote Hamlet Wm.
Shakespeare ns1author of Hamlet Wm.
Shakespeare ns2author of The Tempest Wm.
Shakespeare ns2author of As You Like It
Wm. Shakespeare ns2author of Othello Anne
Hathaway ns1married Wm. Shakespeare Wm.
Shakespeare ns1lived in Stratford
Stratford ns1is part of England
England ns1is part of U.K.
OpenMine, LLC
OpenMine, LLC
14
RDF Namespaces, the URI and Equivalence
  • RDF applies the notion of the URI to resolve the
    identity problem in graph merging. A node from
    one graph is merged with a node from another
    graph, only if they have the same URI.
  • Using the URI as a standard for global
    identifiers allows for a world-wide reference for
    any symbol.

Wm. Shakespeare ns1wrote King Lear Wm.
Shakespeare ns2author of King Lear
"http//someplace.org/ns1/relations/wrote "http
//otherplace.org/ns2/relations/authorOf"
Comment RDF and the Semantic Web are primarily
about describing resources. Resources are always
named by URIs, and anything can have a URI. While
designed to handle resources on a network, RDF
may be used to describe potentially anything.
OpenMine, LLC
OpenMine, LLC
15
RDF Summary
  • RDF is a base specification for representing data
    (things and the relationships between things) on
    the Semantic Web.
  • The elemental form is the triple consisting of a
    subject, an object, and a predicate.
  • RDF is intended to provide a simple way to make
    statements about resources and to build up
    ontologies based on collections of statements.
  • Next RDF Schema

OpenMine, LLC
OpenMine, LLC
16
RDFS Adding inference capability to data.
  • RDFS is a specification for representing
    relationships between data.
  • Examples rdfssubClassOf, rdfssubPropertyOf,
    rdfsdomain, rdfsrange.
  • RDFS is based on inference. If we say that X is
    a subclass of Y were saying that every member
    of class X is also a member of class Y. If x is a
    member of X, then x is also a member of Y. In
    this way we can derive new information.

Note Were using the full URI expression above.
An equivalent expression is the corresponding
qname, for example rdfssubClassOf.
OpenMine, LLC
OpenMine, LLC
17
RDFS Inference via Type Propagation
  • By the rules defined for rdfssubClassOf we know
    that a van is a type of vehicle and a minivan is
    a type of van. These are explicitly defined as
    part of our ontology.
  • Through the same inference rule we know
    implicitly that a minivan is also a type of
    vehicle. We infer this information from what is
    already defined.
  • This very simple example indicates the potential
    cumulative effect of deriving new information
    from what is previously defined.

OpenMine, LLC
OpenMine, LLC
18
RDFS Inference via Relationship Propagation
  • Just as the case for classes of things, the
    properties that relate classes together may also
    propagate.
  • For example, by the rules defined for
    rdfssubPropertyOf we know that an individual A
    who freelances to company B also works for
    company B.

Note Were using the full URI expression above.
An equivalent expression is the corresponding
qname, for example rdfssubPropertyOf.
OpenMine, LLC
OpenMine, LLC
19
RDFS Distinctions vs. Object Modeling (OOP)
  • The construct rdfssubPropertyOf has no analog in
    object-oriented programming, where properties are
    not first-class entities.
  • In OO modeling properties or attributes are never
    related to one another independent of the class
    in which they are defined. This sort of
    relationship can and does occur in SW
    applications.
  • Further, the SW definition for rdfssubClassOf is
    only partially consistent with the definition of
    subclass or extension in OOP. In either case, an
    instance of a class may respond in the same way
    as instances of its super-class. However In SW
    classes there is no notion of an over-ride.
  • So how does multiple inheritance work in Semantic
    Web modeling? We just apply the subClassOf rule
    twice!

OpenMine, LLC
OpenMine, LLC
20
RDFS rdfsrange and rdfsdomain
  • Any property P can have an rdfsdomain and/or an
    rdfsrange. Each is defined as
  • We interpret this to mean that the relation P
    relates values from class D to values from class
    R.
  • The domain refers to the subject of any triple
    that uses P as its predicate. The range refers to
    the object of any such triple.
  • If property P has domain D (or range R) we may
    infer that the subject (or object, if range) of
    the triple is in class D (or R, if range).
  • Unlike the case of XML Schema, RDF Schema will
    never flag an input as invalid. It will infer the
    correct type information.

P rdfsdomain D .
P rdfsrange R .
OpenMine, LLC
OpenMine, LLC
21
RDFS RDF Schema vs. XML Schema
  • XML is intended as a markup language for
    arbitrary document structure. RDF is intended as
    a semantic representation language for arbitrary
    data.
  • The RDF Schema mechanism provides a basic type
    system for use in RDF data models.
  • The XML Schema mechanism provides a basic type
    system for use in XML documents.
  • XML addresses doc typing and doc structure while
    RDF provides a data model that can be extended to
    address ontology representation. Each are
    standards for improving machine readability.
  • Flame wars between the two seem misguided.

OpenMine, LLC
OpenMine, LLC
22
RDFS Interaction of rdfssubClassOf and
rdfsdomain
rdfssubClassOf
hasMaidenName
rdfsdomain
  • Given the above graph, if we state that some
    person Alice has the maiden name Jones, we can
    infer the following
  • Further, we can infer up the rdfssubClassOf
    relation and state
  • We neednt know anything more about Alice (beyond
    the fact that she has a maiden name) in order to
    make these inferences.
  • If we have domain or range information with
    regard to a predicate, we can infer additional
    information regarding the type of any element
    based solely on its use in the triple.

Alice rdftype MarriedWoman .
Alice rdftype Woman .
OpenMine, LLC
OpenMine, LLC
23
RDFS Summary
  • RDFS is the RDF schema language. It describes
    types of objects (classes), relates types to one
    another (via rdfssubClassOf), organizes
    properties and the relations between them that
    describe other objects. (via rdfssubPropertyOf).
  • Two key RDF Schema constructs are rdfssubClassOf
    and rdfssubPropertyOf.
  • RDF objects may be instances of one or more
    classes. The rdfssubClassOf property permits the
    specification of an hierarchical structure for
    such classes. rdfssubPropertyOf does the same
    for properties.
  • Constraints on properties can be further
    specified using rdfsdomain and rdfsrange
    constructs.
  • RDFS is expressed itself in RDF.
  • Next OWL Full, briefly

OpenMine, LLC
OpenMine, LLC
24
OWL Full The Web Ontology Language
  • Provides a fuller and more systematic treatment
    of information description
  • Used to explicitly represent the meaning of terms
    in vocabularies and the relationships between
    those terms.
  • Facilitates greater machine interpretability of
    Web content than that supported by XML, RDF, and
    RDF Schema (RDFS). OWL provides additional
    vocabulary along with a formal semantics.

OpenMine, LLC
OpenMine, LLC
25
OWL Full OWL examples not covered
  • owlRestriction - a fundamental building block in
    OWL that describes classes by restricting the
    values allowed for certain properties.
  • owlhasValue - a type of restriction that refers
    to a single value for a property.
  • owlsomeValuesFrom - a type of restriction that
    refers to a set from which some value for a
    property must come.
  • owlallValuesFrom - used to produce a restriction
    class of the form, the individuals for which all
    values of the property P come from class C.
  • owlonProperty - link from a restriction to the
    property it restricts.

OpenMine, LLC
OpenMine, LLC
26
OWL Full Using a subset at the start
  • A complete language for making ontological
    statements, developed as a follow-on from RDF and
    RDFS.
  • All of OWLs elements (classes, properties and
    individuals) are defined as RDF resources, and
    identified by URIs.
  • OWL provides support for representing union and
    intersection, enumeration of sets,
    differentiating individuals and groups, and
    cardinality.
  • Lets see OWL in action using RDF-Plus
  • Next RDF-Plus

OpenMine, LLC
OpenMine, LLC
27
RDF-Plus A Subset of OWL
  • As a gentle step toward OWL we consider only a
    subset of OWL known as RDF-Plus.
  • RDFS provides an important set of inference
    capabilities but it is limited.
  • RDF-Plus builds upon what is already familiar in
    RDFS.
  • The following set of constructs might be
    implemented using any number of a variety of
    inference technologies, thus lessening dependency
    on any specific technology or platform.
  • As is the case for RDFS, RDF-Plus (aka as
    OWL-Fast) is expressed entirely in RDF. OWL
    includes a number of additional resource
    constructs in the owl namespace.

OpenMine, LLC
OpenMine, LLC
28
RDF-Plus What part of OWL well consider
Equality
  • owlequivalentClass Members of each class are
    also members of the other.
  • owlequivalentProperty Relations that hold for
    each property also hold for the other.
  • owlsameAs All statements about one instance
    hold as well for the other.

Property Characteristics
  • owlinverseOf Allows for the exchange of
    subject and object.
  • owltransitiveProperty Collapses a chain of
    relations into one.
  • owlsymmetricProperty A property that is its
    own inverse.

OpenMine, LLC
OpenMine, LLC
29
RDF-Plus owlequivalentClass
Members of each class are members of the other.
ltowlClass rdfabout"US_President"gt
ltequivalentClass rdfresource"PrincipalResidentO
fWhiteHouse"/gt lt/owlClassgt
Analyst rdfssubClassOf Researcher .
Researcher rdfssubClassOf Analyst . Analyst
owlequivalentClass Researcher .
  • Note The use of owlequivalentClass does not
    imply class equality. It only says that two
    classes have the same members. The concept of
    "President of the US" is related to, but not
    equal to the concept of the principal resident of
    1600 Pennsylvania Avenue.
  • This OWL property has rdfClass as both its
    domain and range.

OpenMine, LLC
OpenMine, LLC
30
RDF-Plus owlequivalentProperty
Relations that hold for each property also hold
for the other.
ltowlClass rdfaboutMarriedWomen"gt
ltequivalentClass rdfresourcehasMaidenName"/gt lt
/owlClassgt
borrows rdfssubPropertyOf checkedOut .
checkedOut rdfssubPropertyOf borrows .
borrows owlequivalentProperty checkedOut .
  • Note The use of owlequivalentProperty does not
    imply property equality. The property of being a
    married woman is related with but not equal to
    the property of having a maiden name.
  • This OWL property has rdfProperty as both its
    domain and range.

OpenMine, LLC
OpenMine, LLC
31
RDF-Plus owlsymmetricProperty
Specifies that an Attribute relation is valid in
two directions.
ltowlObjectProperty rdfID"adjacentRegion"gt
ltrdftype rdfresource"owlSymmetricProperty"
/gt ltrdfsdomain rdfresource"Region" /gt
ltrdfsrange rdfresource"Region"
/gt lt/owlObjectPropertygt ltRegion
rdfIDTerrebonneParishRegion"gt ltlocatedIn
rdfresourceLouisianaRegion" /gt
ltadjacentRegion rdfresourceLafourcheParishRegi
on" /gt lt/Regiongt
  • Note The TerrebonneParish region is adjacent to
    the LafourcheParish region and vice-versa. The
    TerrebonneParish region is located in the
    LouisianaRegion but not vice versa.

OpenMine, LLC
OpenMine, LLC
32
RDF-Plus owlinverseOf
Allows for the exchange of subject and object.
ltowlObjectProperty rdfIDpossessedBy"gt
ltowlinverseOf rdfresource"hasPossession"/gt lt/o
wlObjectPropertygt
owlinverseOf
owlinverseOf owlinverseOf owlinverseOf .
owlinverseOf rdftype owlsymmetricProperty .
owlinverseOf
  • Note Properties generally have direction from
    domain to range. If we state that a person is
    married to another person, the inverse relation
    may not be necessarily implied. For a relation
    like marriage it is useful to define the
    relation in both directions. As another example,
    people own cars, and cars are owned by people.

OpenMine, LLC
OpenMine, LLC
33
RDF-Plus owlsameAs
All statements about one instance hold equally
for the other.
ltrdfDescription rdfabout"WilliamClinton"gt
ltowlsameAs rdfresource"BillClinton"/gt lt/rdfDe
scriptiongt
owlsameAs rdftype owlSymmetricProperty .
WilliamClinton owlsameAs BillClinton .
  • Note The owlsameAs statement is often used to
    define mappings between ontologies. This is
    useful when merging data stores.
  • In this example we are using OWL to extend OWL.

OpenMine, LLC
OpenMine, LLC
34
RDF-Plus owltransitiveProperty
Collapses a chain of relations into one.
ltowlObjectProperty rdfID"subRegionOf"gt
ltrdftype rdfresource"owlTransitiveProperty"/gt
ltrdfsdomain rdfresource"Region"/gt
ltrdfsrange rdfresource"Region"/gt lt/owlObject
Propertygt
LafayetteRegion owlsubRegionOf AcadianaRegion
. AcadianaRegion owlsubRegionOf
LouisianaRegion . LafayetteRegion
owlsubRegionOf LouisianaRegion .
  • Note A transitive property can link from a
    Object from a special Type to another Object of
    the same Type or a sublcass of this type. We
    can use this relation to express containment.

OpenMine, LLC
OpenMine, LLC
35
RDF-Plus Bringing it all back home.
  • Lets make some Gumbo!
  • Very Simple Recipe for making gumbo

- In large pot place medium size chicken and
cook under low heat for 1 hour. Debone
chicken meat and put aside. - Chop up one
bell pepper, one large onion, one bunch celery.
Cook over low fire until brown. Put aside. -
In a large flat skillet heat and slowly stir
bacon fat with flour until dark brown. - Add
roux in with vegetables, garlic, thyme,
seasoning. Simmer under low heat. - Add in meat
shortly before serving.
dependsOn owlinverseOf enables .
OpenMine, LLC
OpenMine, LLC
36
RDF-Plus Gumbo workflow triples
37
RDF-Plus Jimmy Pages Index Finger Revisited
Subject
Predicate Object Jimmy Page
is part of Led Zeppelin
Jimmy Pages index finger is part of
Jimmy Page
Is Jimmy Pages index finger part of Led Zeppelin?
We can resolve this by defining two versions of
the part of property in separate namespaces.
One will be a subPropertyOf the other, with the
super property declared as transitive.
ns1partOf rdfssubPropertyOf ns2partOf
. ns2partOf rdftype owltransitiveProperty .
The application can query the appropriate
property depending on which interpretation of
part of is required.
OpenMine, LLC
OpenMine, LLC
38
RDF-Plus Gumbo dependency tree
wfdependsOn
wfdependsOn
wfdependsOn
Were going to use the rdfssubPropertyOf and
owltransitiveProperty pattern for each
wfdependsOn and wfenables property. We
define wfhasPrerequisite and wfpreRequisiteFor
in terms of dependsOn and enables and make each
super property transitive.
wfenables
wfenables
wfenables
wfdependsOn rdfssubPropertyOf
wfhasPrerequisite . wfhasPrerequisite
rdftype owltransitiveProperty . wfenables
rdfssubPropertyOf wfpreRequisiteFor .
wfpreRequisiteFor rdftype owltransitivePro
perty .
OpenMine, LLC
OpenMine, LLC
39
RDF-Plus Mixing up RDF, RDFS and OWL
Transitive Properties wfhasPrerequisite and
wfprerequisiteFor defined in terms of
wfdependsOn and wfenables.
OpenMine, LLC
OpenMine, LLC
40
RDF-Plus Grouping gumbo dependencies
addDeboneChicken wfhasPrequisite deboneChicken
wfhasPrequisite cookChicken
wfhasPrequisite boilWater .
wfdependsOn
wfenables
mixinVegetables wfhasPrequisite cookVegetables
wfhasPrequisite cutVegetables
mixinVegetables
wfdependsOn
wfenables
41
RDF-Plus Summary
  • The constructs weve seen in RDF-Plus represent a
    subset of OWL. Weve been considering OWL all
    along.
  • RDF-Plus is recommended as a primer for OWL. A
    lot can be accomplished with just this subset.
  • owlfunctionalProperty, owlinverseFunctionalPrope
    rty
  • owlobjectProperty, owldatatypeProperty
  • Example application of a subset of OWL FOAF
  • Last Concluding remarks

OpenMine, LLC
OpenMine, LLC
42
SW - Data Modeling Workflow
Figure out what you want to model!
Find and study related ontologies.
Test your ontology using test cases.
Create an ontology by borrowing.
Create an instance of your ontology.
OpenMine, LLC
OpenMine, LLC
43
Conclusion
  • Classes, subclasses, properties and instances
    have been the bread and butter of knowledge
    modeling for years. SW continues in this
    tradition.
  • Whats different about SWs use of these terms
    and approaches? The distributed nature of the Web
    and other networks. The idea that information
    should be available.
  • Having the right knowledge at the right time is
    clearly an advantage in any endeavor.
  • The Web can brings significant knowledge to the
    users attention. But if that information is not
    represented in one place, the onus of integration
    rests with the user.
  • SW isnt on the web it is the web!

OpenMine, LLC
OpenMine, LLC
44
RDF-based apps now!
In 1999, Sir Tim Berners-Lee made the following
pronouncement "I have a dream in which
computers become capable of analyzing all the
data on the web - all the content, links, and
transactions. A 'Semantic Web', which should make
this possible, has yet to emerge..."
In February 2008, Berners-Lee added "I think
weve got all the pieces to be able to go
ahead and do pretty much everything to
implement a huge amount of the dream, we should
be able to get benefits from interoperability
using what weve got people are realizing its
time to just go do it."
OpenMine, LLC
OpenMine, LLC
Write a Comment
User Comments (0)
About PowerShow.com