SWRL Exception

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

SWRL Exception

dusan_popadic
Hi,

I tried to make a simple SWRL rule in Protege:

inb:containedInStorey(?space, ?storey) -> mycontains(?storey, ?space)

but when I hit Run Drools I get this exception:
Exception running rule engine: Prefix not registered for prefix name: _:

and before that:
OWL axioms successfully transferred to rule engine.
Number of SWRL rules exported to rule engine: 1
Number of OWL class declarations exported to rule engine: 286
Number of OWL individual declarations exported to rule engine: 6146
Number of OWL object property declarations exported to rule engine: 305
Number of OWL data property declarations exported to rule engine: 144
Total number of OWL axioms exported to rule engine: 29102
The transfer took 312 millisecond(s).
Press the 'Run Drools' button to run the rule engine.

I use Protege 5.5.0 and SWRLTab Protege 5.0+ Plugin version 2.0.6

Do you know what could be a problem?

Thaks,
Dusan



--
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
Reply | Threaded
Open this post in threaded view
|

Re: SWRL Exception

Michael DeBellis-2
Do you specifically want to use Drools? Because you don't have to and for most uses I think just using the Pellet reasoner works better. If you use Pellet then whenever you run the reasoner the SWRL rules will fire automatically just like any other axioms you've defined (e.g., DL for defined classes, inverses for properties, etc.). I don't know if that will fix the error. It's hard to debug problems like that without seeing the actual ontology. You can attach your ontology to messages if it's not too big. 

Michael


On Wed, Jul 17, 2019 at 6:33 AM dusan_popadic <[hidden email]> wrote:
Hi,

I tried to make a simple SWRL rule in Protege:

inb:containedInStorey(?space, ?storey) -> mycontains(?storey, ?space)

but when I hit Run Drools I get this exception:
Exception running rule engine: Prefix not registered for prefix name: _:

and before that:
OWL axioms successfully transferred to rule engine.
Number of SWRL rules exported to rule engine: 1
Number of OWL class declarations exported to rule engine: 286
Number of OWL individual declarations exported to rule engine: 6146
Number of OWL object property declarations exported to rule engine: 305
Number of OWL data property declarations exported to rule engine: 144
Total number of OWL axioms exported to rule engine: 29102
The transfer took 312 millisecond(s).
Press the 'Run Drools' button to run the rule engine.

I use Protege 5.5.0 and SWRLTab Protege 5.0+ Plugin version 2.0.6

Do you know what could be a problem?

Thaks,
Dusan



--
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: SWRL Exception

dusan_popadic
Michael,
Thank you for your answer. I don't specifically want to use Drools. I am new to Protege and when I opened SWRLTab I had three buttons in the bottom with Drools, so I used them.
I followed your advice and installed Pellet, but I don't understand how it works. When I write a rule and then start the reasoner I am not sure that my rule fired. If I use Drools and when I hit the "Drools->OWL" button I can see results of my rule in ontology, I can query with SPARQL ect. But when I run the reasoner (ctrl+R) I don't see the results of my rule. For example query SELECT ?x ?y WHERE {?x mycontains ?y} gives me empty set which was not the case with Drools. Am I doing something wrong with reasoner?

Thanks!
Dusan

сре, 17. јул 2019. у 16:42 Michael DeBellis <[hidden email]> је написао/ла:
Do you specifically want to use Drools? Because you don't have to and for most uses I think just using the Pellet reasoner works better. If you use Pellet then whenever you run the reasoner the SWRL rules will fire automatically just like any other axioms you've defined (e.g., DL for defined classes, inverses for properties, etc.). I don't know if that will fix the error. It's hard to debug problems like that without seeing the actual ontology. You can attach your ontology to messages if it's not too big. 

Michael


On Wed, Jul 17, 2019 at 6:33 AM dusan_popadic <[hidden email]> wrote:
Hi,

I tried to make a simple SWRL rule in Protege:

inb:containedInStorey(?space, ?storey) -> mycontains(?storey, ?space)

but when I hit Run Drools I get this exception:
Exception running rule engine: Prefix not registered for prefix name: _:

and before that:
OWL axioms successfully transferred to rule engine.
Number of SWRL rules exported to rule engine: 1
Number of OWL class declarations exported to rule engine: 286
Number of OWL individual declarations exported to rule engine: 6146
Number of OWL object property declarations exported to rule engine: 305
Number of OWL data property declarations exported to rule engine: 144
Total number of OWL axioms exported to rule engine: 29102
The transfer took 312 millisecond(s).
Press the 'Run Drools' button to run the rule engine.

I use Protege 5.5.0 and SWRLTab Protege 5.0+ Plugin version 2.0.6

Do you know what could be a problem?

Thaks,
Dusan



--
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
Reply | Threaded
Open this post in threaded view
|

Re: SWRL Exception

Lorenz Buehmann

You can check whether the rule worked with Pellet by clicking on some individuals that you expect to have the inferred mycontains relation.

But my question here, why aren't you using the same prefix inb: for the predicate mycontains? Is it using a different namespace? As Michale said, without seing the whole data its hard to tell what's going wrong, but I guess you're close to your first working SWRL rule

