Bounties: selecting pages not in category, and option for turning off category inferencing

From semantic-mediawiki.org

Hi,

I am interested in this but I am not able to distinguish both of the tasks. Can you give an example query for this?

14:30, 17 May 2013

Sure! These are two separate things...

1) Not in category clauses: I want to be able to do something like [[!Category::Actor]] to select pages that aren't in category Actor. This should work with other parts of a clause, like [[Category::Hollywood]][[!Category::Actor]] would return pages in category Hollywood but not Actor.

I'm not sure what the best way to implement this is. I'd hope this would get accepted to the SMW codebase so I'd very much welcome feedback on what the best way to accomplish this filtering is. Maybe it's adding a NOT clause, so you could do [[Category::Hollywood]] NOT [[Category::Actor]] but the NOT clause would also add a lot of power to do other things, which would be nice for everyone in general.


2) Optionally turning off category inferencing: I'm referring to inferencing as described here. I think there should be a flag so you could do {{#ask: [[Category::Person]] | inferencing=false }} to get a list of pages only in category Person (and not pages in [[Category::Man]] or [[Category::Woman]] unless those pages are also explicitly in [[Category::Person]]). This use case doesn't make a lot of sense for Person/Man/Woman but could for other use cases. Obviously `inferencing` would be default =true since that's the existing/default bahavior.


Thanks!  : )

Adam

21:37, 17 May 2013

The first request is complex, complex as in it needs changes in a lot of places in the core query execution. The second one is relatively simple. I will write to Markus and let you know

16:16, 19 May 2013

Understood. In that case (regarding #1), would a [[NotCategory::x]] filter be easier (vs a NOT clause)?

01:48, 21 May 2013