FastPhotoTagger
Using Hierarchical Keywords








Hierarchical keywords provide a finer control over selection of the keywords that describe your photos.

In particular, hierarchical keywords provide a way to disambiguate keywords that may have multiple meanings. Examples:
- Does the keyword "orange" signify a fruit or a color?
- Does the keyword "spring" signify a season or a body of water?
- Does the keyword "Fred" signify your uncle Fred or your cousin Fred?




Hierarchical keywords are defined in an outline format that makes it clear which meaning you intend to assign to your photos.

_Fruit
__Apple
__Orange

_Color
__Red
__Orange

Keyword Lists and checkbox entry mode make it easy to define and set hierarchical keywords.

Hierarchical keywords use a format employed by several other photo metadata programs. But this is not an official standard. For maximum portability of your photos you should always create a "flattened" version of your hierarchical keywords. FastPhotoTagger makes this easy.

Here are the steps for using hierarchical keywords, keyword lists, and checkbox mode
o Enter hierarchical and flattened keywords into Program Settings
o Create keyword list files
o Enter keyword list files into Program Settings
o Use checkbox entry mode to enter keywords




Enter Hierarchical Keyword Metadata Into Program Settings


FastPhotoTagger allows you to use any list-type metadata field as a hierarchical keyword field. For maximum usability of your photos with other metadata programs, you should use "XMP:XMP-LR:HierarchicalSubject" as your hierarchical keyword field. Enter your choice into the "Program Settings / Metadata" panel.

Choose a metadata field to contain the flattened version of your hierarchical keywords. "MWG:Keywords" is recommended. This is an ExifTool composite tag that will actually write to other tags based on MWG guidelines. (If you use MWG:Keywords do not also use its derivative fields IPTC:Keywords and XMP-dc:Subject in your metadata list.) Enter your choice into the "Program Settings / Metadata" panel.




Next, right click on the "Program Settings / Metadata" panel to open the popup menu. Select "Hierarchical Keywords". When the "Hierarchical Keywords" panel opens, right click again and select "Insert Rows". In the Hierarchical column, select "XMP:XMP-LR:HierarchicalSubject" or your other choice. In the Flat List column select "MWG:Keywords" or your other choice.

Close the Program Settings panels.






Format of Hierarchical Keywords


Hierarchical keywords use the bar ("|") character as an internal delimiter. So if you choose "Fruit Orange" as your hierarchical keyword, the text "Fruit|Orange" will be written as metadata to the hierarchical keyword field. Both keywords, "Fruit" and "Orange" will be written to the flattened keyword field.

Here is a more complicated example. If you choose "USA California La Jolla" as your hierarchical keyword, all partial keywords from left to right will be written as hierarchical keywords:

Hierarchical: USA; USA|California; USA|California|La Jolla;

(Checkbox entry mode provides control over exactly which hierarchical keywords are written.)

These keywords will be written to the flattened field:

Flattened: USA; California; La Jolla;




Create Keyword List Files


A keyword list file is a text format file that defines a set of keywords and their hierarchical relationships, if any. Keyword list files are created outside of FastPhotoTagger using a text editor, word processor, or spreadsheet program. (Saving a spreadsheet as .csv with tab as a delimiter is a handy way to create a keyword list file.)

Many ready-made keyword lists are available on the internet, both for free and for fee. Search "Keyword Lists for Photographers."

Here is a simple keyword list file. There are no hierarchical relationships between the keywords.

apple
banana
cherry
grape
mango
orange

Here are the same keywords; this time they are identified as fruit in a hierarchical relationship. The fruit names are indented one space or tab under the title "fruit". (Spaces are shown here as "_" for clarity.) We refer to "fruit" as the parent keyword of "apple".

fruit
_apple
_banana
_cherry
_grape
_mango
_orange

Keyword hierarchies can extend to any number of levels.

fruit
_apple
__cortland
__delicious
___golden
___red


Synonyms

Now suppose whenever you write "apple" as a keyword, you also want to write the apple's scientific name as a keyword. This can be done using the "Synonym" feature of keyword lists. Synonyms are surrounded by { and } which are not actually part of the synonym. Synonyms immediately follow their parent keyword at the next indentation level. There can be any number of synonyms, one per line.

