Hierarchical Keyword Dictionary Import

Zoom supports importing a keyword stock/dictionary to its repository. This dictionary can be viewed from the Asset Browser and keywords from it can be applied to the assets in Zoom.

Any embedded (XMP) keywords found in the “IPTC: Keywords” property of an asset, if not already present in a categorized keyword, will be added automatically under the keyword panel’s “Uncategorized” bin in the Asset Browser. You can choose to move these to a categorized bin after a review.

Keyword Dictionary Retrieval

The zm getkwstock CLI command can be used by an admin to download the entire master keyword dictionary stored at the repository.

> zm help getkwstock
getkwstock [-m|–mtime] [–print-ID] [–from-rrn v]
The command supports the following options:
-m|–mtime Last modification time:
–print-ID Print the Ids also
–from-rrn v The reference rrn after which, all changes to the keyword stock must be fetched from the server.
The specified file containing keywords is imported to zoom. The command has various options which let you check duplication on the client as well as server side.Examples:
zm getkwstock
zm getkwstock –print-ID
zm getkwstock –from-rrn 5032
Gets the complete keyword dictionary from the repository if there have been changes since the indicated input time or indicated RRN.
If the keyword dictionary has not been modified since the input time, the server simply returns

Example of a keyword dictionary returned by the zm getkwstock CLI

getkwstock

Keyword Dictionary Import

The zm editkeyword CLI command can be used by an admin to import the master keyword stock into the repository.

> zm help editkeyword
editkeyword -kf|–kwfile v [-adf|–abortOnDuplicatesWithinFile] [-oda|–onDuplicateAbort] [-odr|–onDuplicateReplace] [-odm|–onDuplicateMerge]The command supports the following options:-kf|–kwfile v A file which contains the list of keywords to be imported.
-adf|–abortOnDuplicatesWithinFile Abort the operation when duplicates are present in the .txt file.
-oda|–onDuplicateAbort Abort the operation when you are trying to import keywords which are already present on the server.
-odr|–onDuplicateReplace Replace the already existing keywords on the server in case of duplication.
-odm|–onDuplicateMerge Merge the keywords with already existing keywords on the server in case of duplication.The specified file containing keywords is imported to zoom. The command has various options which let you check duplication on the client as well as server side.Examples:
zm editkws -kf filePath
zm editkws -kf filePath -adf
zm editkws -kf filePath -oda

Format of Input Keyword Stock

Author

J K Rowling
Sidney Sheldon

Sports

Cricket
Football
Hockey
Ice
Air
Table Tennis
Baseball

Colors

Red
Blue

 

The input file is a simple tab delimited text file arranged to indicate the required hierarchical organization of the keywords using TAB characters as a separator.

Some simple pointers while constructing the input keyword stock file:

  • Enter a single keyword per line
  • If the keyword is child of the keyword in the previous line, add one more tab to indent further
  • If the keyword is the sibling of the parent of the keyword in the previous line, then remove one tab to un-indent
  • If the keyword is at the same hierarchy as the previous keyword, add/remove no indents
“Cricket” is a child keyword to the entry “Sports” in the previous line. Therefore, this keyword is added after a tab (indent)
“Table Tennis” is the sibling of “Hockey” which is the parent of the keyword “Air” in the previous line. Therefore, this keyword is added after removing a tab (unindent)
“Football” is at the same hierarchy as the entry “Cricket” in the previous line.

Other options available

-adf : (–abortOnDuplicatesWithinFile) Abort the operation when duplicates are present in the .txt file.
-oda : (–onDuplicateAbort) Abort the operation when you are trying to import keywords which are already present on the server.
-odr : (–onDuplicateReplace) Replace the already existing keywords on the server in case of duplication; in effect, this means that if there are child keywords under the duplicate on the server, they will be replaced by the child keywords in the input file if any.
-odm : (–onDuplicateMerge) Merge the keywords with already existing keywords on the server in case of duplication; in effect, this means that if there are child keywords under the duplicate on the server, they will be merged with the child keywords in the input file if any.

Keyword Dictionary Delete

If the keyword stock/dictionary needs to be deleted from the server to start afresh please follow these steps as a system administrator:

This should be done by an experienced Zoom System Administrator as it involves stopping the server and deleting specific database files.

  1. Checkpoint the Zoom server before proceeding
  2. Once the checkpoint is finished, shut down the Zoom server again
  3. Make a backup of the following files first and then delete these files from the Zoom server’s database folder:
    1. assetkeywordmap.db
    2. kwidmap.db
    3. kwtracker.db
    4. keywordstock.db
  4. Restart the Zoom server
  5. Open Asset Browser and confirm all the keywords are deleted
  6. Now you can start afresh and import a new dictionary

Auto-extraction of XMP IPTC:Keywords

As mentioned earlier, Zoom support automatically extracting XMP based IPTC:Keywords from an asset I not disabled in the metadata schema. If the XMP embedded value uses a pipe character (|) as a separator, Zoom can parse that and map it to a keyword hierarchy. For example ,’Parent | Child’, embedded in an XMP section of the file, will create the keywords Parent and Child in the Uncategorized bin of the keywords dictionary, and apply the Child keyword on the asset if under the keyword Parent.

Leave a Comment