Working with Macros
Macros can simplify the appearance of text link analysis rules by allowing you
to group types, other macros, and literal (word) strings together with an OR
operator (|
). The advantage to using macros is that not only can you reuse macros
in multiple text link analysis rules to simplify them, but it also enables you to make updates in
one macro rather than having to make updates throughout all of your text link analysis rules. Most
shipped TLA rules contain predefined macros. Macros appear at the top of the tree in the leftmost
pane of the Text Link Rules tab.
The following fields and tables are shown in the simulation results:
Name. A unique name identifying this macro. We recommend that you prefix macro names with a lowercase m to help you identify macros quickly in your rules. When you manually refer to macros in your rules (by inline editing or in the source view) you have to use the $ character prefix so that the extraction process knows to look for this special name. However, if you drag and drop the macro name or add it through the context menus, the product will automatically recognize it as a macro and no $ will be added.
Macro Value table.
- A number of rows representing all of the possible values this macro can represent. These values are case-sensitive.
- These values can include one or a combination of types, literal strings, word gaps, or macros. See the topic Supported Elements for Rules and Macros for more information.
- To enter a value for an element in a macro, double-click the row you want to
work in. An editable text box appears in which you can enter a type reference, a macro reference, a
literal string, or a word gap. Alternatively, right-click in the cell to display a contextual menu
offering lists of common macros, type names, and nonlinguistic type names. To reference a type or a
macro you must precede the macro or type name with a ‘
$
’ character such as$mTopic
for the macromTopic
. When combining arguments, you must use parentheses( )
to group the arguments and the character|
to indicate a BooleanOR
. - You can add or remove rows in the Macro Value table using the buttons to its right.
- Enter each element in its own row. For example, if you wanted to create a
macro that represents one of 3 literal strings such as
am OR was OR is
, you would enter each literal string on a separate row in the view, and your Macro table would contain 3 rows.