SENTENCE
- Last Updated: May 13, 2026
- 1 minute read
- Semaphore
- Documentation
The sentence rule identifies an occurrence of two or more elements in the same sentence. (Note that children that have a NOT attribute have sentence level scope i.e. not within the same sentence as the other data)
Since Semaphore 3.5 the DATA attribute is now supported for this rule. The provided text will be parsed and each token found will be appended as a child text rule. This is mainly as a convenience to avoid typing but also avoids issues where the tokenisation is not easily determined for the text
Attributes
- _KEY
- DATA Since Semaphore 3.5
- FOREACH
- LABEL
- NOT
- SCALE
- USE_ZONE_AS_EVIDENCE Since Semaphore 3.5
- WEIGHT
- WIDTH
Children
Example 1
The following rulebase fragment
<sentence>
<text data="Jean-Claude Trichet" />
<text data="interest rates" />
</sentence>
Would fire on the following text
Jean-Claude Trichet announced today a rise of 1/2 point in interest rates.
But would not fire on the following
Jean-Claude Trichet was announced today as the Governor of the Bank of England.
Part of his duties in this role would be to announce any changes in the interest rates.
Example 2
<sentence data="same sentence in" />
is equivalent to
<sentence>
<text data="same"/>
<text data="sentence"/>
<text data="in"/>
</sentence>
and would fire in a document containing
This sentence has the same words in it.