Question about using makeOWLThing in SWRL

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

Question about using makeOWLThing in SWRL

Michael DeBellis-2
I'm trying to use swrlx:makeOWLThing and it isn't working as I would expect. I've created a small example ontology to replicate what I think is the problem. 

In the attached ontology I have a Patient class and a Diagnosis class with subclasses Mild, Moderate, and Severe. I have a simple rule:

hasSymptom(?p, Fever) ^ swrlx:makeOWLThing(?d, ?p) -> Mild(?d) ^ hasDiagnosis(?p, ?d)

I have one patient: P1 who hasSymptom Fever. I would expect this rule to create a new OWL object, make it an instance of the Mild Class and make it the value of the hasDiagnosis property for P1. When I run the Pellet reasoner though nothing seems to happen. I don't see any new instance created or set as the value of hasDiagnosis. Also, I created a SQWRL rule to test this: 

 hasSymptom(?p, Fever) ^ swrlx:makeOWLThing(?d, ?p) -> sqwrl:select(?p, ?d)

When I run this it seems to be working. It returns one row with ?p bound to P1 and ?d bound to what looks like an auto generated object ID. 

Any guidance would be greatly appreciated.

Michael

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

Simple Patient Example.owl (18K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about using makeOWLThing in SWRL

samsontu
Hi Michael,

The Pellet reasoner knows nothing about  swrlx:makeOWLThing. You have to run the SWRLTab reasoner.

With best regards,
Samson


On Apr 29, 2020, at 10:17 AM, Michael DeBellis <[hidden email]> wrote:

I'm trying to use swrlx:makeOWLThing and it isn't working as I would expect. I've created a small example ontology to replicate what I think is the problem. 

In the attached ontology I have a Patient class and a Diagnosis class with subclasses Mild, Moderate, and Severe. I have a simple rule:

hasSymptom(?p, Fever) ^ swrlx:makeOWLThing(?d, ?p) -> Mild(?d) ^ hasDiagnosis(?p, ?d)

I have one patient: P1 who hasSymptom Fever. I would expect this rule to create a new OWL object, make it an instance of the Mild Class and make it the value of the hasDiagnosis property for P1. When I run the Pellet reasoner though nothing seems to happen. I don't see any new instance created or set as the value of hasDiagnosis. Also, I created a SQWRL rule to test this: 

 hasSymptom(?p, Fever) ^ swrlx:makeOWLThing(?d, ?p) -> sqwrl:select(?p, ?d)

When I run this it seems to be working. It returns one row with ?p bound to P1 and ?d bound to what looks like an auto generated object ID. 

Any guidance would be greatly appreciated.

Michael
<Simple Patient Example.owl>_______________________________________________
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: Question about using makeOWLThing in SWRL

Michael DeBellis-2
Thanks, that worked.

On Wed, Apr 29, 2020 at 10:24 AM Samson Tu <[hidden email]> wrote:
Hi Michael,

The Pellet reasoner knows nothing about  swrlx:makeOWLThing. You have to run the SWRLTab reasoner.

With best regards,
Samson


On Apr 29, 2020, at 10:17 AM, Michael DeBellis <[hidden email]> wrote:

I'm trying to use swrlx:makeOWLThing and it isn't working as I would expect. I've created a small example ontology to replicate what I think is the problem. 

In the attached ontology I have a Patient class and a Diagnosis class with subclasses Mild, Moderate, and Severe. I have a simple rule:

hasSymptom(?p, Fever) ^ swrlx:makeOWLThing(?d, ?p) -> Mild(?d) ^ hasDiagnosis(?p, ?d)

I have one patient: P1 who hasSymptom Fever. I would expect this rule to create a new OWL object, make it an instance of the Mild Class and make it the value of the hasDiagnosis property for P1. When I run the Pellet reasoner though nothing seems to happen. I don't see any new instance created or set as the value of hasDiagnosis. Also, I created a SQWRL rule to test this: 

 hasSymptom(?p, Fever) ^ swrlx:makeOWLThing(?d, ?p) -> sqwrl:select(?p, ?d)

When I run this it seems to be working. It returns one row with ?p bound to P1 and ?d bound to what looks like an auto generated object ID. 

Any guidance would be greatly appreciated.

Michael
<Simple Patient Example.owl>_______________________________________________
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