Markus Krötzsch wrote: > Summing up, we have various ideas: > > * Negation via "NOT" or "!" (I agree with Julien that "!" is no really good > solution) > * Negation using "::-" and ":=-". > > Besides beauty, there are important ramifications regarding semantics. > Compare > the following: > > 1) NOT [[located in::<q>[[Category:Country]] [[member of::EU]]</q>]] > > 2) [[located in::-<q>[[Category:Country]] [[member of::EU]]</q>]] > > Query (1) asks: "What is not located in a EU country?" (-> remove all things > which are known to be in an EU country) > > Query (2) asks: "What is located in something that is no EU country?" (-> > remove all things for which no located in relation besides those to EU > countries exists) > > Each of the two cannot be expressed with the other syntax. You can > say "[[foo::+]] NOT [[foo::bar]]" but this is not the same > as "[[foo::-bar]]". The above example suggests that we want the "NOT" style > of negation, and I think this is generally the case. > > The latter example also shows a downside of "NOT": it looks arkward as inner > part of a query. For "!" one would write "[[foo::+]] ![[foo::bar]]" which > seems clearer to me. > > What about "[[foo::+]] -[[foo::bar]]"? > > -- Markus I'm not happy with this too and want to suggest to use a "not"-Relation or a "filter"-Relation instead and therefore something like:
<ask> [[type::fruit]] <!-- selects all fruits --> [[not::type::apple]] <!-- filters all apples --> [[not::type::banana]] <!-- filters all bananas --> [[not::type::orange]] <!-- filters all orange --> </ask> Another, more powerful, syntax might be the following query which combines multiple keywords: <ask> [[type::fruit <!-- selects all fruits (and only fruits) --> [[filter::type::apple]] <!-- filters all apples --> [[filter::type::banana]] <!-- filters all bananas --> [[filter::not::type::orange]] <!-- finally, filters all but oranges --> ]] </ask> This query should first search for something and then filter the result by a given criteria. It's a much more elegant solution than the other proposals, but I'm not sure if this solution is the best possible. This problem will need further use cases. ys, MovGP0 > > > On Monday 19 March 2007 12:06, Julien Tane wrote: >> Hello, >> >> I don't think the sign '!' is a good choice... Here.. I think the >> notation should rather be >> <ask>NOT [[fruit::apple]]</ask> >> >> or something of the sort... for the sake of readibility... >> >> >> J >> >> Markus Krötzsch wrote: >>> On Wednesday 14 March 2007 18:58, Rich Mintz wrote: >>>> Hello, >>>> >>>> I'm relatively new to this but learning quickly. >>>> >>>> Is there a way to select pages that *don't* match a condition, via an >>>> "ask" query? >>> Not yet. There was a patch that enabled this function for categories, but >>> I would rather like a general implementation. What syntax should we use? >>> >>> Something like <ask>![[fruit::apple]]</ask> or <ask>![[fruit::+]]</ask>? >>> Or is this too technical? Any ideas for a better negation syntax? >>> >>> -- Markus >>> >>>> I have a page like this: >>>> >>>> == Apples == >>>> <ask>[[fruit::apple]]</ask> >>>> == Bananas == >>>> <ask>[[fruit::banana]]</ask> >>>> == Oranges == >>>> <ask>[[fruit::orange]]</ask> >>>> == Neither Apple Nor Banana Nor Orange == >>>> [what query can I put here?] >>>> >>>> What I am really looking for is pages for which "fruit" is not defined >>>> -- but I'll settle for a more complicated negative query instead. >>>> >>>> -- Rich Mintz >>>> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Semediawiki-user mailing list Semediawiki-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-user