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?
Related
I would like to create a new class PossibleNoduleFinding, grouping some individuals from another class Finding based on the individual name. Finding has a relationship hasFinding with each individual. Example maybe individual name nodule.
I'm trying:
Class: PossibleNodueFinding
Annotations: [in root-ontology]
rdfs:label "PossibleNoduleFinding"#en
SubClassOf: [in root-ontology]
SoftwareMapping
EquivalentTo: (Finding and hasFinding value nodule),
EquivalentTo: (Finding and hasFinding value density)
The Owl editor is not recognizing this syntax.
I try to create an ontology in OWL, using Protégé 5.5.0. No I have a little trouble with inferred classes.
I have three classes: Agents and as subclasses Groups and Persons. Persons can be members of Groups. Now I want to create two inferred classes: a) "Members of groups" and b) "Not members of groups" (both as subclasses of Person)
I was successful with a), using the axiom equivalent class: Person and member_of some Group.
I created one individual, which is a person and member of a group and it was inferred to be member of the class "Members of groups".
Now I'm stuck with b). I tried several options for the equivalent class, for example:
Person and member_of max 0 Group
Or: Person and member_of exactly 0 Group
Or: Person and not member_of some Group
I created an individual which is a person but no groupmember. But the reasoner does not agree with me about the fact, that this individual should belong to the inferred class "Not members of groups".
What did I do wrong?
One way to achieve this in OWL, using your Person and not member_of some Group,
is to define a MemberOfGroup class that is defined as you suggested. Then define a NotMemberOfGroup class, that is disjoint with the MemberOfGroup class. If you now define your individual to be of type Person, as well as of type not member_of some Group, then your individual will be classified as belonging to the NotMemberOfGroup class.
The reason why you have to do this, is that OWL uses the open world assumption and hence it can only make inferences about things it knows for sure. I.e. saying that the individual is a Person, while making no statement regarding member_of provides the reasoner with zero explicit info to determine that the individual either belongs or does not to a group.
The other option is to use SHACL/SHEX/SPIN.
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.
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?