fruit
_apple
__{Malus pumila}
__cortland
__delicious
___golden
___red

Now whenever you write "fruit|apple|cortland" you will also write "fruit|Malus pumila|cortland".

Categories

If you have a very long list of keywords. You can organize the list into large groups called "Categories". Categories are primarily used for organizational purposes are not usually written as keywords. Category names are surrounded by [ and ] which are not actually part of the category names.

[Stuff To Eat]
_fruit
__apple
___{Malus pumila}
___cortland
___delicious
____golden
____red




Enter Keyword List Files Into Program Settings

To specify the keyword list files that you will use with FastPhotoTagger, open "Program Settings" and select the "Keywords" tab. Right-click to open the popup menu, select "Insert Rows", and then select a file. Alternatively, you can simply drag a file onto this panel. (This does not move or change that file.)

Each keyword list file may be marked as Active or Inactive. You can temporarily change a file's activity status during checkbox entry mode.






Checkbox Entry Mode


To use your keyword lists, you must switch from text entry mode to checkbox entry mode. On the Metadata Panel (or in the Fast Tagger or in the Search Metadata panel) right-click in a text entry field. The keywords checkbox panel will open and display all the keywords in your active keyword list files.

If you want to write [Category] names as part of metadata check the "Include Parent [Categories]" box.
If you want to write Parent Keywords as part of metadata check the "Include Parent Keywords" box.
If you want to write Synonyms as part of metadata check the "Include {Synonyms}" box.

Then you can navigate the list of keywords, expanding and contracting the hierarchy, and checking appropriate keyword boxes.

Use the search field to find keywords that may be deep in the hierarchy and not visible. You may search for categories, keywords, and synonyms. Matches are highlighted and the tree containing the latest match is expanded. The search starts at the latest match and wraps around the tree. Search is case insensitive.

Use the + field to add keywords that are not in your keyword files. These typed keywords will be appended to the list of checked keywords. Be sure to end each keyword with the semi-colon delimiter.

For the duration of this tagging session, you may change the activity status of your keyword lists by checking/unchecking keyword filenames.


 
 
In the example above, checking "geyser" automatically checks "nature" because the "Include Parent Keywords" box is checked and "nature" is the parent keyword of "geyser". The keyword "active" will be added to the list of keywords.

When finished, press the "Change" button. This will also activate all the "Change" buttons on the Metadata Panel. (Subsequently, the checkbox panel will open automatically until you cancel it.)

When you change a hierarchical keyword field the flattened version of the keywords is copied to the flattened keyword field.



As usual, your changes are copied to the "Program Settings / Pending Changes" panel where they can be reviewed before being written to the photos.




Searching For Hierarchical Keywords

When searching a hierarchical keyword field, use the bar character to specify the levels of keyword, e.g., "nature|geyser". You can also right-click in the value part of the search term to use checkbox entry mode. The selected hierarchical keyword will be copied to the value field.

You can search as many or as few levels of the hierarchy as you need. Using the earlier example, if your hierarchical keyword is "USA|California|La Jolla", you can search for "USA" or "USA|California" or "USA|California|La Jolla".

(If you invoke checkbox entry mode on a non-hierarchical keyword, check all the keywords you wish to search for.)





Searching a Hierarchy Without Hierarchical Keywords

If you have tagged only with flat keywords, you can still get some of the benefits of hierarchical keywords.

Put your existing keywords into a hierarchy. Suppose you've tagged with apple, orange, baseball, football. Create a hierarchy using these keywords, such as

fruit
_apple
_orange
games
_baseball
_football

(Spaces are shown here as "_" for clarity.)

Put this into a keyword list file. Enter it into Program Settings as described above. Be sure the Active box is checked.

Now, when you search, display the keyword dialog and select a parent keyword, e.g., fruit. Then surround the keyword with brackets, e.g., [fruit].



This search will find images tagged with apple or orange or fruit. You may also prepend the item with + or -. +[fruit], -[fruit].

(The search is actually for any keywords that contain the hierarchical keywords as whole words. For example, the above search will also find "orange juice.")