Imagine a little world where there is two balls ("Ball1" and "Ball2") and a box ("Box1"). Then, i know that there is a ball in the box, but i do not know which one. I want to be able to ask the following question: what is in "Box1" and have the answer "Ball", but i encountered some problems.

Using Protege, I create a very little ontology to model this. I create a class: "Object" with two sub-classes: "Ball" and "Box". I define two object properties "isin" and "include" and say that "isin" is the inverse property of "include". Then I create two individuals "Ball1" and "Ball2" with type "Ball" and an individual "Box1" with type "Box and (include some (Balle))"

Then I query the ontology with "isin value Box1", but I only have "Thing" as an answer where i expected "Ball".

Could you help me to see what i miss ?

Thanks for your help.


ps: I've tested to define "Box1" with "Box and (include only (Ball))" and I obtain "Ball" when i query, but it seems to me that does not represent what i want since I know there is a ball in the box but i do not know if there is something else.

asked 17 Jan '13, 02:29

aclodic's gravatar image

accept rate: 0%

There might be other things in the box. :) some means that there's at least one thing in the box that's a ball. all would mean that everything that's in the box is a ball. (EDIT: seems I'm just repeating @utapyngo ... and felt it worth mentioning that I'm struggling not to try make a joke about quantum mechanics here.)

Also, @aclodic, welcome!

(17 Jan '13, 13:38) Signified ♦ Signified's gravatar image

Web Ontology Language is designed to describe the large world, not little ones. That is why it uses the Open Wold Assumption. Just ask yourself, what if someone on the Internet states that Hippopotamus1 isin Box1? There are some techniques however to "close the world" (for example, using oneOf). Pellet ICV also supports closed world assumption. But it is not the standard behaviour. See also this question.

Regarding your example: you don't have to define each box as "Box and (include only (Ball))". Defining the Box class as Object that include only Ball should be enough. But this will not prevent anyone to state that Hippopotamus1 isin Box1. This statement would just mean that (surprisingly!) Hippopotamus1 is not only a Hippopotamus but also a Ball.

permanent link

answered 17 Jan '13, 06:11

utapyngo's gravatar image

accept rate: 19%

edited 17 Jan '13, 06:22

From wikipedia: I define the class "Citizen" and the class "Country". Then properties "isACitizenOf" (and the inverse "istheCountryOf"). I create two individuals with type "Citizen": Mary and Paul. I create an individual "France" with type "Country and (include some (Citizen)"". Considering that for now, i know that there are some Citizens in France (and perhaps other stuff like an Hippopotamus). I just want that my "France" definition, includes the knowledge that i have for the moment AND to be able to get this information then. Is there a mean to do that with ontology and OWP ? Thanks.

(17 Jan '13, 08:06) aclodic aclodic's gravatar image

So you want to infer that there are some citizens in France from the fact that there are some citizens in France? I think you just want to read the "France" definition.

(17 Jan '13, 08:22) utapyngo utapyngo's gravatar image

Assuming your query engine is supporting an entailment regime that is expressive enough to give you the intended conclusions, you may want to use a SPARQL query like this one:

SELECT ?object ?class WHERE {
      :box1  :include  ?object .
      OPTIONAL { ?object  a  ?class .}
    { :box1  :include  [ a ?class ] }

which would give you a binding of variable ?class to :Ball with ?object unbound, plus any other object that may have been declared as being in the box.

permanent link

answered 17 Jan '13, 14:57

Antoine%20Zimmermann's gravatar image

Antoine Zimm... ♦
accept rate: 34%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Jan '13, 02:29

question was seen: 32,101 times

last updated: 17 Jan '13, 14:57