Powered by Zoomin Software. For more details please contactZoomin

Semaphore Classification Server Rulebase Reference

POS

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

Specifies that Part of Speech tags are matched (when available).

Attribute added in semaphore 4.0

When using language packs POS tagging is available for most supported languages - setting this attribute will check the POS tags for the data for this rule and will only match tokens in a document which have the same part-of-speech.

When using language packs pos=“1” is the default if stem="1" is asked for (ie stem matches are always POS restricted) since this appears to be the most wanted behaviour.

If a particular term is not matching due to an error in guessing the part of speech when processing the rulebase switching off pos matching for that term may help.

Example

<sentence pos="1" data="a green pub"/>

This will not fire for “Mr Green was seen entering a pub” since the part of speech for green will be determined as an adjective for the sentence rule - this will not match “Green” as a proper-noun

Note: For Classification Server versions 4.0.x, using Language Pack 4.0 setting stem=“1” for a rule would automatically set the pos attribute rule for a rule. This means that the pos attribute was not inherited from a parent rule if stem was used.

You could override by setting the pos attribute directly on the rule and/or adjust the default value which stem=“1” would set by editing the Classification Server configuration file, and adding / adjusting this property:

<property name=“ForcePOSMatch” value=“[X]” />

to the ruleloader bean.

Where X is true(1) or false (0) which sets the pos attribute to 1 or 0 respectively when stem=“1” applies

As an example, the bean may look like this:

  <property name="allocation" value="3000000"/>
    <property name="ForcePOSMatch" value="false" />

Also note that when the config file change is made, not only does the Classification Server need to be re-started (as usual for any config file changes), but also the rules need to be re-compiled (e.g. by re-Publishing, or forcing Classification Server to re-compile from a .pak file (e.g. by deleting the \compiled directory)).

For Language Packs version 4.1 this behaviour has been changed and stem and pos are orthoganal attributes and inherited as normal

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