ID: 2371

Print Friendly, PDF & Email

Keyword Stock Handling

Article on keyword ingestion, edit and viewing in Zoom

 

Zoom supports ingest of the master keyword stock/dictionary in its repository. This stock can be viewed from the Asset Browser (and via zm commands on the terminal) and keywords from it can be applied on the assets in Zoom. Apart from the keywords ingested through this mechanism, any keywords found embedded in the assets being checked into Zoom will also automatically get added to the stock.

The embedded keywords in the “IPTC: Keywords” property present in an asset, if it is not a categorized keyword, will be found under the keyword panel’s “Uncategorized” heading in Asset Browser.

The ZM GETKWSTOCK command can be used to view the master keyword stock from 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 refrence 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 lets 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

Sample Keyword Stock Output

getkwstock

The ZM EDITKEYWORD command can be used 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 in 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 lets 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 text file arranged to indicate the required hierarchical organization of the keywords using TAB characters (indents).

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 previous line, add one more tab to indent further
  • If the keyword is the sibling of the parent of the keyword in 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 (un-indent)
“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 in 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.

 

If the keyword stock/dictionary needs to be deleted on 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