RDFRDFS Limitations Binary ground predicates Only subclass subproperty
RDF-RDFS Limitations • Binary ground predicates • Only subclass & subproperty hierarchy • Domain and range definitions
RDF doesn’t support… • • • Local scope of properties. Disjointness of classes. Boolean combinations of classes. Cardinality restrictions. Special characteristics of properties.
OWL • OWL Full • OWL DL • OWL Lite fully compatible with RDF efficient reasoning easier to grasp/implement
OWL Header <rdf: RDF xmlns: owl ="http: //www. w 3. org/2002/07/owl#" xmlns: rdf ="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#" xmlns: rdfs="http: //www. w 3. org/2000/01/rdf-schema#" xmlns: xsd ="http: //www. w 3. org/2001/XMLSchema#"> <owl: Ontology rdf: about=""> <rdfs: comment>An example OWL ontology</rdfs: comment> <owl: prior. Version rdf: resource="http: //www. mydomain. org/uni-ns-old"/> <owl: imports rdf: resource="http: //www. mydomain. org/persons"/> <rdfs: label>University Ontology</rdfs: label> </owl: Ontology>
Class Element <owl: Class rdf: ID="associate. Professor"> <rdfs: sub. Class. Of rdf: resource="#academic. Staff. Member"/> </owl: Class> Disjointness <owl: Class rdf: about="#associate. Professor"> <owl: disjoint. With rdf: resource="#professor"/> <owl: disjoint. With rdf: resource="#assistant. Professor"/> </owl: Class> Equivalence <owl: Class rdf: ID="faculty"> <owl: equivalent. Class rdf: resource="#academic. Staff. Member"/> </owl: Class>
Predefined Classes every class is a subclass of owl: Thing every class is a superclass of owl: Nothing
Properties • Object properties, relates objects to other objects • Data type properties, relates objects to data type values <owl: Datatype. Property rdf: ID="age"> <rdfs: range rdf: resource="http: //www. w 3. org/2001/XMLSchema#non. Negative. Integer"/> </owl: Datatype. Property> <owl: Object. Property rdf: ID="is. Taught. By"> <rdfs: domain rdf: resource="#course"/> <rdfs: range rdf: resource="#academic. Staff. Member"/> <rdfs: sub. Property. Of rdf: resource="#involves"/> </owl: Object. Property>
Inverse Properties <owl: Object. Property rdf: ID="teaches"> <rdfs: range rdf: resource="#course"/> <rdfs: domain rdf: resource="#academic. Staff. Member"/> <owl: inverse. Of rdf: resource="#is. Taught. By"/> </owl: Object. Property> Equivalent Properties <owl: Object. Property rdf: ID="lectures. In"> <owl: equivalent. Property rdf: resource="#teaches"/> </owl: Object. Property>
Property Restrictions <owl: Class rdf: about="#first. Year. Course"> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#is. Taught. By"/> <owl: all. Values. From rdf: resource="#Professor"/> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class> Every person that teaches a first Year Course is a professor (universal restriction) First-year courses are taught by professors only <owl: Class rdf: about="#math. Course"> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#is. Taught. By"/> <owl: has. Value rdf: resource="#949318"/> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class> Mathematics Courses are taught only by professor #949318
Property Restrictions <owl: Class rdf: about="#academic. Staff. Member"> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#teaches"/> <owl: some. Values. From rdf: resource="#undergraduate. Course"/> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class> For every academic Staff member there exists an undergraduate course that is taught by him (existential restriction) All academic staff members must teach at least one undergraduate course
Cardinality Restriction <owl: Class rdf: about="#course"> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#is. Taught. By"/> <owl: min. Cardinality rdf: datatype="&xsd; non. Negative. Integer"> 1 </owl: min. Cardinality> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class> A course is taught by at least one Person
Cardinality Restriction <owl: Class rdf: about="#department"> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#has. Member"/> <owl: min. Cardinality rdf: datatype="&xsd; non. Negative. Integer"> 10 </owl: min. Cardinality> </owl: Restriction> </rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#has. Member"/> <owl: max. Cardinality rdf: datatype="&xsd; non. Negative. Integer"> 30 </owl: max. Cardinality> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class> A department must have at least 10 members but no more than 30.
Special Properties • owl: Transitive. Property “is taller than”, or “is ancestor of” • owl: Symmetric. Property “is sibling of”. • owl: Functional. Property a property that has at most one value for each object • owl: Inverse. Functional. Property a property for which two different objects cannot have the same value
Special Properties <owl: Object. Property rdf: ID="has. Same. Grade. As"> <rdf: type rdf: resource="&owl; Transitive. Property" /> <rdf: type rdf: resource="&owl; Symmetric. Property" /> <rdfs: domain rdf: resource="#student" /> <rdfs: range rdf: resource="#student" /> </owl: Object. Property>
Boolean Combinations <owl: Class rdf: about="#course"> <rdfs: sub. Class. Of> <owl: Class> <owl: complement. Of rdf: resource="#staff. Member"/> </owl: Class> </rdfs: sub. Class. Of> </owl: Class> <owl: Class rdf: ID="people. At. Uni"> <owl: union. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#staff. Member"/> <owl: Class rdf: about="#student"/> </owl: union. Of> </owl: Class>
Boolean Combinations <owl: Class rdf: ID="faculty. In. CS"> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#faculty"/> <owl: Restriction> <owl: on. Property rdf: resource="#belongs. To"/> <owl: has. Value rdf: resource="#CSDepartment"/> </owl: Restriction> </owl: intersection. Of> </owl: Class>
Boolean Combinations <owl: Class rdf: ID="admin. Staff"> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#staff. Member"/> <owl: Class> <owl: complement. Of> <owl: Class> <owl: union. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#faculty"/> <owl: Class rdf: about="#tech. Support. Staff"/> </owl: union. Of> </owl: Class> </owl: complement. Of> </owl: Class> </owl: intersection. Of> </owl: Class> administrative staff are those staff members that are neither faculty nor technical support staff
Enumerations <owl: Class rdf: ID="weekdays"> <owl: one. Of rdf: parse. Type="Collection"> <owl: Thing rdf: about="#Monday"/> <owl: Thing rdf: about="#Tuesday"/> <owl: Thing rdf: about="#Wednesday"/> <owl: Thing rdf: about="#Thursday"/> <owl: Thing rdf: about="#Friday"/> <owl: Thing rdf: about="#Saturday"/> <owl: Thing rdf: about="#Sunday"/> </owl: one. Of> </owl: Class>
Instances (RDF) <rdf: Description rdf: ID="949352"> <rdf: type rdf: resource="#academic. Staff. Member"/> </rdf: Description> or <academic. Staff. Member rdf: ID="949352"/> We can also provide further details, such as: <academic. Staff. Member rdf: ID="949352"> <uni: age rdf: datatype="&xsd; integer">39</uni: age> </academic. Staff. Member>
Instances (RDF) Just because two instances have a different name or ID does not imply that they are different individuals. To ensure that different individuals are indeed recognized as such, we must explicitly assert their inequality: <lecturer rdf: ID="949318"> <owl: different. From rdf: resource="#949352"/> </lecturer> to state the inequality of a large number of individuals: <owl: All. Different> <owl: distinct. Members rdf: parse. Type="Collection"> <lecturer rdf: about="#949318"/> <lecturer rdf: about="#949352"/> <lecturer rdf: about="#949111"/> </owl: distinct. Members> </owl: All. Different>
Layering of OWL • • OWL Full OWL DL – – – • Vocabulary partitioning. Explicit typing. Property separation. No transitive cardinality restrictions. Restricted anonymous classes. OWL Lite – The constructors owl: one. Of, owl: disjoint. With, owl: union. Of, owl: complement. Of, and owl: has. Value are not allowed. – Cardinality statements can only be made on the values 0 or 1 and no longer on arbitrary nonnegative integers. – owl: equivalent. Class statements can no longer be made between anonymous classes but only between class identifiers.
• open-world assumption – we may not deduce falsity from the absence of truth • non-unique-name assumption – Just because two instances have a different name or ID does not imply that they are different individuals
Παραδείγματα από travel. owl <owl: Class rdf: ID="Sunbathing"> <rdfs: sub. Class. Of> <owl: Class rdf: about="#Relaxation"/> </rdfs: sub. Class. Of> </owl: Class> <owl: Class rdf: ID="Quiet. Destination"> <owl: equivalent. Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: ID="Destination"/> <owl: Class> <owl: complement. Of> <owl: Class rdf: about="#Family. Destination"/> </owl: complement. Of> </owl: Class> </owl: intersection. Of> </owl: Class> </owl: equivalent. Class> <rdfs: comment rdf: datatype="http: //www. w 3. org/2001/XMLSchema#string"> A destination that is not frequented by noisy families. </rdfs: comment> </owl: Class>
Παραδείγματα από travel. owl <owl: Class rdf: ID="Backpackers. Destination“> <owl: equivalent. Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Destination"/> <owl: Restriction> <owl: on. Property> <owl: Object. Property rdf: about="#has. Accommodation"/> </owl: on. Property> <owl: some. Values. From> <owl: Class rdf: about="#Budget. Accommodation"/> </owl: some. Values. From> </owl: Restriction> <owl: some. Values. From> <owl: Class> <owl: union. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Sports"/> <owl: Class rdf: about="#Adventure"/> </owl: union. Of> </owl: Class> </owl: some. Values. From> <owl: on. Property> <owl: Object. Property rdf: about="#has. Activity"/> </owl: on. Property> </owl: Restriction> </owl: intersection. Of> </owl: Class> </owl: equivalent. Class> <rdfs: comment rdf: datatype="http: //www. w 3. org/2001/XMLSchema#string"> A destination that provides budget accommodation and offers sport or adventure activities. </rdfs: comment> </owl: Class>
Παραδείγματα από african. owl <owl: Class rdf: ID="herbivore"> <owl: equivalent. Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: ID="animal"/> <owl: Restriction> <owl: some. Values. From> <owl: Class> <owl: union. Of rdf: parse. Type="Collection"> <owl: Class rdf: ID="plant"/> <owl: Restriction> <owl: all. Values. From> <owl: Class rdf: about="#plant"/> </owl: all. Values. From> <owl: on. Property> <owl: Transitive. Property rdf: ID="is-part-of"/> </owl: on. Property> </owl: Restriction> </owl: union. Of> </owl: Class> </owl: some. Values. From> <owl: on. Property> <owl: Object. Property rdf: ID="eats"/> </owl: on. Property> </owl: Restriction> </owl: intersection. Of> </owl: Class> </owl: equivalent. Class> </owl: Class> <owl: Class rdf: about="#carnivore"> <owl: equivalent. Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Restriction> <owl: on. Property> <owl: Transitive. Property rdf: about="#is-part-of"/> </owl: on. Property> <owl: some. Values. From> <owl: Class rdf: about="#animal"/> </owl: some. Values. From> </owl: Restriction> <owl: Class rdf: about="#animal"/> </owl: intersection. Of> </owl: Class> </owl: equivalent. Class> </owl: Class> <owl: Class rdf: ID="lion"> <rdfs: sub. Class. Of> <owl: Class rdf: ID="carnivore"/> </rdfs: sub. Class. Of> <owl: Restriction> <owl: all. Values. From rdf: resource="#herbivore"/> <owl: on. Property> <owl: Object. Property rdf: about="#eats"/> </owl: on. Property> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class>
Παραδείγματα από african. owl <owl: Object. Property rdf: about="#eats"> <owl: inverse. Of> <owl: Object. Property rdf: about="#eaten-by"/> </owl: inverse. Of> <rdfs: domain rdf: resource="#animal"/> </owl: Object. Property> <owl: Object. Property rdf: about="#eaten-by"> <owl: inverse. Of rdf: resource="#eats"/> <rdfs: range rdf: resource="#animal"/> </owl: Object. Property> <owl: Transitive. Property rdf: about="#is-part-of"> <rdf: type rdf: resource="http: //www. w 3. org/2002/07/owl#Object. Property"/> </owl: Transitive. Property>
Παραδείγματα από genrations. owl <owl: Class rdf: ID="Grand. Father"> <owl: equivalent. Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Person"/> <owl: Restriction> <owl: on. Property> <owl: Object. Property rdf: about="#has. Child"/> </owl: on. Property> <owl: some. Values. From> <owl: Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Person"/> <owl: Restriction> <owl: some. Values. From rdf: resource="#Person"/> <owl: on. Property> <owl: Object. Property rdf: about="#has. Child"/> </owl: on. Property> </owl: Restriction> </owl: intersection. Of> </owl: Class> </owl: some. Values. From> </owl: Restriction> <owl: on. Property> <owl: Functional. Property rdf: ID="has. Sex"/> </owl: on. Property> <owl: has. Value> <Sex rdf: ID="Male. Sex"/> </owl: has. Value> </owl: Restriction> </owl: intersection. Of> </owl: Class> </owl: equivalent. Class> </owl: Class> <owl: Class rdf: ID="Sibling"> <owl: equivalent. Class> <owl: intersection. Of rdf: parse. Type="Collection"> <owl: Class rdf: about="#Person"/> <owl: Restriction> <owl: some. Values. From rdf: resource="#Person"/> <owl: on. Property> <owl: Symmetric. Property rdf: about="#has. Sibling"/> </owl: on. Property> </owl: Restriction> </owl: intersection. Of> </owl: Class> </owl: equivalent. Class> </owl: Class>
- Slides: 28