ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: audiogalaxy on December 02, 2020, 02:39:24 AM

Title: replace / add table (keywords)
Post by: audiogalaxy on December 02, 2020, 02:39:24 AM
Hallo, I was wandering for some great trick by Phil (or some very experienced user!) to create some "conversion / add tables" to work on keywords (or keywords-like fields) as I'm trying to explain as follows:

WAY 1) search and replace keyword : given the keyword "red" (if found) in the keyword (subject...) field among other keywords, it has to be replaced with <something>
examples for <something> = rouge /// red color /// green /// red led  /// red lights /// carta

WAY 2) search keyword, ADD a list of keywords: given the word "apple" (if found) it must be added a list of the following keywords: red, yellow, green, vegetable, food and drink, healthy food ... ... and so on.

this with LISTS of add/replacements

so that I could replace a list of the same things with some other things in my "dictionaries"

A list of keywords related to people, another to abstract concepts, another with typical orthographic errors...

(is there a chance to have another way to correct orthographical errors "automatically"?)

Thanks to everyone trying to think about this... but MANY thanks to everyone trying to SOLVE this!!!!!!!  :D ;D
Title: Re: replace / add table (keywords)
Post by: Phil Harvey on December 02, 2020, 08:44:04 AM
You will find it is tricky to do this properly.  You can't just replace "red" with "green" for example.  What happens if a keyword is "reduction", or "Red Barn"?

If you can figure out how to handle all cases like this, then the best way to do this is with a user-defined tag in a config file.  This can certainly be done, but I don't have the time right now or enough details to be able to do this for you.

- Phil
Title: Re: replace / add table (keywords)
Post by: StarGeek on December 02, 2020, 10:41:01 AM
Try the config file in this post (https://exiftool.org/forum/index.php?topic=11838.msg63836#msg63836).  Given a keyword in the DATA section, it will be replaced by all the keywords that follow it.
Title: Re: replace / add table (keywords)
Post by: audiogalaxy on December 06, 2020, 03:18:22 PM
Quote from: StarGeek on December 02, 2020, 10:41:01 AM
Try the config file in this post (https://exiftool.org/forum/index.php?topic=11838.msg63836#msg63836).  Given a keyword in the DATA section, it will be replaced by all the keywords that follow it.

Thanks Star! I'll give a try!