-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQWRL Difference of Grouped Sets Not Working #43
Comments
You do not need to use the group operator . Take a look at this query: https://github.com/protegeproject/swrlapi/wiki/SQWRLCollections#negation-as-failure |
I'm using that information as a reference. If I use the sqwrl:size(?n, ?s3) and sqwrl:select(?n) I get the right lenght answer but if I sqwrl:select(?x) the result doesn't match the lenght of the size. For the hair color example: (Joseph, Peter, Kevin, Andrew, Boris) - (Joseph, Peter) Thanks for replying Martin |
Can you post the ontology (change .owl to .owl.txt because GitHub does not support the .owl extension) and I can take a look. |
I'm attaching the ontology owl file. Thank you |
Let's say that I have this information
My individuals are all different. I have the class Male and Female asserted to each one. And I also have the property hasHairColor asserted to everyone with its value.
The question is, how can I query all the males with hair color different from black (the ontology may have many other hair colors)?
So far, I have tryied this queries with faulty results...
The difference operations should be doing something like:
set1 (a, b, c, d) - set2 (c, d) = set3 (a, b)
Instead they are doing some kind of distribution product to compare the differences. They are joining each value of the sets and then comparing the pair of values and letting the difference pairs only.
All the x different from the y according to the previous table are (a, a, b, b, c, d) giving the same distinct result of the original set1 (a, b, c, d).
I'm missing something in the way the joins are made. The result works but only when one of the sets has only one element (i.e. if I try to remove blondes).
I'm using Protege 5.2 with the SWRL and SQWRL Tab 2.0.5
Thanks in advance
The text was updated successfully, but these errors were encountered: