Catagories to Keywords in 2017 Help

Started by Davie101, January 12, 2018, 11:57:02 AM

Previous topic - Next topic

Davie101

I have got myself  into a bit of a mess and need some advice.

->Since IMatch 3 I have been converting Categories to Keywords using scripts and this works well for me and I have a large and comprehensive category tree.
->I upgraded to IMatch 5 and continued with the same workflow but using Ferdinands new script https://www.photools.com/community/index.php?topic=312.0. I ignored the new @Keywords which are not hierarchical and impracticable.
->I've just upgraded to 2017 and Ferdinands script is unavailable and I am unable to to convert categories to keywords with Metadata Templates and achieve the desired result - I cannot omit the top categories (eg. Location, Keyword) and one keyword displays as a complete category tree (eg. Location|Country|County|Town|etc).

Can anyone help with Metadata template settings?  Or perhaps tell me how to build a @Keyword hierarchy so I can use IMatch 2017 the way I believe its meant to be used?

(I have a fully backed up and working database for IMatch 5  8) )

Thanks


DigPeter

Ferdinand's script was specifically for migrating from IM3 to IM5.  It is not needed to upgrade from IM5 to IM2017.

I am sure that Mario will explain in more detail, but @Keywords are designed to be hierarchical.

Davie101

Quote from: DigPeter on January 12, 2018, 01:10:09 PM
Ferdinand's script was specifically for migrating from IM3 to IM5.  It is not needed to upgrade from IM5 to IM2017.

I am sure that Mario will explain in more detail, but @Keywords are designed to be hierarchical.

I think I made a mistake when upgrading to IM5 and flat @Keywords was the result.  I use Ferdinand's script in IM5 on new images.  I guess it wasn't really written for that but it works perfectly for my needs but its not available in IM2017.

sinus

Quote from: Davie101 on January 12, 2018, 01:30:38 PM
Quote from: DigPeter on January 12, 2018, 01:10:09 PM
Ferdinand's script was specifically for migrating from IM3 to IM5.  It is not needed to upgrade from IM5 to IM2017.

I am sure that Mario will explain in more detail, but @Keywords are designed to be hierarchical.

I think I made a mistake when upgrading to IM5 and flat @Keywords was the result.  I use Ferdinand's script in IM5 on new images.  I guess it wasn't really written for that but it works perfectly for my needs but its not available in IM2017.

Yep, David, because all "visual-basic-scripts" written and running in IM5, will not more work in IM2017, because VB is an old script-language.
All new scripts (well, most, but you can also use others) are in IM2017 in JavaScript.
Best wishes from Switzerland! :-)
Markus

thrinn

I would recommend to check the following chapters in the help first:
- Categories -> The @Keywords Category: for a basic understanding how it works and what is possible.
- Configuring IMatch -> Metadata: This chapter explains the settings of the Preferences -> Metadata page. There are some settings especially relevant for keywords import and export, and also some examples that could be helpful for you (writing hierarchical keywords, configuring the separator, ...)

Personally, I do not work much with @Keywords, so I am not sure if I can help further. Maybe describing in more detail what you want to achieve would help.
- Are you looking for one time solution to copy some IMatch categories into keywords, working with @Keywords after that?
- Or do you want to continually mirror some categories into keywords?
Thorsten
Win 10 / 64, IMatch 2018, IMA

Davie101

Quote from: thrinn on January 12, 2018, 01:54:34 PM
I would recommend to check the following chapters in the help first:
- Categories -> The @Keywords Category: for a basic understanding how it works and what is possible.
- Configuring IMatch -> Metadata: This chapter explains the settings of the Preferences -> Metadata page. There are some settings especially relevant for keywords import and export, and also some examples that could be helpful for you (writing hierarchical keywords, configuring the separator, ...)

Personally, I do not work much with @Keywords, so I am not sure if I can help further. Maybe describing in more detail what you want to achieve would help.
- Are you looking for one time solution to copy some IMatch categories into keywords, working with @Keywords after that?
- Or do you want to continually mirror some categories into keywords?

I've read those and will do so again, maybe I missed something..

I am happy to ignore @Keywords.  I simply want to convert my chosen Catergories into Keywords on an image by image basis.  I need keywords written to the image.

Mario

Quote from: Davie101 on January 12, 2018, 02:07:50 PM
I am happy to ignore @Keywords.

This would be a really bad idea. @Keywords automatically mirrors the hierarchical keywords in your files. You cannot "ignore" it. Its one of the most essential parts of keywording workflow in IMatch.
Changes done to @Keywords are mirrored into the keywords in your files. Changes done to hierarchical keywords are mirrored in @Keywords.

QuoteI simply want to convert my chosen Catergories into Keywords on an image by image basis.  I need keywords written to the image.

As I see it, it makes no sense to manage separate "keyword" categories and then trying to figure out a way to get these written as keywords at some later time. You are making your life too hard.

For a one-time conversion of categories into hierarchical keywords, use a Metadata Template. If you search the community for metadata temple keywords you should find instructions on how to do that. The precise setup depends on which categories you want to import, how your categories are structured, which keyword settings you use in IMatch, if and how you have setup your keyword thesaurus etc.

I have the impression that you defined a categories/keyword workflow in IMatch 3.x 10 years ago and now somehow try to stick to it. I would advise against that.
Don't try to fight the system, go with the flow. IMatch 2017 has a very flexible and powerful automatic keyword workflow. Use the Keyword Panel to manage keywords. Use the special @Keywords category hierarchy which gives you the best of keywords and IMatch categories combined. Use categories for organization structures you don't want in keywords.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Davie101

Thanks everyone.

Mario, its in my nature to fight the system ;D   In IM5 I choose my categories. use Ferdinand's script and then add some extra keywords direct in the Keyword panel which gives me keywords that my agencies can read.  Simple for me and has been for 10 years or more. 

However, I do understand that IMatch has changed and that at some point IM5 will be obsolete.  At that point I'm possibly in big trouble! I have been experimenting with @Keywords and metadata templates but haven't written the right template yet.

How can I include two top categories, "Location" and "Keyword" and their children (several deep), and exclude all other top categories? 

It seems to me that the correct template I need will not only write hierarchical @Keywords but will also write keywords in my images, just like my decade old workflow.

Mario

QuoteHow can I include two top categories, "Location" and "Keyword" and their children (several deep), and exclude all other top categories?

You can use category variables. They support filters which allows you to pick what you need. Check out the examples in the Variables help topic and use the Var Toy app to try things out.

QuoteIt seems to me that the correct template I need will not only write hierarchical @Keywords but will also write keywords in my images, just like my decade old workflow.

You only update hierarchical keywords. IMatch will flatten and map these keywords to XMP keywords and optionally IPTC keywords automatically.

QuoteHowever, I do understand that IMatch has changed and that at some point IM5 will be obsolete.

IMatch 5 is already legacy. No support is available for it anymore. I'm already heading at IMatch 2018.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Davie101

Thanks Mario.

I have written a template that allows me to create @Keywords from my two selected top categories.  So far so good.  I have a comprehensive category set up which I originally converted from a thesaurus. How do I delete "Keyword" and "building materials_" keywords from this hierarchy?
     Keyword|architecture|building materials_|clay products|brick
I send my images to agencies and need to delete certain keywords.  A simple deletion is rewritten when updating the metadata.  Here I am fighting the system and I suspect it is impossible to delete them?

Alternatively, trying to go with the flow, is there some way to exclude the top Keyword from the hierarchy?  I could perhaps deal with lower levels ie."building materials_" by reorganizing my @Keyword structure when its built - see below.

My thoughts so far is to run my metadata template copying my old category structure and merge it with existing contents (I have added loads of keywords manually as well which I don't want to loose).  I then reorganize my @Keywords list to solve the above problem.  At this point I can add new images, use @Keywords and can remove flat @Keywords at my leisure.  Does that sound ok?

Here is what I have in IM5 -

  • I have no hierarchical keywords, they are all flat.
  • I have 1000s of flat @Keywords
  • I have no working thesaurus

Thanks







Mario

You are working against the system. Of course you can delete keywords anytime. Use the keyword panel or the @Keywords category hierarchy.
But you don't want to delete keywords. You want to move your files to a totally different location in your hierarchy. Big difference.

If you remove the London from Location|United Kingdom|London|Fleet Street you lose a lot of info and your hierarchy is totally different.

Do you perhaps just want to skip a level when IMatch flattens hierarchical keywords?
This can be easily done via the thesaurus, by making one or more levels group levels or exclusion levels.
This is not uncommon, removing certain levels when producing flat keywords, exporting only leaf levels or partial hierarchies. IMatch has many features to help you with that, the thesaurus playing an important role in this.

But that is a feature of the keyword processing in IMatch, this won't work with your "category to keywords" contraption. Or at least not as it should.
If you insist on your "copy categories to keywords" workflow you have to come up with your own solution. Maybe using temporary categories, or maybe using the replace function to remove levels from the category variables you use in your metadata template,....
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Davie101

I'm trying to see how I can use IMatch as it should be and abandon my old ways, really I am!  My old workflow is doomed, I see that.  I understand how @Keywords work, its great.

My problem lies with my old images.  They have flat @Keywords, 1000s of them and impossible to use with any efficiency.  This is why I want to use a Category to Keyword template once only, to build hierarchical @keywords.  In my template I can select the two top categories that I need (all other categories are for info that are agency related and not to be written in the image).

Quote from: Mario on January 14, 2018, 09:23:19 AM
Do you perhaps just want to skip a level when IMatch flattens hierarchical keywords?
This can be easily done via the thesaurus, by making one or more levels group levels or exclusion levels.
This is not uncommon, removing certain levels when producing flat keywords, exporting only leaf levels or partial hierarchies. IMatch has many features to help you with that, the thesaurus playing an important role in this.

Yes. I need to omit some levels of these hierarchies which I can now do with the Thesaurus.  In your example, Location|United Kingdom|London|Fleet Street I can exclude "Location".  But I cannot exclude "Location" and "United Kingdom" - this results in "Location" being written.  If I delete manually, it is rewritten when updating metadata.
 
Is three rounds of metadata updates usual?

Thanks






Mario

Quote from: Davie101 on January 14, 2018, 03:20:18 PM
In your example, Location|United Kingdom|London|Fleet Street I can exclude "Location".  But I cannot exclude "Location" and "United Kingdom" - this results in "Location" being written. 

I did just that. I set Location and United Kingdom in the thesaurus to be excluded in flat keywords. When I now assign Location|United Kingdom|London|Fleet Street to a file and write back, the file gets the flat keyword London|Fleet Street (when I enable the option to write hierarchies) or London, Fleet Street when I write hierarchies with path elements. Else only Fleet Street.

When you write back, IMatch updates the file, maps all metadata between the standards and then reloads the file once.
If IMatch has to write back multiple times (the pen is on immediately after the write back) there is conflicting metadata in the file. When you point the mouse cursor at the pen, IMatch will tell you what needs to be written. If is keywords, you have a conflict between the existing flat keywords (XMP or IPTC) and hierarchical keywords. Usually IMatch can solve this with a second write. If not you have to manually delete existing keywords from the file and then let IMatch write-back to get a consistent state. This has been explained many times here in the community, let us know if you need help with that.

I understand that you have thousands of flat single-level keywords in your files, which all align on the level directly below @Keywords.

To fix this you can either setup a thesaurus that groups all these flat keywords into hierarchies.
For example, if you have the keywords Apple, Banana, Orange in your files. If you setup a thesaurus that has

Food
  |-Fruit
    |-- Apple
    |-- Banana
    |-- Orange

and then enable the thesaurus lookup for keyword import and reload all metadata, IMatch should automatically produce the proper hierarchical keywords. Then a write-back and things should be in order.

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

Davie101

Quote from: Mario on January 14, 2018, 04:16:06 PM

I did just that. I set Location and United Kingdom in the thesaurus to be excluded in flat keywords. When I now assign Location|United Kingdom|London|Fleet Street to a file and write back, the file gets the flat keyword London|Fleet Street (when I enable the option to write hierarchies) or London, Fleet Street when I write hierarchies with path elements. Else only Fleet Street.

Not for me.  I must be missing something.  I'm working with a new image and using @Keywords (see screenshot attached)  All five of the thesaurus keywords are excluded.

Quote from: Mario on January 14, 2018, 04:16:06 PM
When you write back, IMatch updates the file, maps all metadata between the standards and then reloads the file once.
If IMatch has to write back multiple times (the pen is on immediately after the write back) there is conflicting metadata in the file. When you point the mouse cursor at the pen, IMatch will tell you what needs to be written. If is keywords, you have a conflict between the existing flat keywords (XMP or IPTC) and hierarchical keywords. Usually IMatch can solve this with a second write. If not you have to manually delete existing keywords from the file and then let IMatch write-back to get a consistent state. This has been explained many times here in the community, let us know if you need help with that.

Thanks.

Quote from: Mario on January 14, 2018, 04:16:06 PM
I understand that you have thousands of flat single-level keywords in your files, which all align on the level directly below @Keywords.

To fix this you can either setup a thesaurus that groups all these flat keywords into hierarchies.
For example, if you have the keywords Apple, Banana, Orange in your files. If you setup a thesaurus that has

Food
  |-Fruit
    |-- Apple
    |-- Banana
    |-- Orange

and then enable the thesaurus lookup for keyword import and reload all metadata, IMatch should automatically produce the proper hierarchical keywords. Then a write-back and things should be in order.

Yes, I thought of that.  It is 100s of hours of work.  That's why I wanted to write @Keywords with a template.
Thanks Mario.

Mario

IMatch maps hierarchical keywords to flat keywords during write-back. Did you write back the file? Does the file already have mismatching flat keywords?

QuoteYes, I thought of that.  It is 100s of hours of work. 

Mhm. I doubt this. Doing such things is usually one of the first tasks companies do when they switch to DAM from whatever cooked-up system they've used before.
IMatch can import text files into the thesaurus (lr format) which allows you to setup such hierarchies quickly in a text file in any editor. Even for thousands of keywords this should take one or two working days, even if you start from scratch.

You can even produce the base of this file via the Text Exporter in IMatch, using your existing category hierarchy as the source...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Davie101

Quote from: Mario on January 14, 2018, 06:04:36 PM
IMatch maps hierarchical keywords to flat keywords during write-back. Did you write back the file? Does the file already have mismatching flat keywords?

I'm working with brand new tifs developed in Capture One.
I add @Keywords and immediately the keyword panel is populated with hierarchical keywords.
My metadata settings are Write Hierarchical keywords & Write path elements.  Keyword Import and Keyword Lookup are off.
Metadata pen shows IPTC ... Keywords, XMP ... Hierarchical and XMP ... Subject need updating, which I do resulting in new flat keywords, 3 as expected and 3 more which are excluded in the thesaurus.
Metadata pen now says update XMP ... Hierarchical which I do and results in no change.  Metadata now up to date.

Mario

I can't follow, sorry.
Write path elements means that IMatch writes every element of the path separately. Any problems with that?
I tried it here and it works (see above).

Please use a new file and write the hierarchical keyword I used above. Make sure that Location and United Kingdom are marked as exclude for flats.
Then write back Only once.

Since IMatch mentions IPTC in the tooltiip means that your files already have IPTC metadata (which is legacy and IMatch only updates existing IPTC but never writes it to new files, according to MWG standards). If IMatch wants to write IPTC means your file already has IPTC keywords. This can mess everything up. Hard to tell, without even seeing one of your files. Please provide sample image, your thesaurus and everything else that allows us to analyze this further.

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

Davie101

Hi Mario,
I've made significant progress.  Inputting your UK/London keyword into the thesaurus taught me a few things and if I construct my thesaurus correctly my metadata template works perfectly.  Thank you for your patience!

To populate my @Keywords and thesaurus this is my plan -
1. Add my two main categories in IM5, Location and Keyword, and all sub-categories to one new image.
2. Run my template on this image - this produces an @Keywords tree identical to my old IM5 categories
3. Import @Keywords into my thesaurus
4. Delete flat keywords from thesaurus for tidiness in txt editor.
5. Run my template on old images to populate @Keywords and write hierarchical keywords.
6. I will still have 1000s of flat @keywords but I can delete these at my leisure while still having a workflow setup for new images
7. Finally, embraced IM2017 and use it the way it is designed to be used!

I've tested this out on a 1000 image batch and all seems good.

Anything that I should be aware of?

Mario

Sounds good. Testing it on representative images first is always a good idea.

Also do write backs and afterwards check what's in the image file via the ExifTool Command Processor.
There  is al "All Keywords" preset which shows you hierarchical and flat XMP/IPTC keywords.
This should reveal problems caused by preexisting keywords in your files.

Extra tip: Backup your database often. Also backup your settings database and other important IMatch data in C:\ProgramData\photools.com\IMatch6.
This way you can always go back in case there is a problem.
Doing a quick export of your thesaurus to an XML file after important changes is also a good idea. This way you have multiple versions of the thesaurus.

When all is done you can delete the extra backups.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook