Search code examples
owlontologyprotege

using keyword only in protege returns nothing


I have a class Movie which has instances individuals like 2515159 which represent movies and a class named Country which has instances individuals like UK,USA,Italy,Austria and other countries. Also I have a role hasCountry which matches the countries in movies, for example:

2515159 hasCountry Italy
2515159 hasCountry Austria

(A movie can have many countries)

Now the problem: I want to make a subclass of Movie named EuropeanMovie which will have instances the individuals that have only European countries.

After creating in protege the subclass of Movie named EuropeanMovie I tried to place Equivalent To:

Movie and hasCountry only {Austria,Italy, ...all the EU countries...}

also tried:

  Movie
   and hasCountry some (
          {Austria,Italy, ...all the EU countries...}
          and   not  {USA, and other non EU countries...} )

But the above using only keyword does not return anything while there are movie with only EU countries like the example in the beginning.

After a lot of search I didn't found much but I think this may has to do with owl's open world assumption but I don't understand that.

If anyone could give any advice it would be very helpful, thanks !!!


Solution

  • Indeed that's a consequence of the Open World Assumption(OWA). OWA means that there might be other knowledge not described in the ontology (but not contradicting to it). In particular, if the ontology contains

    2515159 hasCountry Italy
    2515159 hasCountry Austria
    

    it does not mean that there are no other countries in the movie. It might easily be

    2515159 hasCountry USA
    

    not mentioned in the ontology. That's why the requests with only fails to find any movies for you.

    In order to get correct answers to the only queries you have to modify your ontology to ensure that there are no countries in the film except for the explicitly mentioned in the ontology.

    For example, it is possible to add only statements to state that the knowledge in the ontology is complete. By adding

    {2515159} subClassOf hasCountry only {Italy, Austria}

    one can ensure that there are no other countries in the movie 2515159.