Powered by Zoomin Software. For more details please contactZoomin

Semaphore Publisher Template Reference

labeltypes

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

Label types allow the user to specify which labels in the model a rule will be generated for (so different weightings can be applied). A rule will only be generated for a label that has a label type matching that defined on the rule.

With the release of Publisher in version 4.0.33, the labeltypes attribute was introduced. For backwards compatibility, “termtypes” is still a valid attribute and the possible values for termtypes (PT and NPT) will work with the labeltypes attribute. Valid values for labeltypes will also work with the termtypes attribute. However, in versions prior to 4.0.33, only termtypes and its specific values are valid.

Note: If no labeltypes are specified on a rule, then all labeltypes are valid.

Note: When combined with wordtypes and/or behaviourtypes, only labels that have all specified wordtypes, labeltypes and behaviourtypes will have rules generated.

Applies to

Values for labeltypes

The following values can be used:

Types Description
prefLabel The Preferred Label
altLabel All Alternate Labels and sub-types
alternative label All Alternate Labels of the base type “alternative label”, not including the sub-types
Any Alternate Label sub-type The Alternate Labels of the Concept of the specified sub-type

Multiple labeltypes can be specified using the pipe character, ‘|’. So, to generate rules for Preferred Labels and Alternate Labels the following syntax can be used: “prefLabel|altLabel”.

Additionally, Alternate Label sub-types can be excluded as needed using a ‘^’ between types. For example, if your model has the Alternate Label sub-types “Acronym” and “Abbreviation”, you can have a labeltypes value of “altLabel^Acronym” - this would create the rule for all Alternate Labels and sub-types except for the Acronym sub-type. Multiple sub-types can be excluded if required; for example, “altLabel^Acronym^Abbreviation”.

Example

For a model that contains a concept with the prefLabel ‘Drug Trafficking’ and with alternative labels ‘Drug Barons’, ‘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
Dealer alternative label, altLabel NOUN
LSD altLabel:Acronym ACRONYM
THC altLabel:Acronym ACRONYM

Using the following template rule:

<phraselist field="body" case="0" stem="1" weight="40" skip="0" foreach="1" labeltypes="prefLabel" wordtypes="MULTIWORD"/>

would generate the output:

<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="Drug Trafficking"/>

Using the following template rule:

<phraselist field="body" case="0" stem="1" weight="40" skip="0" foreach="1" labeltypes="altLabel" wordtypes="ALLTYPES"/>

would generate the output:

<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="Drug Barons"/>
<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="Dealer"/>
<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="LSD"/>
<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="THC"/>

Using the following template rule:

<phraselist field="body" case="0" stem="1" weight="40" skip="0" foreach="1" labeltypes="altLabel^Acronym" wordtypes="ALLTYPES"/>

would generate the output:

<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="Drug Barons"/>
<phrase field="body" case="0" stem="1" weight="40" skip="0" foreach="1" data="Dealer"/>
TitleResults for “How to create a CRG?”Also Available inAlert