This is my ontology created with protege 5 .
If i make cl1 and cl2 disjoint, then the ontology is being inconsistent , but if i uncheck is_friend_of reflexive , the ontology is not inconsistent any more . whats wrong with my ontology ?
I want only cl1 class individuals have is_friend_of property.
Reflexivity of :is_friend_of is essential for inconsistency.
Take a look at Reasoner > Inconsistent ontology explanation :
I'll try to translate this explanation into (poor) English:
Since :is_friend_of is reflexive, then :c2_inst :is_friend_of :c2_inst.
Since the domain of :is_friend_of is :cl1, then c2_inst rdf:type :cl1.
Also, c2_inst rdf:type :cl2.
But :cl1 and :cl2 are disjoint — contradiction.
In fact, the domain of every reflexive property is owl:Thing.
As a workaround, you could uncheck reflexivity of is_friend_of and define :cl1 in this way:
Class: cl1
EquivalentTo:
is_friend_of some owl:Thing,
is_friend_of some Self
Related
There is a class MotionPoint equivalent to (Protege syntax)
(geosparql:asWKT exactly 1 rdfs:Literal)
and (:hasSpeed exactly 1 rdfs:Literal)
and (:hasTimestamp exactly 1 rdfs:Literal)
and (:locatedInRoadElement exactly 1 otn:Road_Element)
And also there is a subclass OverspeedingMotionPoint equivalent to
:MotionPoint
and (:overspeedingByValue exactly 1 rdfs:Literal)
So, having an individual X a owl:Thing with relations from the MotionPoint definition Protege Pellet reasoner infers that X is the MotionPoint.
Adding overspeedingByValue relation to X makes Pellet infers that X is the OverspeedingMotionPoint.
Finally, I imported this ontology into GraphDB, chose OWL2-RL rules set, but can not get a conclusion that X is the OverspeedingMotionPoint, it says X is only MotionPoint.
Please, help me to understand what I am doing wrong..
I think that what you ask for is in OWL DL. GraphDB doesn't support DL, it supports RL and QL.
If (some of) your props are unique per class then you can easily infer types with RDFS reasoning, eg:
:MotionPoint a rdfs:Class;
rdfs:subClassOf geo:Geometry.
:OverspeedingMotionPoint a rdfs:Class;
rdfs:subClassOf :MotionPoint.
# geo:asWKT is subprop of geo:hasSerialization attached to geo:Geometry,
# so is inherited by :MotionPoint
:hasSpeed a owl:DatatypeProperty;
rdfs:domain :MotionPoint; rdfs:range xsd:decimal.
:overspeedingByValue a owl:DatatypeProperty;
rdfs:domain :OverspeedingMotionPoint; rdfs:range xsd:decimal.
:hasTimestamp a owl:DatatypeProperty;
rdfs:domain :MotionPoint; rdfs:range xsd:dateTimeStamp.
:locatedInRoadElement a owl:ObjectProperty;
rdfs:domain :MotionPoint; rdfs:range :RoadElement.
And if all your props are attached to multiple classes: would it be too much trouble to assert the type when you record an instance?
Could OWL reasoner inherit ranges of data properties from parent properties?
For example, there is the data property "hasEventYear".
It has the domain "Person" and the range "xsd:integer".
When the subproperty "hasBirthYear" is added
the reasoner tells that this subproperty has the domain "Person".
About the range it tells nothing.
Is it normal?
The code below has been tested on Protege 5 and Hermit:
Declaration(Class(:Person))
Declaration(DataProperty(:hasBirthYear))
Declaration(DataProperty(:hasEventYear))
SubDataPropertyOf(:hasBirthYear :hasEventYear)
SubDataPropertyOf(:hasEventYear owl:topDataProperty)
DataPropertyDomain(:hasEventYear :Person)
DataPropertyRange(:hasEventYear xsd:integer)
UPD: You can hack Protege )) by adding:
Declaration(DataProperty(:hasDeathYear))
SubDataPropertyOf(:hasDeathYear :hasEventYear)
DataPropertyRange(:hasDeathYear xsd:string)
I've got the hasDeathYear domain is "Nothing"
and the explanation:
hasEventYear Range: xsd:integer
hasDeathYear SubPropertyOf: hasEventYear
hasDeathYear Range: xsd:string
I have been studying Protege and I have a question. I added an individual with name aaa in ontology "people.owl" which I downloaded from the internet.
I set type assertion as:
sheep and hasCC value 200,
where hasCC is data property.
Then, in class animal I created two classes: hhh and lll.
I set hhh as equivalent and there wrote:
animal and (hasCC some decimal[>= 150])
For lll I set:
animal and (hasCC some decimal[< 250])
When I run HermiT reasoner I see that the individual aaa is classified in both lll and hhh classes.
But when I set lll and hhh classes to be disjoint and run the reasoner the classes are not classified in the class "Nothing" as, for example, the class "mad_cow". I get a message:
"Your ontology is inconsistent which means that the OWL reasoner will no longer be able to provide any useful information about the ontology." After clicking the button "Explain" I get:
Could you say, why lll and hhh classes cannot be classified as Nothing?
What should I correct to let lll and hhh classes to be classified as Nothing?
Thank you!
"Your ontology is inconsistent which means that the OWL reasoner will no longer be able to provide any useful information about the ontology."
Isn't this saying it all already? You complain that the reasoner is not doing something but the reasoner explicitly tells you that it is not able to provide any useful information! Make your ontology consistent, then you can expect something from the reasoner.
In any case, you cannot expect a class that contains an instance (here the classes hhh and lll both must contain instance aaa) to be equivalent to Nothing. Nothing precisely means "the class that does not have any instance".
I'm trying to express an axiom of the following kind:
"Water has some physical quantity called melting temperature, which has a value of 100.0"
I've tried definig the following class expression:
Water SubClassOf (hasPhysicalQuality some (MeltingTemperature and hasValue value 100.0f))
And I have the following assertions:
Water Type owl:Class
hasPhysicalQuality Type owl:ObjectProperty
hasValue Type owl:DataProperty
this_water Type Water
this_temperature Type MeltingTemperature
this_water hasPhysicalQuality this_temperature
this_temperature hasValue 50.0f
When I ran the Pellet reasoner, I was expecting to find inconsistency since the melting temperature (this_temperature) related to this_water has a value of 50.0f, not 100.0f. However, the reasoner did not indicate any inconsistency.
What am I doing wrong here?
EDIT: The correct axioms required were:
Water SubClassOf (hasPhysicalQuantity exactly 1 MeltingTemperature)
Water SubClassOf (hasPhysicalQuanlity some (MeltingTemperature and (hasValue value 100.0f)
hasValue Type owl:FunctionalProperty
You should make your data property functional - or, as you say in the comments, apply a cardinality restriction.
I am using Protege 3.4 and I built my ontology and extended it with SWRL rules using SWRL and sqwrl built ins . The rules classifies instances of a class of the ontology ; the RHS is class assertion of an instance .It works successfully but when I change the values of the causes in the LHS no reclassification is done the instance is asserted to the same class
Why does this happen ? How to reclassify instances ?
ex:
SWRL rules:
1. Message(?m) hasInterest(?m,?i) hasCategory(?m,?c) sqwrl:makeset(?s1,?i) sqwrl:makeset(?s2,?c) sqwrl:intersection(?s3,?s1,?s2) sqwrl:size(?n,?s3) swrlb:greaterThan(?n,0) -> Ham(?m)
Message(?m) hasInterest(?m,?i) hasCategory(?m,?c) sqwrl:makeset(?s1,?i) sqwrl:makeset(?s2,?c) sqwrl:difference(?s3,?s1,?s2) sqwrl:size(?n,?s3) swrlb:greaterThan(?n,0) -> Spam(?m)
So once the message instance is classified as ham for example , whenever I change the values of i or c it will always be ham .