Powered by Zoomin Software. For more details please contactZoomin

Semaphore Classification Server Rulebase Reference

COMBINE

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

Used to combine the children rules into a single rule

Score calculation

“Adds” the scores of its children rules together - see below for details

Evidence calculation

The evidence is the union of all its children’s evidence.

Attribute information

Children restrictions

Any rule other than those restricted to a specific parent

Details of scoring

The actual calculation of the combined score is reasonably complex - a simple sum would not work for scores since these scores are confidence measures so 0.5 + 0.5 should not equal 1.0 as normal addition would give (consider I’m 50% sure of A and 50% sure of B so therefore I’m 100% sure of A + B? - just doesn’t make sense).

The actual formula used is:

  EQ1:   P = W * [1 - (1-A)(1-B)(1-C)...]

where A, B, C, ... are the scores of the children
  * W is the weight on the rule (0..1) (ie the value of the weight parameter divided by 100)
  * P is the resultant score on the accrue (0..1)

Note for the combine of 2 scores the equation above simplifies to:

     P = W(A + B - AB)

where A,B are the child scores - since we often talk about scores as the integer value -100 <= score <= 100 we have

    combine( 50, 50 )

    == combine( 1/2, 1/2 )

    == 1/2 + 1/2 - (1/2*1/2)

    == 1 - 1/4

    == 3/4

    == 75 (when expressed as integer score)

Negative scores

The above equations do not work as we would like if you just use negative weights directly. Instead when a negative score is used as a child for a combine the inverse of the positive score is used instead in the above equations.

The inverse of the positive score is defined as the number which when combined with the positive score will give 0 eg:

    -50 is defined for the combine calculation as the number X which when combined with 50 gives 0

    combine( 50, X ) == 0

    1/2 + X -1/2X == 0

    1/2X = -1/2

    X == -1 for the purposes of the combine calculation

This has been done since it gives the most sensible meaning to negative scores in combine equations so

    combine( -50, -50 ) == -75

ie is the negative equivalent of

    combine( 50,50) == 75 )

Example

The following document body:

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 against the following sample rulebase fragment:

<category class="test" name="combine1" label="link.combine1">
    <combine weight="100">
        <text data="Jean-Claude Trichet" weight="80"/>
        <phrase weight="80">
            <text data="governor" weight="100"/>
            <skip count="2"/>
            <text data="European Central Bank" weight="100"/>
        </phrase>
    </combine>
</category>

Will return the following META in the output:

...
<META name="test" value="combine1" score="0.96"/>
...

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