Specify rules with either Request parameters or a database table in the ModelTable syntax element of AMLGenerator. Specify the dictionary with the InstalledFile and InstalledFileTag syntax elements of AMLGenerator.
When a rule uses a dictionary file, you must first install the dictionary file on ML Engine and then specify its name in the InstalledFile clause when you invoke AMLGenerator with InstalledFileTag DICT.
The following examples show different usage of rules and the dictionary.
Example 1: No Model File, Request Parameter Specifies TaggingRules
RequestArgName1 ('TaggingRules') RequestArgVal1 ('contain(content, "floods", 1, ) OR contain(content, "tsunamis", 1,) AS Natural-Disaster')
Example 2: Rules Table is Database Table, No Dictionary File
ModelTable ('rules')
or
ModelTable ('rules') ModelTableTag ('PREDICT')
Example 3: Request Parameters Specify TaggingRules and Two Dictionary Files
InstalledFile ('file1') InstalledFileTag ('DICT') InstalledFile2 ('file2') InstalledFile2Tag ('DICT') RequestArgName1 ('TaggingRules') RequestArgVal1 ('tag1, DICT(content,"file1",1, )', 'tag2, DICT(content,"file2",1, )')
Example 4: ModelTable Syntax Element Specifies Both Rules Table and Dictionary
The rules in the rule table, 'rules', can contain references to the dictionary files, 'file1' and 'file2'.
ModelTable ('rules') ModelTableTag ('PREDICT') InstalledFile ('file1') InstalledFileTag ('DICT') InstalledFile2 ('file2') InstalledFile2Tag ('DICT')