HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.
Hi there!

So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.

I recorded a video for you to visualize and reproduce (if needed) the error:

Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>  

As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".

Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.

Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.

*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*

Please help :(

Thank you very much for reading so far. I expect eagerly to your answer.

*Daniel*





-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Michael DeBellis-2
It is usually better to just attach your ontology as long as it isn't too large. Are you familiar with the Open World Assumption (OWA)? That might be your problem. For example if you say that a  MonogamousSpouse is someone with exactly one value for hasSpouse and you have an Individual with one spouse that person won't be classified as a  MonogamousSpouse due to the OWA. The normal assumption with most programming languages and databases is that all the info about your domain is in the database. That's a Closed World Assumption. However, with the OWA you always assume there may be additional info out there that your current database is not aware of. The reason OWL is this way is that the designers thought the OWA made more sense for the Internet.

So just because someone only is currently known to have one value for their hasSpouse doesn't mean there aren't more values out there that your current knowledge base is not aware of. OWL will only classify something as a  MonogamousSpouse if it can prove that there aren't other values out there. 

To get around the OWA you can use SPARQL, SHACL,  or a conventional programming language like Java or Python. 

Here is a presentation that talks about OWA; http://www.cs.man.ac.uk/~drummond/presentations/OWA.pdf  

Cheers,
Michael

On Sat, May 2, 2020 at 4:44 PM Daniel B. <[hidden email]> wrote:
Hi there!

So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.

I recorded a video for you to visualize and reproduce (if needed) the error:

Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4

As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".

Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.

Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.

*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*

Please help :(

Thank you very much for reading so far. I expect eagerly to your answer.

*Daniel*





-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.
Ok awesome! So which one of the 3 should I use?

Thanks

Daniel



-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Michael DeBellis-2
It depends what you want to do.  If you are doing constraint checking then that is what SHACL is for. I.e., you want to check that all your MonogmousSpouse individuals have exactly one spouse, you can declare a SHACL constraint (called a shape but it has nothing to do with physical shapes) that says that must be the case and defines an action to take when it finds an instance of  MonogmousSpouse who doesn't have exactly one spouse. There is a plugin for Protege for SHACL you could use for this. 

If you want to do automatic classification, i.e., find all the instances of Person who have exactly one spouse and make them an instance of  MonogmousSpouse then SPARQL is probably the way to go. You can also write SPARQL queries that check for data that doesn't meet certain constraints though, so there is some overlap between the two. I would say SPARQL is more powerful than SHACL. I.e., most things you can do with SHACL you can do with SPARQL although not quite as elegantly (e.g., your constraints are implicit in the queries you define rather than explicit in SHACL defined shapes). But there are things that SPARQL can do (e.g., queries that integrate data from different data sources or transformation of data) that SHACL can't. 

The most general solution is to use Python or Java and an ontology library like Jena from Apache that turns OWL objects into Java or Python objects. You can do a lot this way. You can change the ontology, check it using the CWA, and take actions accordingly and also invoke a reasoner after you make changes. But there is IMO a lot more to learn to take this approach. But on the other hand if you want to eventually do things with your ontology like build applications with a GUI you are going to have to get over this hurdle eventually anyway. 

Hope that helps. 

Michael

On Sat, May 2, 2020 at 5:37 PM Daniel B. <[hidden email]> wrote:
Ok awesome! So which one of the 3 should I use?

Thanks

Daniel



-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Igor Toujilov-2
In reply to this post by Daniel B.
Hi Daniel,
There is a deep meaning behind "some", "exactly", and "only". Word "some" means existential quantification (there exists a value of the property). Word "exactly" means cardinality restriction (there is the specified number of property values). Word "only" means universal quantification (if there is a property value, then it belongs to the specified range). Those three options involve different calculations in a reasoning algorithm.

For your use case, I recommend making the property functional, and using word "some".

Why do all tests take so long?
Perhaps, there is a big number of individuals in your ontology. Perhaps you have many class expressions, which are hard to compute. Also it depends on a reasoner. Try removing unnecessary class-expressions. Try using another reasoner.

Cheers,
Igor

> Sent: Sunday, May 03, 2020 at 12:44 AM
> From: "Daniel B." <[hidden email]>
> To: [hidden email]
> Subject: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
>
> Hi there!
>
> So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
> class expression in the "*Equivalent To*" editor for one of my classes
> "*Magnitude*". The goal is to assert that any entity has *exactly 1* value
> for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
> * as values.
>
> I recorded a video for you to visualize and reproduce (if needed) the error:
>
> Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>
>
> As you can see, for the first test I used "*some*" for the class expression.
> This resulted in an inference, stating that my entity "*Test 1*" was indeed
> type *Magnitude*. This would be perfect, except for the undesired class
> expression "*some*". The expected or desired class expression is "*only*"
> and / or "*exactly 1*".
>
> Then, I tried with the "*exactly 1*" class expression. This resulted in no
> inferences at all. This is incorrect and undesired because the property
> "*has magnitude value*" is actually asserted and has a value within the
> desired range stated in the class expression editor.
>
> Finally, I tried with the "*only*" class expression. This resulted in some
> desired inferences, stating that my entity "Test 1" was indeed of type
> Magnitude, but some undesired inferences like stating that "*Test 1*" was an
> instance of the classes Quantity and Thing. Although they technically are
> instances of both Quantity and Thing, given that Magnitude is a subclass of
> Quantity and Quantity is a subclass of Thing, this is not the expected
> result.
>
> *Why could this be happening?
> Is there a way to solve it?
> Why do all tests take so long?*
>
> Please help :(
>
> Thank you very much for reading so far. I expect eagerly to your answer.
>
> *Daniel*
>
>
>
>
>
> -----
> Daniel B.
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.
In reply to this post by Michael DeBellis-2
Thanks so much!!

Daniel B.

El 2 may 2020, a la(s) 9:28 p.m., Michael DeBellis <[hidden email]> escribió:


It depends what you want to do.  If you are doing constraint checking then that is what SHACL is for. I.e., you want to check that all your MonogmousSpouse individuals have exactly one spouse, you can declare a SHACL constraint (called a shape but it has nothing to do with physical shapes) that says that must be the case and defines an action to take when it finds an instance of  MonogmousSpouse who doesn't have exactly one spouse. There is a plugin for Protege for SHACL you could use for this. 

If you want to do automatic classification, i.e., find all the instances of Person who have exactly one spouse and make them an instance of  MonogmousSpouse then SPARQL is probably the way to go. You can also write SPARQL queries that check for data that doesn't meet certain constraints though, so there is some overlap between the two. I would say SPARQL is more powerful than SHACL. I.e., most things you can do with SHACL you can do with SPARQL although not quite as elegantly (e.g., your constraints are implicit in the queries you define rather than explicit in SHACL defined shapes). But there are things that SPARQL can do (e.g., queries that integrate data from different data sources or transformation of data) that SHACL can't. 

The most general solution is to use Python or Java and an ontology library like Jena from Apache that turns OWL objects into Java or Python objects. You can do a lot this way. You can change the ontology, check it using the CWA, and take actions accordingly and also invoke a reasoner after you make changes. But there is IMO a lot more to learn to take this approach. But on the other hand if you want to eventually do things with your ontology like build applications with a GUI you are going to have to get over this hurdle eventually anyway. 

Hope that helps. 

Michael

On Sat, May 2, 2020 at 5:37 PM Daniel B. <[hidden email]> wrote:
Ok awesome! So which one of the 3 should I use?

Thanks

Daniel



-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.
In reply to this post by Igor Toujilov-2
Igor! Thank you so so much. With your answer and Michael’s you absolutely gave me the perfect solutions to my problem.

Thank you again and take care!

Daniel B.

El 3 may 2020, a la(s) 6:26 a.m., Igor Toujilov <[hidden email]> escribió:

Hi Daniel,
There is a deep meaning behind "some", "exactly", and "only". Word "some" means existential quantification (there exists a value of the property). Word "exactly" means cardinality restriction (there is the specified number of property values). Word "only" means universal quantification (if there is a property value, then it belongs to the specified range). Those three options involve different calculations in a reasoning algorithm.

For your use case, I recommend making the property functional, and using word "some".

Why do all tests take so long?
Perhaps, there is a big number of individuals in your ontology. Perhaps you have many class expressions, which are hard to compute. Also it depends on a reasoner. Try removing unnecessary class-expressions. Try using another reasoner.

Cheers,
Igor

Sent: Sunday, May 03, 2020 at 12:44 AM
From: "Daniel B." <[hidden email]>
To: [hidden email]
Subject: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Hi there!

So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.

I recorded a video for you to visualize and reproduce (if needed) the error:

Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>

As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".

Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.

Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.

*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*

Please help :(

Thank you very much for reading so far. I expect eagerly to your answer.

*Daniel*





-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.
In reply to this post by Igor Toujilov-2
Igor, one more question. What is the difference between specifying that my property is functional with a specific datatype range, and specifying that my property is functional without specifying the range and using a class expression for each class using that property instead (in the end they all have exactly the same value after the “some” class expression anyway).

Thanks a lot

Daniel B.

El 3 may 2020, a la(s) 6:26 a.m., Igor Toujilov <[hidden email]> escribió:

Hi Daniel,
There is a deep meaning behind "some", "exactly", and "only". Word "some" means existential quantification (there exists a value of the property). Word "exactly" means cardinality restriction (there is the specified number of property values). Word "only" means universal quantification (if there is a property value, then it belongs to the specified range). Those three options involve different calculations in a reasoning algorithm.

For your use case, I recommend making the property functional, and using word "some".

Why do all tests take so long?
Perhaps, there is a big number of individuals in your ontology. Perhaps you have many class expressions, which are hard to compute. Also it depends on a reasoner. Try removing unnecessary class-expressions. Try using another reasoner.

Cheers,
Igor

Sent: Sunday, May 03, 2020 at 12:44 AM
From: "Daniel B." <[hidden email]>
To: [hidden email]
Subject: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Hi there!

So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.

I recorded a video for you to visualize and reproduce (if needed) the error:

Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>

As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".

Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.

Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.

*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*

Please help :(

Thank you very much for reading so far. I expect eagerly to your answer.

*Daniel*





-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Igor Toujilov-2

Daniel,

The difference is significant.

When you specify the property range, the reasoner assumes: if you assert a value for this property, then the value should belong to the range. If the asserted value does not belong to the range, the reasoner declares you ontology inconsistent, and it is impossible to do reasoning in an inconsistent ontology.

However, when you specify the range in the class expression, and the value is out of the range, then the individual just will not be classified under this expression while the ontology is still consistent.

Cheers,

Igor

Sent: Sunday, May 03, 2020 at 1:33 PM
From: "Daniel Bakas" <[hidden email]>
To: "User support for WebProtege and Protege Desktop" <[hidden email]>
Subject: Re: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
Igor, one more question. What is the difference between specifying that my property is functional with a specific datatype range, and specifying that my property is functional without specifying the range and using a class expression for each class using that property instead (in the end they all have exactly the same value after the “some” class expression anyway).
 
Thanks a lot
 
Daniel B.
 
El 3 may 2020, a la(s) 6:26 a.m., Igor Toujilov <[hidden email]> escribió:
 
Hi Daniel,
There is a deep meaning behind "some", "exactly", and "only". Word "some" means existential quantification (there exists a value of the property). Word "exactly" means cardinality restriction (there is the specified number of property values). Word "only" means universal quantification (if there is a property value, then it belongs to the specified range). Those three options involve different calculations in a reasoning algorithm.

For your use case, I recommend making the property functional, and using word "some".

Why do all tests take so long?
Perhaps, there is a big number of individuals in your ontology. Perhaps you have many class expressions, which are hard to compute. Also it depends on a reasoner. Try removing unnecessary class-expressions. Try using another reasoner.

Cheers,
Igor
 
Sent: Sunday, May 03, 2020 at 12:44 AM
From: "Daniel B." <[hidden email]>
To: [hidden email]
Subject: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
 
Hi there!
 
So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.
 
I recorded a video for you to visualize and reproduce (if needed) the error:
 
Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>
 
As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".
 
Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.
 
Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.
 
*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*
 
Please help :(
 
Thank you very much for reading so far. I expect eagerly to your answer.
 
*Daniel*
 
 
 
 
 
-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________ protege-user mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.

So, if I’m almost certain that all values for that property will be exactly xsd:decimal[>= 0], what would you suggest for this. I have been using class expressions so far, but I would like to hear what you have to say.

Thank you so much

Daniel B.

El 3 may 2020, a la(s) 8:48 a.m., Igor Toujilov <[hidden email]> escribió:



Daniel,

The difference is significant.

When you specify the property range, the reasoner assumes: if you assert a value for this property, then the value should belong to the range. If the asserted value does not belong to the range, the reasoner declares you ontology inconsistent, and it is impossible to do reasoning in an inconsistent ontology.

However, when you specify the range in the class expression, and the value is out of the range, then the individual just will not be classified under this expression while the ontology is still consistent.

Cheers,

Igor

Sent: Sunday, May 03, 2020 at 1:33 PM
From: "Daniel Bakas" <[hidden email]>
To: "User support for WebProtege and Protege Desktop" <[hidden email]>
Subject: Re: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
Igor, one more question. What is the difference between specifying that my property is functional with a specific datatype range, and specifying that my property is functional without specifying the range and using a class expression for each class using that property instead (in the end they all have exactly the same value after the “some” class expression anyway).
 
Thanks a lot
 
Daniel B.
 
El 3 may 2020, a la(s) 6:26 a.m., Igor Toujilov <[hidden email]> escribió:
 
Hi Daniel,
There is a deep meaning behind "some", "exactly", and "only". Word "some" means existential quantification (there exists a value of the property). Word "exactly" means cardinality restriction (there is the specified number of property values). Word "only" means universal quantification (if there is a property value, then it belongs to the specified range). Those three options involve different calculations in a reasoning algorithm.

For your use case, I recommend making the property functional, and using word "some".

Why do all tests take so long?
Perhaps, there is a big number of individuals in your ontology. Perhaps you have many class expressions, which are hard to compute. Also it depends on a reasoner. Try removing unnecessary class-expressions. Try using another reasoner.

Cheers,
Igor
 
Sent: Sunday, May 03, 2020 at 12:44 AM
From: "Daniel B." <[hidden email]>
To: [hidden email]
Subject: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
 
Hi there!
 
So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.
 
I recorded a video for you to visualize and reproduce (if needed) the error:
 
Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>
 
As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".
 
Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.
 
Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.
 
*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*
 
Please help :(
 
Thank you very much for reading so far. I expect eagerly to your answer.
 
*Daniel*
 
 
 
 
 
-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________ protege-user mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Igor Toujilov-2

If the ontology becomes inconsistent, it is not so useful. Different reasoners handle this condition differently. Hermit pops up a dialogue box to offer the explanation feature to diagnose the reason for inconsistency. Pellet also pops up a dialogue box, but includes an explanation there. It works fine for small ontologies. However, in a big ontology there can be many inconsistency conditions, which mask each other. In this case, it is sometimes difficult to see primary reasons for inconsistency, even using the explanation tools.

In some cases, especially in a production environment, it is required for the ontology to work for a valid data set, even if some  other data entries are invalid. For scenarios like this, I recommend the following.

Instead of defining conditions for valid data, define a class or classes with conditions for invalid data instead. You will see the invalid individuals classified under those classes while the ontology will still work for valid data.

Enjoy it!

Igor

Sent: Sunday, May 03, 2020 at 6:43 PM
From: "Daniel Bakas" <[hidden email]>
To: "User support for WebProtege and Protege Desktop" <[hidden email]>
Subject: Re: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

So, if I’m almost certain that all values for that property will be exactly xsd:decimal[>= 0], what would you suggest for this. I have been using class expressions so far, but I would like to hear what you have to say.
 
Thank you so much
 
Daniel B.
 
El 3 may 2020, a la(s) 8:48 a.m., Igor Toujilov <[hidden email]> escribió:
 


Daniel,

The difference is significant.

When you specify the property range, the reasoner assumes: if you assert a value for this property, then the value should belong to the range. If the asserted value does not belong to the range, the reasoner declares you ontology inconsistent, and it is impossible to do reasoning in an inconsistent ontology.

However, when you specify the range in the class expression, and the value is out of the range, then the individual just will not be classified under this expression while the ontology is still consistent.

Cheers,

Igor

Sent: Sunday, May 03, 2020 at 1:33 PM
From: "Daniel Bakas" <[hidden email]>
To: "User support for WebProtege and Protege Desktop" <[hidden email]>
Subject: Re: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
Igor, one more question. What is the difference between specifying that my property is functional with a specific datatype range, and specifying that my property is functional without specifying the range and using a class expression for each class using that property instead (in the end they all have exactly the same value after the “some” class expression anyway).
 
Thanks a lot
 
Daniel B.
 
El 3 may 2020, a la(s) 6:26 a.m., Igor Toujilov <[hidden email]> escribió:
 
Hi Daniel,
There is a deep meaning behind "some", "exactly", and "only". Word "some" means existential quantification (there exists a value of the property). Word "exactly" means cardinality restriction (there is the specified number of property values). Word "only" means universal quantification (if there is a property value, then it belongs to the specified range). Those three options involve different calculations in a reasoning algorithm.

For your use case, I recommend making the property functional, and using word "some".

Why do all tests take so long?
Perhaps, there is a big number of individuals in your ontology. Perhaps you have many class expressions, which are hard to compute. Also it depends on a reasoner. Try removing unnecessary class-expressions. Try using another reasoner.

Cheers,
Igor
 
Sent: Sunday, May 03, 2020 at 12:44 AM
From: "Daniel B." <[hidden email]>
To: [hidden email]
Subject: [protege-user] HermiT Reasoner not working when changing from "some" to "exactly 1" although it should
 
Hi there!
 
So, I'm having this issue with the HermiT Reasoner. I am trying to assert a
class expression in the "*Equivalent To*" editor for one of my classes
"*Magnitude*". The goal is to assert that any entity has *exactly 1* value
for the property "*has magnitude value*", accepting only *xsd:decimal[>= 0]
* as values.
 
I recorded a video for you to visualize and reproduce (if needed) the error:
 
Video.mp4 <http://protege-project.136.n4.nabble.com/file/t377156/Video.mp4>
 
As you can see, for the first test I used "*some*" for the class expression.
This resulted in an inference, stating that my entity "*Test 1*" was indeed
type *Magnitude*. This would be perfect, except for the undesired class
expression "*some*". The expected or desired class expression is "*only*"
and / or "*exactly 1*".
 
Then, I tried with the "*exactly 1*" class expression. This resulted in no
inferences at all. This is incorrect and undesired because the property
"*has magnitude value*" is actually asserted and has a value within the
desired range stated in the class expression editor.
 
Finally, I tried with the "*only*" class expression. This resulted in some
desired inferences, stating that my entity "Test 1" was indeed of type
Magnitude, but some undesired inferences like stating that "*Test 1*" was an
instance of the classes Quantity and Thing. Although they technically are
instances of both Quantity and Thing, given that Magnitude is a subclass of
Quantity and Quantity is a subclass of Thing, this is not the expected
result.
 
*Why could this be happening?
Is there a way to solve it?
Why do all tests take so long?*
 
Please help :(
 
Thank you very much for reading so far. I expect eagerly to your answer.
 
*Daniel*
 
 
 
 
 
-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
 
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________ protege-user mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________ protege-user mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: HermiT Reasoner not working when changing from "some" to "exactly 1" although it should

Daniel B.
That is a great solution!

Thank you!

Take care

Daniel



-----
Daniel B.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Daniel B.