I want to identify when an object contains the intersection of two properties, as opposed to either property.
Example:
object:
A (has_disposition some disposition_A; has_disposition some disposition_B)
B (has_disposition some disposition_B; disjoint with A)
disposition:
disposition_A
disposition_B
disposition_AB (EquivalentTo: disposition and ((disposition_A) and (disposition_B))
The object property has_disposition takes object as its domain and disposition as its range.
The following DL Query in Protege using HermiT produces nothing:
has_disposition some disposition_AB
The following queries give the correct answer:
has_disposition some disposition_A (gives A)
has_disposition some disposition_B (gives A, B)
The following actions did not help:
Changing parentheses in the EquivalentTo expression.
Declaring nothing disjoint.
Declaring each part of the EquivalentTo expression separately.
I was unable to find examples of a disposition being defined as the intersection of other dispositions in OGMS, the Infectious Disease Ontology, or the Cardiovascular Disease Ontology.
No results for disposition_AB means the equivalent axiom cannot be matched against the individuals you have.
I'm not clear on where the disposition type would come from for A and B - I suspect that's not being inferred as you expect.
Related
In protege a reflexive property is assigned to all individuals relgardless of domain and range and the class to which individuals belongs.
so what is the use of this restriction?
P.S: lets say there is three individuals:
NamedIndividual( :John )
NamedIndividual( :alex )
NamedIndividual( :BMW )
and an object proeprty:
ObjectProperty( :hasFriend )
ReflexiveObjectProperty(:hasFriend)
running pellet deduce that :
BMW hasFriend BMW
This inference is conceptually meaningless
Papers like The even more irresistible SROIQ and Foundations of Description Logics point out that reflexive and irreflexive properties are closely related to the exists r.Self concept. I.e. Narcissist can be defined as Narcissist \sqsubseteq loves.Self.
The SROIQ paper actually mentions that the main use cases for reflexive and irreflexive properties are limited and only make sense when used along with cardinality restrictions. I.e. if you define PopularPerson as someone with at least 2 friends, and hasFriend is reflexive, then by asserting an individual has 1 known friend will result in that individual being classified as a PopularPerson because the individual is already assumed to be its own friend.
Interestingly, the paper also mentions that reflexive(r) is equivalent to adding the GCI top \sqsubseteq exists r.Self to the TBox. Personally for me this is more intuitive and provides the control I think you seem to want to achieve. In particular this allows you to replace \top with whatever class of your choice. A similar equivalent exists for irreflexive properties.
I have an OWL2 ontology combining technological processes and numerical models. I need to find out, which process might be modeled with which model. I introduced Requirements, that areFulfilled by Process while Models hasRequirements. I am able to do it with individuals, but not classes.
I am using Protege 5.1, Fact++ reasoner.
Classes:
Processes
Proc1 EquivalentTo: Processes and (fulfillRestriction exactly 1 Req1)
Requirements
Req1 Equivalent to Requirements and (hasTemperature exactly 1 (temperature only xsd:double[ "5.0"^^xsd:double , <= "150.0"^^xsd:double])
Models
Model1 EquivalentTo: Models and (hasRestriction exactly 1 Req1)
Now I have an object property:
ObjectProperty: testIsModelOf
SubPropertyChain: hasRestriction o inverse (fulfillRestriction)
I defined individuals:
Individual: mod1
Types: Model1
Facts: hasRestriction requir1
Individual: requir1
Types: Req1
Individual: process1
Types:
Proc1
Facts: fulfillRestriction requir1
Asking for (with DLQuery):
Models that testIsModelOf some Proc1
If I define individuals for those three classes and define object properties between them, the result is as expected (DLQuery says mod1 is an instance of Models that testIsModelOf some Proc1). I expected that I will also get the Model1 class as a Direct Subclass (or equivalent class?) of the query result, but it does not happen. Is this possible to get the class, not only individual - without SWRL?
I have MultiPetsOwner class in my ontology, and with the current set up I expect 2 Instances to be detected for it (Harry and Alex).
But when I run the DL Query "hasPet min 2 Animal" for it, there are no corresponding instances.
At the same time, the DL Query "hasPet some Animal" seems to work - it gives me the PetOwner class instances I expected.
What am I doing wrong? If the "hasPet min 2 Animal" query is incorrect, what should I use instead to get all the MultiPetsOwners?
The contents of my .owl file can be found here: http://pastebin.com/5xcriLRE
In OWL there is no Unique Names Assumption (UNA), which means two individuals with a different URI are not necessarily different from each other. This means, a standard OWL reasoner, which is what's used for DL queries can't answer your query without having the information in your ontology that e.g. two animals a and b are not the same individuals (via owl:differentFrom):
Your ontology:
hasPet(x, a), Animal(a)
hasPet(x, b), Animal(b)
-> Q: hasPet min 2 Animal?
-> A: NO RESULT
With the additional OWL axiom
hasPet(x, a), Animal(a)
hasPet(x, b), Animal(b)
a ≠ b
-> Q: hasPet min 2 Animal?
-> A: x
Alternative way: Use SPARQL as query language
SELECT ?x WHERE {
?x :hasPet ?pet .
?pet a :Animal
} GROUP BY ?x
HAVING(COUNT(?pet) >= 2)
Note, this query might probably not take needed inferences into account.
OWL is working in Open World Assumption. In your case, that means than it is not assumed the individuals are different. You have to assert it explicitly. In Protégé, this is done when all individuals are selected, in your case all animals, and then Edit -> "Make all individuals different".
If you run the hasPet min 2 Animal it will give you the expected results, but you can see them already after running the reasoner in the inferred instances of the class MultiPetsOwner.
I'm using Protege 4.3 to create my first ontology, so I encountered a few problems
let's say we have the classes Person and Department and the properties employs and hasPart
So the problem is: I defined some classes like BigShopas Equivalent To employs min 6 Person and hasPart some Department but when I activate the reasoner I don't get the results I'm waiting for, I also tried SubClass Of with the same two restrictions but nothing happened
Any idea why?
In OWL, is it possible to query a class that does not have a property?
Suppose I have an object property R and I want to retrieve all classes that do not have the property R. Also, suppose that I have already closed all classes with closures.
I was trying this:
suppose the propety in question is hasProperty, my query was this
hasProperty only Nothing
But it doesn't work
What do you mean by "class that does not have a property"?
Semantically, a class is a set of individuals and a property is a set of pairs of individuals. Given these two sets, what do you mean by "class has / has not a property"?
Regarding your example query
hasProperty only Nothing
lets rewrite it a bit so that we can think about it in natural language. This gives better intuition about the meaning of this query.
First lets rename hasProperty to follows (or whatever English verb), then we have:
follows only Nothing
This is semantically equivalent to
follows only (not Thing)
which is semantically equivalent to
not (follows some Thing)
Now we have gotten rid of the only which is a confusing part of OWL and is better avoided. So now we can verbalize the query in English as:
those who do not follow anything
or
who does not follow anything?
or more formally
which individuals of the ontology are known
not to have a follow relationship to any other individual
E.g. if your ontology states that
John does not follow Mary.
John does not follow himself.
Every individual in the ontology is either John or is Mary.
then John will be the answer to the above query.
You can also get a named class as the query answer if the asked restriction holds for a (named) group of individuals. In any case, the following must hold: if you asserted that the answer (or a member of it) does have a follow-relation to some individual then it would render the ontology inconsistent.
OWL does not have any means for querying the data. SPARQL is used for that. So the SPARQL query to find all class definitions that do not have the property :R would be:
SELECT ?cls
WHERE {
?cls a owl:Class .
FILTER NOT EXISTS {?cls :R ?o}
}