On 18.07.19 11:06, Dusan Popadic wrote:
Michael,
Thank you for your answer. I don't specifically want to use Drools. I am new to Protege and when I opened SWRLTab I had three buttons in the bottom with Drools, so I used them.
I followed your advice and installed Pellet, but I don't understand how it works. When I write a rule and then start the reasoner I am not sure that my rule fired. If I use Drools and when I hit the "Drools->OWL" button I can see results of my rule in ontology, I can query with SPARQL ect. But when I run the reasoner (ctrl+R) I don't see the results of my rule. For example query SELECT ?x ?y WHERE {?x mycontains ?y} gives me empty set which was not the case with Drools. Am I doing something wrong with reasoner?

Thanks!
Dusan

сре, 17. јул 2019. у 16:42 Michael DeBellis <[hidden email]> је написао/ла:
Do you specifically want to use Drools? Because you don't have to and for most uses I think just using the Pellet reasoner works better. If you use Pellet then whenever you run the reasoner the SWRL rules will fire automatically just like any other axioms you've defined (e.g., DL for defined classes, inverses for properties, etc.). I don't know if that will fix the error. It's hard to debug problems like that without seeing the actual ontology. You can attach your ontology to messages if it's not too big. 

Michael


On Wed, Jul 17, 2019 at 6:33 AM dusan_popadic <[hidden email]> wrote:
Hi,

I tried to make a simple SWRL rule in Protege:

inb:containedInStorey(?space, ?storey) -> mycontains(?storey, ?space)

but when I hit Run Drools I get this exception:
Exception running rule engine: Prefix not registered for prefix name: _:

and before that:
OWL axioms successfully transferred to rule engine.
Number of SWRL rules exported to rule engine: 1
Number of OWL class declarations exported to rule engine: 286
Number of OWL individual declarations exported to rule engine: 6146
Number of OWL object property declarations exported to rule engine: 305
Number of OWL data property declarations exported to rule engine: 144
Total number of OWL axioms exported to rule engine: 29102
The transfer took 312 millisecond(s).
Press the 'Run Drools' button to run the rule engine.

I use Protege 5.5.0 and SWRLTab Protege 5.0+ Plugin version 2.0.6

Do you know what could be a problem?

Thaks,
Dusan



--
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: SWRL Exception

dusan_popadic
Michael, Lorenz,

Working with Pellet instead of Drools actually solved my problem. I just didn't check "Show Inferences" checkbox so I couldn't see it.
Yes, mycontains is using different namespace.

Thank you very much! 
Dusan 

чет, 18. јул 2019. у 12:11 Lorenz Buehmann <[hidden email]> је написао/ла:

You can check whether the rule worked with Pellet by clicking on some individuals that you expect to have the inferred mycontains relation.

But my question here, why aren't you using the same prefix inb: for the predicate mycontains? Is it using a different namespace? As Michale said, without seing the whole data its hard to tell what's going wrong, but I guess you're close to your first working SWRL rule

On 18.07.19 11:06, Dusan Popadic wrote:
Michael,
Thank you for your answer. I don't specifically want to use Drools. I am new to Protege and when I opened SWRLTab I had three buttons in the bottom with Drools, so I used them.
I followed your advice and installed Pellet, but I don't understand how it works. When I write a rule and then start the reasoner I am not sure that my rule fired. If I use Drools and when I hit the "Drools->OWL" button I can see results of my rule in ontology, I can query with SPARQL ect. But when I run the reasoner (ctrl+R) I don't see the results of my rule. For example query SELECT ?x ?y WHERE {?x mycontains ?y} gives me empty set which was not the case with Drools. Am I doing something wrong with reasoner?

Thanks!
Dusan

сре, 17. јул 2019. у 16:42 Michael DeBellis <[hidden email]> је написао/ла:
Do you specifically want to use Drools? Because you don't have to and for most uses I think just using the Pellet reasoner works better. If you use Pellet then whenever you run the reasoner the SWRL rules will fire automatically just like any other axioms you've defined (e.g., DL for defined classes, inverses for properties, etc.). I don't know if that will fix the error. It's hard to debug problems like that without seeing the actual ontology. You can attach your ontology to messages if it's not too big. 

Michael


On Wed, Jul 17, 2019 at 6:33 AM dusan_popadic <[hidden email]> wrote:
Hi,

I tried to make a simple SWRL rule in Protege:

inb:containedInStorey(?space, ?storey) -> mycontains(?storey, ?space)

but when I hit Run Drools I get this exception:
Exception running rule engine: Prefix not registered for prefix name: _:

and before that:
OWL axioms successfully transferred to rule engine.
Number of SWRL rules exported to rule engine: 1
Number of OWL class declarations exported to rule engine: 286
Number of OWL individual declarations exported to rule engine: 6146
Number of OWL object property declarations exported to rule engine: 305
Number of OWL data property declarations exported to rule engine: 144
Total number of OWL axioms exported to rule engine: 29102
The transfer took 312 millisecond(s).
Press the 'Run Drools' button to run the rule engine.

I use Protege 5.5.0 and SWRLTab Protege 5.0+ Plugin version 2.0.6

Do you know what could be a problem?

Thaks,
Dusan



--
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