Powered by Zoomin Software. For more details please contactZoomin

Semaphore Publisher Template Reference

nearlist

  • Last Updated: May 29, 2026
  • 1 minute read
    • Semaphore
    • Documentation

The nearlist rule will create a near rule for any labels that have the wordtypes, behaviortypes, and labeltypes defined on the rule.

Attributes

The nearlist rule allows all attributes that are defined on the near rule to be added.

In addition it can have the following template specific attributes:

Example 1

For a model that contains the concept ‘Drug Trafficking’ with alternative labels ‘Drug Barons’, ‘Drug Lords’ (set to ‘Treat as exact phrase only’), ‘Dealer’, ‘LSD’, ‘THC’ these labels would get assigned the following labeltypes and wordtypes:

label labeltypes wordtypes
Drug Trafficking prefLabel MULTIWORD
Drug Barons alternative label, altLabel MULTIWORD
Drug Lords [Treat as exact phrase only] alternative label, altLabel MULTIWORD
Dealer alternative label, altLabel NOUN
LSD alternative label, altLabel ACRONYM
THC alternative label, altLabel ACRONYM

Using the following template rule:

<nearlist field="body" count="2" case="0" stem="1" weight="40" foreach="1" labeltypes="prefLabel|altLabel" wordtypes="MULTIWORD"/>

would generate the output:

<near field="body" count="2" case="0" stem="1" weight="40" foreach="1" data="Drug Barons"/>
<near field="body" count="2" case="0" stem="1" weight="40" foreach="1" data="Drug Lords"/>
<near field="body" count="2" case="0" stem="1" weight="40" foreach="1" data="Drug Trafficking"/>

Example 2

Given the same concept as in Example 1, the following template rule (with the True attribute set):

<nearlist field="body" count="2" case="0" stem="1" weight="40" foreach="1" behaviourtypes="^Treat as exact phrase only" labeltypes="prefLabel|altLabel" wordtypes="MULTIWORD"/>

would generate the output:

<near field="body" count="2" case="0" stem="1" weight="40" foreach="1" data="Drug Barons"/>
<near field="body" count="2" case="0" stem="1" weight="40" foreach="1" data="Drug Trafficking"/>

The concept ‘Drug Lords’ is excluded since its label property “Behaviour in rulebase” is set to “Treat as exact phrase only”, which has been excluded by the True attribute.

TitleResults for “How to create a CRG?”Also Available inAlert