Powered by Zoomin Software. For more details please contactZoomin

Semaphore Classification Server Rulebase Reference

INTERSECTION_WHEN_OVERLAPPING

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

New in Semaphore 5.10.1

finds the intersection between child phrase ranges which have some overlap

Score calculation

Scores the weight of the rule if any intersected phrase ranges

Evidence calculation

The evidence is all the intersections between phrase ranges which have some overlap

Attribute information

Children restrictions

Any rule other than those restricted to a specific parent

The INTERSECTION_WHEN_OVERLAPPING rule is similar but has slightly different behaviour to the INTERSECTION rule. It has been added for completeness since we added the SELECT_WHEN_OVERLAPPING. The difference between the intersection rule and this is only in edge cases and at first we considered changing the intersection rule to have this new behaviour but decided the risk of breaking existing working rules was too high. The motivating case for the new behaviour was the following.

Example

   <intersection>   
      <text data="A B" />
      <text data="B C" />
      <text data="C D" />
   </intersection>

  This has A B C D as a sequence.

Try it

Here there is no intersection between all three children and so no firing or evidence for the rule. The original design for the rules however accepted that this was a reasonably common use case. At first the thought was if you wanted the simple “any” intersecting behaviour for the select you could wrap the three children in an <any> rule converting this to a single child for the INTERSECTION

   <intersection>   
     <any>
      <text data="A B" />
      <text data="B C" />
      <text data="C D" />
     </any>
   </intersection>

Try it

This appeared to do the job - so in the above example “A B C D” is found as the (single phrase range) intersection. However this is actually wrong (the intersection is actually “B” and “C” not “A B C D” and was happening by a slightly broken implementation. When INTERSECTION has a single child it’s evidence is simply that childs evidence (with a rewrite to a single phrase range for overlapping phrase ranges) - rather than the true intersections from that child.

This is shown more obviously by adding in a phrase range which has no intersection

   <intersection>   
     <any>
      <text data="A B" />
      <text data="B C" />
      <text data="C D" />
      <text data="sequence" />
     </any>
   </intersection>

Try it

Here despite the fact that “sequence” has no intersection it ends up being part of the INTERSECTION evidence phrase range.

As said above the original idea was to alter the INTERSECTION behaviour so that it looked for intersection in a single childs evidence list allowing the use of <any> as above to give the “any intersection” behaviour as often wanted.

However this was felt to be too risky since INTERSECTION has been used in many already published rulenets and changing the behaviour when given a single child would risk silently breaking clients previously working rules when they upgraded.

So a new rule INTERSECTION_WHEN_OVERLAPPING has been added which has the wanted behaviour. For this rule it makes no difference if the <any> is used or not - ie it takes the union of all its childrens phrase range evidence and looks for an intersection between them

   <intersection_when_overlapping>   
     <any>
      <text data="A B" />
      <text data="B C" />
      <text data="C D" />
      <text data="sequence" />
     </any>
   </intersection_when_overlapping>

Try it

This just finds the phraseranges in its child (the any) which have overlap and intersects those - so will have 2 phrase ranges as evidence “B” “C” and will not include “sequence” as originally wanted.

Note as mentioned since this is a new rule we decided to give this binary overlap selection behaviour even when there are multiple children - so actually the <any> above is not needed

   <intersection_when_overlapping>   
      <text data="A B" />
      <text data="B C" />
      <text data="C D" />
      <text data="sequence" />
   </intersection_when_overlapping>

Try it

Which has the same result.

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