20
Alex Bartrolí 1 Institut für Informatik Betriebliche Informationssysteme OWL-Sprachelemente

Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Embed Size (px)

Citation preview

Page 1: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 1

Institut für InformatikBetriebliche Informationssysteme

OWL-Sprachelemente

Page 2: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 2

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• Einführung

• Classes Class Descriptors Class Axioms

• Properties • Individuals

Class-Membership und Property-Values Individuals Identity

Gliederung

Page 3: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 3

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• Ein OWL-Dokument besteht aus einem fakultativen Header und aus Class, Properties und Individuals.

• Keine Ordnung der OWL-Sprachelemente eines Owl-Dokumentes.

• Ein OWL-Class enthält verschiedene Resources mit ähnlichen Eigenschaften.

• Class Extension: Gruppe von Individuals mit einer OWL-Class verbunden.

• Individuals einer Class-Extension = “Instances der Class”

• Properties verbinden zwei Individuals oder ein Individual mit einer Data Value.

Einführung

Page 4: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 4

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• Es gibt zwei grosse Constructors einer Class.

- Class Description - Class Axioms

Class Description beschreibt eine Class.Dafür gibt sie entweder der Class ihren Namen oder spezifiert die Extension einer anonymous Class.

Class Axioms enthält additional Komponenten, die benötige oder zusätzliche Information über eine Class geben.

Classes

Page 5: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 5

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• Eine Class Description beschreibt eine OWL-Class.• 6 Arten von Class Descriptions:

- Ein Class Identifier (eine URI-Referenz). - Enumeration von den Individuals, die die Class-Extension zusammenstellen.

<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>

Class Descriptions

Page 6: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 6

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

6 Arten von Class Descriptions:

- Intersection oder Union von 2 oder mehreren Class description. Complement einer Class Description.

Sind äquivalent zu den AND, OR und NOT in der Prädikatslogik.

<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>

Class Descriptions

Page 7: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 7

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• 6 Arten von Class Descriptions

- Properties restrictions Beschreib eine anonymus Class. Diese Class besteht aus allen Individuals, die

die Einschränkung der Property befriedigen.

2 Arten von Properties restrictions: values constraints und cardinality constraints

value constraints schränkt die Range der Property ein, wenn die Property in dieser particular class description angewendet wird.

- owl: allValuesFrom - owl: someValuesFrom - owl: hasValue

Beispiel owl:allValuesFrom

<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" />

<owl:allValuesFrom rdf:resource="#Human" /> </owl:Restriction>

Class Descriptors

Page 8: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 8

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• 6 Arten von Class Descriptions

- Properties restrictions Beschreib eine anonymus Class, die aus allen Individuals, die die

Einschränkung der Property befriedigen, besteht. owl:allValuesFrom owl:someValuesFrom owl:hasValue

Beispiel owl:someValuesFrom <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:someValuesFrom rdf:resource="#Physician" /> </owl:Restriction>

Beispiel owl:hasValue

<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:hasValue rdf:resource="#Clinton" /> </owl:Restriction>

Class Descriptors

Page 9: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 9

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

- Properties restrictions Beschreib eine anonymus Class, die aus allen Individuals, die die

Einschränkung der Property befriedigen, besteht.

cardinality constraints schränkt die Nummer von Values ein, die eine Property haben kann. - owl:maxCardinality - owl:minCardinality - owl: Cardinality

Beispiel owl:maxCardinality

<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:maxCardinality

rdf:datatype="&xsd;nonNegativeInteger">2</owl:maxCardinality> </owl:Restriction>

Class Descriptions

Page 10: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 10

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• Class Axioms enthält zusätzliche Sprachelemente, die benötigte und/oder zusätliche Eigenschaften einer Class geben.

• 3 Sprachelementen die class descriptions in class axioms kombinieren rdfs:subClassOf, owl:equivalentClass und owl:disjointWith.

- rdfs:subClassOf sagt dass die Class-Extension einer Class- description ist subset von einer Class-Extension einer anderen Class- description. - owl:equivalentClass Class-Extension einer Class-description hat die gleiche Class-extension einer anderen Class-Description.

<owl:Class rdf:about="#US_President"> <equivalentClass rdf:resource="#PrincipalResidentOfWhiteHouse"/> </owl:Class>

.

Class Axioms

Page 11: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 11

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

- owl:disjointWith die Class-Extension einer Class-Description hat keine Member gemeinsam mit der Class- Extension einer anderen Class-Description.

<owl:Class rdf:about="#Man"> <owl:disjointWith rdf:resource="#Woman"/> </owl:Class>

• Die drei Constructors sind Properties, die eine Class als Domain und Range haben

Class Axioms

Page 12: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 12

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

• Es gibt zwei grosse Kategorien von Properties - Object Properties: verbindet Individuals mit Individuals. - Datatype Properties: verbindet Individuals mit Data values.

• Owl unterstütz die folgenden property-axioms Construct. - RDF Schema Constructs - Logische property characteristics - Relationen von anderen Properties - Global candinality constraints on Properties - Relationen von anderen Properties

Properties

Page 13: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 13

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

Arten von Property-axioms Construct

- RDF Schema Constructs: rdfs:subPropertyOf rdfs:domain rdfs:range

- logische property characteristics: owl:SymmetricProperty owl:TransitiveProperty Beispiel owl:Transitive Property

<owl:ObjectProperty rdf:ID="subRegionOf"> <rdf:type rdf:resource="&owl;TransitiveProperty"/> <rdfs:domain rdf:resource="#Region"/> <rdfs:range rdf:resource="#Region"/> </owl:ObjectProperty>

