Possible to filter keywords A and B but not X?

Started by plastikman, April 24, 2020, 02:44:40 PM

Previous topic - Next topic

plastikman

I was wondering if it is possible to show images containing person A and B but not X (everyone else) using category formulas based on keywords. Using the Builder, I create some groupings e.g., me and my wife but then logically you also get pictures with me, my wife and 5 other people in it. I would like to filter out pictures that only show me and my wife and not anybody else.

I tried to use:

""@CatDistinct[@All|People|A;@All|People]"


but this doesn't work for me. The above is based on hierarchical keyword People|A. The image are tagged both in People Manager and with a keyword. Do I need to manually create another category or are these already categories? This is confusing me.

The other question I had is to show "@Keywords|person|A" AND "@Keywords|pets|*" (any pet).

The Help sections I looked at that I believe are relevant:
Category Formulas
Categories

Thanks in advance!

Mario

Have you considered using the File Window search bar (enable the Advanced mode so you can use AND/OR/NOT and () ) or a value filter for keywords in the Filter Panel?
Finding files based on keywords but then using a category formula seems a bit awkward and unnecessarily complicated.

Also, your category formula syntax is wrong. What do you try to achieve? To combine categories in a formula via AND OR or NOT use the syntax explained in the help.
For example:

("TEST|Colors|Red" OR "TEST|Colors|Blue") NOT "TEST|Colors|Green"

Replace TEST|Colors|... with whatever category or expression you need.

Tip: The Category @Builder allows you to create your formulas via drag and drop. And the syntax will be correct, too.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

plastikman

Quote from: Mario on April 24, 2020, 03:06:48 PM
Also, your category formula syntax is wrong. What do you try to achieve? To combine categories in a formula via AND OR or NOT use the syntax explained in the help.

Simple usecase:

I want to see pictures of me and my daughter (or any other combination) without any other (identified/named) people in the image.

If I use category builder for me and my daughter with AND operator, it also shows pictures of me, my daughter and my wife or even large group photos with me, my daughter, and 20 wedding guests (which is correct behavior, but I want to use an additional focus filter to zoom in on just the two of us). For the category/filter I am trying to create, I want to see just pictures with me and my daughter and nobody else.

The CatDistinct example in the Category Formulas Help Section describes exactly what I want to do (show photos with only Jenny is the example) but I cannot get it to work for either only my daughter or my daughter and me.

Both me and my daughter are entries for People in the People Manager.
The People Manager automatically assigns our personal named keywords (People|Me and People|Daughter).

Your example with TEST|Colors is clear but the NOT TEST|Colors|Green in that case should be NOT TEST|Colors|* wildcard for all other colors besides the first Red and Blue that precede it.

p.s. Category @Builder is great. I use it all the time. But not sure how I would use it while taking into account the above increased complexity.

Mario

There is no * wildcard.
The example will also work when you use @CatDistinct or other formulas to grab files in selected categories. Then use the ("Cat" OR "Cat")  NOT "Cat" syntax go get what result you need.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

plastikman

Let me put it even simpler:

Person 1 has keyword People|A and of course People Manager variables attached
Person 2 has keyword People|B idem

Queries I use:

"@CatDistinct[@All|People|A;@All|People]" or "@CatDistinct[@Keywords|People|A;@Keywords|People]"

do not return desired results (images with only A in it and nobody else), which means I am using them in the wrong way.

So what is the correct expression to use? What am I missing here? I cannot get the example from the help to work with keywords from my own catalog.

sinus

Maybe this is not helpful, I do not know, but you can create a Data-Driven Categorie, what counts all keys in it.

This is the variable, see the attachement:

{File.MD.XMP::dc\subject\Subject\0|count:true;numcomp:gt,0,{File.MD.XMP::dc\subject\Subject\0|count:true},}

Depending how your keywords are built, this could help.
The result are categories, what count, how many keywords are in an image.

Say you would have only persons, then this would help.
Because then you would see, that all keys over 3 would have more than only your daughter and you.
In this case two would be the correct thing, where you could then create at formula for this category with "you AND daugher" (to eliminate other persons, what are only 2).
Best wishes from Switzerland! :-)
Markus

plastikman

Quote from: sinus on April 24, 2020, 04:13:50 PM
Maybe this is not helpful, I do not know, but you can create a Data-Driven Categorie, what counts all keys in it.

Depending how your keywords are built, this could help.
The result are categories, what count, how many keywords are in an image.

Say you would have only persons, then this would help.
Because then you would see, that all keys over 3 would have more than only your daughter and you.
In this case two would be the correct thing, where you could then create at formula for this category with "you AND daugher" (to eliminate other persons, what are only 2).

Great suggestion! I actually managed to use this one in the @Builder since I already have a data-driven category with a number of faces count and tried this out.

I am just slightly annoyed that I still don't seem to fully understand the syntax of the variables/categories.

Direct link to specific example: Category Formulas

Why does this not work with the example I shared above? Based on the example in the documentation, I should be able to filter People|A using this example since it is listed under @Keywords. But it doesn't pull up any results.

Mario

"@CatDistinct[@All|People|A]"
Returns all files assigned only to the category People|A

"@CatDistinct[@All|People|A]" OR "@CatDistinct[@All|People|B]"

Rives all the files exclusively assigned to People|A or People|B

This formula takes one regular expression.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

plastikman

#8
I now use {File.Persons.Tag|count:true} in combination with keywords.

"@Keywords|People|A" AND "@Keywords|People|B" AND ".DATA-DRIVEN|People Manager|Face Count|2"

I still feel based on the documentation that there is another way that is not clear to me, because I don't fully understand the concepts behind the @All, @Keywords using category formulas and the tools that they offer.


Mario

Just play with category formulas and use the examples in the help.
Not many users every use category formulas. They can help to solve specific problems and then they are great. No other software offers something similar.
Just to find specific persons, or combinations, you don't need them. You can use the File Window search bar. Or the Filter Panel with a value filter.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook