Powered by Zoomin Software. For more details please contactZoomin

Semaphore Publisher Template Reference

bracketlist

  • Last Updated: May 13, 2026
  • 2 minute read
    • Semaphore
    • Documentation

The bracketlist rule can be used to process labels that have qualifiers in brackets e.g. ‘Clothes (cycling)’. The rule that will be generated is dependent on the value specified via the ACTION attribute.

Note there is also the brackethandler which globally defines how labels with qualifiers are processed for every rule in the template EXCEPT bracketlist rules - that is, a bracketlist rule will override the settings in the Bracket Handler, but other rule types in the template (e.g. a phraselist rule) will use the settings of the Bracket Handler. Therefore, to effectively use the bracketlist rule, the Bracket Handler should be turned ‘off’, which can be done globally or on a config set by config set basis. Instructions for both globally turning ‘off’ the Bracket Handler, or on a config set by config set basis, is found at the top of the Variant Handlers page linked above.

If the bracketlist rule is not used with labels that have qualifiers, and the Bracket Handler is ‘off’, the entire label must be matched - i.e. including the qualifier.

This rule also supports square brackets e.g. ‘Clothes [cycling]’

Only labels that have a space and then brackets at the end of the term will be processed.

For example:

  • ‘Clothes (cycling)’ would be used
  • ‘401(k)’ would not as there is no space before the opening bracket
  • ‘section 9(2B) rights’ would not as the brackets not at the end of the term

Attributes

The bracketlist rule allows all attributes that are valid for the respective rulebase rules generated (see below for which rules can be generated).

In addition it can have the following template specific attributes:

  • labeltypes
  • action - STRIPBRACKETS, COMBINEBRACKETS

Note: The attribute behaviourtypes is not available for this rule.

STRIPBRACKETS

If action of STRIPBRACKETS is set then a rule will be generated that contains only the text before the qualifier in brackets e.g. ‘Clothes (cycling)’ would generate a rule ‘Clothes’.

For MULTIWORD prefLabels, the rule generated will be a phrase rule. For MULTIWORD altLabels, a sentence rule will be generated.

For single word prefLabels and altLabels, the rule generated will be a text rule.

COMBINEBRACKETS

If action of COMBINEBRACKETS is specified then a paragraph rule will be generated that will find the main words of the label and the qualifier (with brackets removed) within the same paragraph (in any order); e.g. ‘Clothes’ in the same paragraph as ‘cycling’.

Example 1

For a model that contains the concept ‘Cycling (clothes)’

Using the following template rule:

<bracketlist action="STRIPBRACKETS" field="body" case="0" stem="1" weight="40" foreach="1" labeltypes="prefLabel|altLabel"/>

would generate the output:

<text field="body" case="0" stem="1" weight="40" foreach="1" data="Cycling"/>

Example 2

For a model that contains the concept ‘Cycling (clothes)’

Using the following template rule:

      <bracketlist action="COMBINEBRACKETS" field="body" case="0" stem="1" weight="40" foreach="1" labeltypes="prefLabel|altLabel"/>

would generate the output:

<paragraph field="body" case="0" stem="1" data="Cycling clothes" weight="40" foreach="1"/>
TitleResults for “How to create a CRG?”Also Available inAlert