Skip to content

Compound sequences

Positional and logical sequences may be combined to create compound sequences.

The syntax is like this:

operand1
positionalOperator
operand2
logicalOperator
operand3
...

Compound sequences are viewed by the text intelligence engine as separate sub-conditions joined by the positional and logical operators.
Consider the following example:

SCOPE SENTENCE
{
    DOMAIN(dom1:NORMAL)
    {
        TYPE(NOU, NPR, NPH)
        &SV
        LEMMA("investigate")
        <1:3>
        ANCESTOR(3113, 48760, 33606)//  3113: crime, offence, offense  48760: decease, last, death, tomb, mortality  33606: fortuitous event, fortuity, chance event, accident
    }
}

In the sample case, the first sub-condition is composed by the first two attributes linked by the logical operator (&SV), while the second is composed by the last two attributes linked by the positional operator (<1:3>). Therefore, the whole condition can be represented in the following way:

1. TYPE(NOU, NPR, NPH) &SV LEMMA("investigate")
2. LEMMA("investigate") <1:3> ANCESTOR(3113, 48760, 33606)

The first sub-condition matches a common noun or a proper noun or a person's name being the subject of any inflection of verb investigate.
The second sub-condition matches any inflection of lemma investigate followed by, within at most three words, any concept descending from syncon 3113 (crime), 48760 (death) or 33606 (accident). Both sub-conditions must be satisfied to trigger the rule.

If the rule above is run against the following text:

Authorities are investigating the death of a teenager working in the roof of a home in East Bunbury.  
The man, believed to be 18-years-old, was working alongside an electrician at a Petherick Street home when the incident occurred about 10.30am (AWST).  
An ambulance was called and fire crews had to pull the young man, who was unconscious, from inside the roof of the home.  
Attempts to resuscitate him failed and he was pronounced dead at Bunbury Regional Hospital.  
Police and officers from Worksafe, Energy Safety and Western Power are investigating.

sub-condition 1 is satisfied by:

  • authorities and investigating (first sentence)

and sub-condition 2 is satisfied by:

  • investigating and death (first sentence)

so the rule is triggered.

The use of of the negation operand (!) is allowed, provided that the operand to which it refers is not part of a logical sequence.

The syntax for using negation is as follows:

!operand1
positionalOperator
operand2
logicalOperator
operand3
...

The following example is not valid:

SCOPE scope_option
{
    DOMAIN(domain_name:score_option)|IDENTIFY(template_name)
    {
        operand1
        positional operator
        !operand2
        logical operator
        operand3
        ...
    }
}

Consider the first sample rule modified with a negation:

SCOPE SENTENCE
{
    DOMAIN(dom1:NORMAL)
    {
        TYPE(NOU, NPR, NPH)
        &SV
        LEMMA("investigate")
        <1:3>
        !ANCESTOR(3113, 48760, 33606)//  3113: crime, offence, offense  48760: decease, last, death, tomb, mortality  33606: fortuitous event, fortuity, chance event, accident
    }
}

Now the second sub-condition matches any inflection of the lemma investigate only if not followed by, within at most three words, any concept descending from syncon 3113 (crime), 48760 (death) or 33606 (accident).

The rule is no longer triggered by the first sentence because the verb investigating is followed by death within a distance of two words. On the other hand, the fifth sentence now triggers the rule two times thanks to Police and officers, which are both subjects of investigating.