Open LorenzBuehmann opened 5 years ago
This is very odd. I will take a look.
Works fine for me. See enclosed file containing your classes and individuals and a SQWRL query.
Strange. Looks like I'm misusing the plugin somehow. Maybe it happened because I changed a rule after getting some result from a previous run. Is the state of the table somewhere not refreshed?
I have some steps to reproduce an issue:
S1
and "run" it -> result as expectedabox:caa(?cls, ?ind) -> sqwrl:select(?cls, ?i) ^ sqwrl:orderby(?i)
, select S1
and "rerun" itabox:caa(?cls, ?ind) . sqwrl:makeBag(?bag, ?cls) ^ sqwrl:groupBy(?bag, ?ind) . sqwrl:size(?n, ?bag) -> sqwrl:select(?ind, ?n)
, select S1
and "rerun" itThis time I'm getting again what I got last time (screenshot to prove I'm not crazy):
So basically, what you can see here is that result from previous run is still in the table.
While further changed the rule back and forth I got also into a state where neither "run" nor "rerun" (from S1 Tab) do change anything - I guess at this point the plugin crashed completely:
See the S1 tab to review results of the SQWRL query.
The query took 870 milliseconds. 5 rows were returned.
Exception running SQWRL query 'S1': error running SQWRL queries: Internal error comparing rows
Exception running SQWRL query S1: error running SQWRL queries: Internal error comparing rows: Internal error comparing rows: attempt to compare a org.swrlapi.factory.DefaultSQWRLLiteralResultValue with a org.swrlapi.factory.DefaultSQWRLClassResultValue
Hi,
I'm using latest Protege 5.5.0 and the installed SWRL Tab plugin version is 2.0.6
Let's assume the following data just consisting of 3 classes and 5 individuals.
The task of the SQWRL query is to compute the number of classes each individual belongs to.
The query I tried is
abox:caa(?cls, ?ind) . sqwrl:makeBag(?bag, ?cls) ^ sqwrl:groupBy(?bag, ?ind) . sqwrl:size(?n, ?bag) -> sqwrl:select(?ind, ?n)
it works mostly as expected except that it also returns some results that shouldn't occur:
So the last 5 rows are indeed what I'd expect, but I can't explain the other rows. Any ideas what I'm doing wrong?
I assume it has something to do with the "meta-axioms" like
:C1 rdf:type owl:Class
, am I right? Is there any chance to omit those entity declaration axioms? And also, the numbern
for those cases is clearly not a number so it looks like thesize
built-in fails somehow?