Docsity

Excercises on Owl, Exercises of Animal Anatomy and Physiology

Partial preview of the text

Download Excercises on Owl and more Exercises Animal Anatomy and Physiology in PDF only on Docsity!

Exercises on OWL

Riccardo Rosati

Corso di Laurea Magistrale in Ingegneria Informatica

Sapienza Università di Roma

Knowledge Representation and Semantic Technologies

Exercise 1 Write an OWL ontology representing the following statements:

  • URI1 and URI2 are classes
  • URI3 is a property
  • URI4 is an instance of class URI1, and URI5 and URI6 are instances of class URI
  • URI3 has domain URI1 and range URI
  • (URI6,URI4) is an instance of property URI

Exercise 1: Solution (continued) SubClassOf( ObjectSomeValuesFrom( ObjectInverseOf(myns:URI3) owl:Thing) myns:URI2) ObjectPropertyAssertion(myns:URI3 myns:URI myns:URI4)

Exercise 2 Write an OWL ontology that formalizes knowledge about the domain of people, in particular the classes person, man, woman, and the properties parent, mother, father. Try to express all the knowledge you have about such classes and properties (e.g.: every man is a person, every woman is a person, every mother is a woman, etc.).

Exercise 2: Solution (continued) SubClassOf( ObjectSomeValuesFrom( ObjectInverseOf(myns:hasFather) owl:Thing) myns:man) (every father is a man) ClassAssertion(myns:man myns:Joe) (Joe is a man) ObjectPropertyAssertion(myns:hasMother myns:Joe myns:Ann) (Ann is the mother of Joe)

Exercise 3 Add to the ontology of Exercise 2 the following information:

  • Man and woman are disjoint classes
  • Every person has a mother
  • Every person has a father
  • Every person has exactly two parents
  • Every person has a father, who is a man
  • Every person has a mother, who is a woman
  • Every person has a father and a mother

Exercise 3: Solution (continued)

  1. SubClassOf( myns:person ObjectExactCardinality(2 myns:hasParent)) (every person has exactly two parents)
  2. SubClassOf( myns:person ObjectSomeValuesFrom(myns:hasFather myns:man)) (every person has a father who is a man)
  3. SubClassOf( myns:person ObjectSomeValuesFrom(myns:hasMother myns:woman)) (every person has a mother who is a woman)

Exercise 3: Solution (continued)

  1. SubClassOf( myns:person ObjectIntersectionOf( ObjectSomeValuesFrom(myns:hasMother owl:Thing) ObjectSomeValuesFrom(myns:hasFather owl:Thing))) (every person has a mother and a father) Notice that axiom 7) is equivalent to the above pair of axioms 2) and 3)