Powered by Zoomin Software. For more details please contactZoomin

Semaphore Classification Server Rulebase Reference

TEXT

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

A TEXT rule triggers if the word is found in the source.

This means that the given score for the rule (1.00 by default) will be returned to its parent rule along with the set of all occurrences of the word in the document for further evaluation.

TEXT rules (along with EXPRESSION rules) are the leaf nodes of the ruletree (i.e. they have no children just look for the particular text within the document).

When TEXT rules given in the XML are parsed by CS into a binary representation (known as the rulenet) it will check that the data for the rule is a single word. If the data is not a single word CS will automatically rewrite the rule as a PHRASE rule with appropriate TEXT rules as its children. This means that for practical purposes you may use <text> or <phrase> rules interchangeably however when looking at the output of the rules as used by CS you may at times need to be aware that CS can and will expand / rewrite the rules given in the XML to create the intended effect of the rule as appropriate.

Attributes

Children

  • None

Example

The following document text

Jean-Claude Trichet announced today a rise of 1/2 point in interest rates.
In a separate intervention the governor of the European Central Bank announced that the
institution will keep a firm handle on inflation.

Evaluated with the following rules as part of the rulenet:

    <category class="test" name="text1">
      <text data="Trichet" />
    </category>

This is simply a category rule (a type of rule which is returned in the response if it is fired) which has a single text rule as a child (hence if the text rule fires then the category rule will fire - i.e. there is no other evaluation to occur)

Will return the following META in the response

...
<META name="test" value="text1" score="1.00"/>
...

NB when a category rule is returned as a meta note that the class becomes the name of the meta and the name of the category becomes the value

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