Properties

Page 14: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 14

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

Arten von Property-axioms Construct

- Relationen von anderen Properties

- owl:equivalentProperty kann genutzt werden, wenn zwei Properties die gleiche Property-extension haben. Diese ist nur in OWL Full erlaubt, weil sie Properties als Individuals behandelt.

- owl:inverseOf Properties haben eine Richtung von Domain nach Range, aber manchmals brauchen wir beide Richtungen. owl:inverseOf hat eine ObjectProperty als Domain und Range. <owl:ObjectProperty rdf:ID="hasChild"> <owl:inverseOf rdf:resource="#hasParent"/> </owl:ObjectProperty>

Properties

Page 15: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 15

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

Arten von Property-axioms Construct

- Global candinality constraints on Properties

- owl:functionalProperty Diese Property kann nur einen Wert “y” für jede Instanz “x” haben. ObjectProperty und datatypeProperty können als owl:functionalProperty deklariert werden.

<owl:ObjectProperty rdf:ID="husband"> <rdf:type rdf:resource="&owl;FunctionalProperty" /> <rdfs:domain rdf:resource="#Woman" /> <rdfs:range rdf:resource="#Man" /> </owl:ObjectProperty>

- owl:InversefunctionalProperty wenn eine Property als inverse-functional deklariert ist, gibt das Object einer Property eindeutig das Subject(Individual) der Property.

InverseFunctionalProperty sind per Definition ObjectProperties

Properties

Page 16: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 16

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

InverseFunctionalProperty Beipiel:

- hasUSSocialSecurityNumber ist FunctionalProperty und

- isTheSocialSecurityNumberFor ist seine InverseFunctionalProperty

- Zwei verschiedene Individuals haben die gleiche Value in dieser isTheSocialSecurityNumberOf-Property.

- Sie sind gleich. “same”

- Information über sie kann aus verschiedenen Resources zusammengehangen werden.

- Man kann diese Aggregation nutzen, um verschiedene Informationen, die in keiner Resource sind, zu repräsentieren.

Properties

Page 17: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 17

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

Individuals können auf 2 verschiedene Weisen deklariert werden.

- Individuals werden definiert durch Anweisung von seiner Class- Membership und durch die Values seiner properties. - Individuals werden definiert durch seine Identity

Beispiel: Anweisungen von seiner Class-Memberschip und die Values seiner properties.

<Opera rdf:ID="Tosca"> <hasComposer rdf:resource="#Giacomo_Puccini"/> <hasLibrettist rdf:resource="#Victorien_Sardou"/> <hasLibrettist rdf:resource="#Giuseppe_Giacosa"/> <hasLibrettist rdf:resource="#Luigi_Illica"/> <premiereDate rdf:datatype="&xsd;date">1900-01- 14</premiereDate> <premierePlace rdf:resource="#Roma"/> <numberOfActs rdf:datatype="&xsd;positiveInteger">3</numberOfActs> </Opera>

Individuals

Page 18: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 18

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

- Individuals werden definiert durch seine Identity.

Bei OWL keine unique names assumption. Deswegen versieht OWL die 3 Constructs mit der Individuals-Identität. - owl:sameAs - owl: differentFrom

- owl: allDiferent

- owl:sameAs stellt sicher, dass 2 URI-Referenzen die gleiche Individuals referenzieren. <rdf:Description rdf:about="#William_Jefferson_Clinton"> <owl:sameAs rdf:resource="#BillClinton"/> </rdf:Description>

Individuals

Page 19: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 19

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

- Individuals definiert durch seine Identity.

Bei OWL keine unique names assumption. Deswegen versieht OWL die 3 Constructs mit der Individuals-Identität. - owl:sameAs - owl: differentFrom

- owl: allDiferent

- owl:differentFrom stellt sicher, dass 2 URI-Referenzen verschiedene Individuals referenzieren.

<Opera rdf:ID="Don_Giovanni"/>

<Opera rdf:ID="Nozze_di_Figaro"> <owl:differentFrom rdf:resource="#Don_Giovanni"/> </Opera>

<Opera rdf:ID="Cosi_fan_tutte"> <owl:differentFrom rdf:resource="#Don_Giovanni"/> <owl:differentFrom rdf:resource="#Nozze_di_Figaro"/> </Opera>

Individuals

Page 20: Institut für Informatik Betriebliche Informationssysteme Alex Bartrolí1 OWL-Sprachelemente

Alex Bartrolí 20

Owl SprachelementeInstitut für InformatikBetriebliche Informationssysteme

- Individuals definiert durch seine Identity.

Bei OWL keine unique names assumption. Deswegen versieht OWL die 3 Constructs mit der Individuals-Identität. - owl:sameAs - owl: differentFrom

- owl: allDiferent

- owl:allDifferent In einer Ontologie, wo es eine unique-names assumption gibt, wird owllDifferent genutzt, um zu sagen,dass alle Individuals der owl:allDifferent paarweise disjoint sind.

<owl:AllDifferent> <owl:distinctMembers rdf:parseType="Collection"> <Opera rdf:about="#Don_Giovanni"/> <Opera rdf:about="#Nozze_di_Figaro"/> <Opera rdf:about="#Cosi_fan_tutte"/> <Opera rdf:about="#Tosca"/> <Opera rdf:about="#Turandot"/> <Opera rdf:about="#Salome"/> </owl:distinctMembers> </owl:AllDifferent>

Individuals