CSE 428 Semantic Web Topics OWL Jeff Heflin Lehigh University.
-
Upload
angelina-green -
Category
Documents
-
view
219 -
download
4
Transcript of CSE 428 Semantic Web Topics OWL Jeff Heflin Lehigh University.
CSE 428Semantic Web TopicsOWL
Jeff Heflin
Lehigh University
Ontology Header
<!DOCTYPE rdf:RDF [<!ENTITY owl "http://www.w3.org/2002/07/owl#">]>
<rdf:RDF xmlns:owl ="http://www.w3.org/2002/07/owl#"xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-
syntax-ns#"xmlns:rdfs="http://www.w3.org/2000/01/rdf-
schema#">
<owl:Ontology rdf:about=""><rdfs:label>My Ontology</rdfs:label><rdfs:comment>An example ontology</rdfs:comment><owl:imports
rdf:resource=“http://www.ont.org/generic” /></owl:Ontology>
...
</rdf:RDF>
<p:Person rdf:about=”http://www.cse.lehigh.edu/~heflin/”> <owl:sameAs rdf:resource=”http://www.cs.umd.edu/~heflin/” /></p:Person>
Equality/Inequality
Two URIs refer to distinct individuals
<p:Person rdf:about=”http://www.cse.lehigh.edu/~heflin/”> <owl:differentFrom rdf:resource=”mailto:[email protected]” /></p:Person>
Two URIs refer to the same individual.
<owl:AllDifferent> <owl:distinctMembers rdf:parseType=”Collection”> <p:Person rdf:about=”#Bob” /> <p:Person rdf:about=”#Sue” /> <p:Person rdf:about=”#Mary” /> … </owl:distinctMembers></owl:AllDifferent>
Sets of Distinct Individuals
The URIs #Bob, #Sue and #Mary all refer to distinct individuals.
<owl:Class rdf:ID=”Band”><rdfs:subClassOf><owl:Restriction><owl:onProperty rdf:resource=”#hasMember”/><owl:allValuesFrom rdf:resource=”#Musician”/>
</owl:Restriction></rdfs:subClassOf>
</owl:Class>
All Values From
A Band is a subclass of the set of entities which only have members that are Musicians
<owl:Class rdf:ID=”Band”><rdfs:subClassOf><owl:Restriction><owl:onProperty rdf:resource=”#hasMember”/><owl:someValuesFrom rdf:resource=”#Singer”/>
</owl:Restriction></rdfs:subClassOf>
</owl:Class>
Some Values From
Every Band has at least one member who is a Singer
<owl:Class rdf:ID=”Guitarist”><rdfs:subClassOf><owl:Restriction><owl:onProperty rdf:resource=”#playsInstrument”/><owl:hasValue rdf:resource=”#Guitar”/>
</owl:Restriction></rdfs:subClassOf>
</owl:Class>
Has Value
A Guitarist is a subclass of the set of entities which play at least one instrument that is a Guitar.
<owl:Class rdf:ID=”Parent”><owl:equivalentClass><owl:Restriction><owl:onProperty rdf:resource="#hasChild" /> <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction> </owl:equivalentClass>
</owl:Class>
Minimum Cardinality
Parent is exactly the set of entities which have at least one child.
<owl:Class rdf:ID=”Father”> <owl:intersectionOf rdf:parseType=”Collection”> <owl:Class rdf:about=”#Parent” /> <owl:Class rdf:about=”#Male” /> </owl:intersectionOf></owl:Class>
Intersection and Union
A Father is exactly a Parent who is also Male.
<owl:Class rdf:ID=”Person”> <owl:unionOf rdf:parseType=”Collection”> <owl:Class rdf:about=”#Woman” /> <owl:Class rdf:about=”#Man” /> </owl:unionOf></owl:Class>
Every Person is either Male or Female.
Containers
10
#Parent
#Male
rdf:nil
rdf:List
#Father
owl:intersectionOf
rdf:type
rdf:first
rdf:first
rdf:rest
rdf:rest
rdf:type
rdf:type
<owl:Class rdf:ID=”Man”><owl:intersectionOf rdf:parseType=”Collection”><owl:Class rdf:about=”#Person” /><owl:Class><owl:complementOf rdf:resource=”#Woman” />
</owl:Class></owl:intersectionOf>
</owl:Class>
Complement
Man is every Person who is not a Woman.
<owl:Class rdf:ID=”PrimaryColor”> <owl:oneOf rdf:parseType=”Collection”> <owl:Thing rdf:about=”#Red” /> <owl:Thing rdf:about=”#Blue” /> <owl:Thing rdf:about=”#Yellow” /> </owl:oneOf></owl:Class>
Enumerated Classes
PrimaryColor has exactly three instances: Red, Blue and Yellow.
<owl:Ontology rdf:about=””> <owl:priorVersion rdf:resource=”www.onts.org/myont1” /> <owl:backwardCompatibleWith
rdf:resource=”www.onts.org/myont2”/></owl:Ontology>
<owl:DeprecatedClass rdf:ID="Car"> <owl:equivalentClass rdf:resource="#Automobile"/></owl:DeprecatedClass>
<owl:DeprecatedProperty rdf:ID="hasDriver"> <owl:inverseOf rdf:resource="#drives" /></owl:DeprecatedProperty>
Ontology Versioning
OWL 2: Property Chains
<rdf:Description rdf:about="hasGrandparent"><owl:propertyChainAxiom
rdf:parseType="Collection"><owl:ObjectProperty
rdf:about="hasParent"/><owl:ObjectProperty
rdf:about="hasParent"/></owl:propertyChainAxiom>
</rdf:Description>
The hasGrandparent property is exactly the composition of the hasParent property with itself. In other words, someone’s grandparent is the parent of their parent.
OWL 2: Negative Assertions
<owl:NegativePropertyAssertion><owl:sourceIndividual rdf:resource=“#heflin” /><owl:assertionProperty rdf:resource=“&foaf;knows”
/><owl:targetIndividual
rdf:resource=“&whouse;obama” /></owl:NegativePropertyAssertion>
States the triple #heflin foaf:knows #obama is false