cjauvin
cjauvin

Reputation: 3693

OWL type inference with a restriction

I am studying the notion of OWL restrictions with Protege 4 using FaCT++ and a trivial ontology. Suppose I have an individual foo of class Something:

:Something a owl:Class.
:foo a :Something, owl:NamedIndividual.

and another class defined from a restriction on the hasBar property:

:hasBar a owl:ObjectProperty.
:SomethingElse owl:equivalentClass [a owl:Restriction;
                                    owl:onProperty :hasBar;
                                    owl:allValuesFrom :Something].

If I assert that:

:x :hasBar :foo.

why can't I infer from it that x is a SomethingElse (via the fact that foo is a Something)? The only way I can make it work is if the range of hasBar is defined:

:hasBar a owl:ObjectProperty;
        rdfs:range :Something.

But I'd like to avoid that, because it puts a constraint on what can be the subject of hasBar (which causes me further trouble).

Upvotes: 2

Views: 1209

Answers (1)

loopasam
loopasam

Reputation: 3136

I think it is simpler to reason over real examples, let's consider the following knowledge base:

:eats rdf:type owl:ObjectProperty .

:Vegetable rdf:type owl:Class ;
       rdfs:subClassOf owl:Thing .

:Vegetarian rdf:type owl:Class ;
        owl:equivalentClass [ rdf:type owl:Restriction ;
                              owl:onProperty :eats ;
                              owl:allValuesFrom :Vegetable
                            ] .

:Carrot rdf:type :Vegetable ,
             owl:NamedIndividual .

:John rdf:type owl:NamedIndividual , owl:Thing ;
      :eats :carrot .

You have some equivalences with your example: hasBar is eats, Vegetarian is SomethingElse, Vegetable is Something, foo is carrot and finally x is John.

Now you would like to infer that John is a Vegetarian (= x is SomethingElse).

It makes sense that it doesn't work with an owl:allValuesFrom. What you are saying here is that all instances of vegetarian, if they have a property, they must have Vegetable in range. So from that you could deduce that carrot is a vegetable for example, assuming you would know that John is a vegetarian in the first place.

It makes sense in natural language too: In your ontology you only know that John eats a carrot, this doesn't automatically make him a vegetarian (non-vegetarian people eat also carrots).

You could use a owl:someValuesFrom instead of a owl:allValuesFrom. This way, you would define every vegetarian has someone that eats some vegetable. In this case if we know that John eats a carrot, therefore he would be classified as vegetarian by the reasoner, based on your definition of the concept vegetarian.

Universal (allValuesFrom) and existential (someValuesFrom) restrictions are complicated to understand, there is often no right or wrong solution, it mostly depends to what you want to achieve.

Upvotes: 3

Related Questions