Skip to content

Strict sequence

The strict sequence operator (double greater-than sign, >>) requires that the two tokens or atoms matched by the operands on its sides are positioned one immediately after the other and in the same sentence, only white space is allowed between them.

All types of sequences can act both at the atom or token level of a sentence, according to the attribute after them.

The syntax is:

operand1
>>
operand2

Consider the following example:

SCOPE SENTENCE
{
    DOMAIN(dom1:NORMAL)
    {
        ANCESTOR(26151)//  26151: nervous system
        >>
        LEMMA("disease", "disorder")
    }
}

The rule's condition matches any strict sequence of two tokens in which the first token is a concept descending from syncon 26151 (nervous system) and the next token has its lemma attribute set to disease or disorder.

Consider the following sample text:

Major new epidemiological analyses are focusing attention on disorders of the nervous system as important causes of death and disability around the world. One in every 9 individuals dies of a nervous system disorder.

The rule is triggered just once because of the nervous system + disorder sequence found in the second sentence.

disorders of the nervous system text in the first sentence does not trigger the rule: the first operand of the condition matches nervous system and the second matches disorders, but the overall condition is not met because tokens are not positioned in the "right" order.

Besides simple attributes, the strict sequence operator can be used with set combinations of attributes as shown in the example below.

SCOPE SENTENCE
{
    IDENTIFY (MilitaryPersonnel)
    {
        @rank[ANCESTOR(46377, 47277)+ TYPE(NOU)]//46377:officer 47277: military personnel   
        >>
        @name[ANCESTOR(78452)+ SYNCON (UNKNOWN)]// 78452: person
    }
}

This extraction rule is meant to extract proper names of military personnel along with their rank.
The first operand attribute matches any concept descending from syncon 46377 (officer) or syncon 42277 (military personnel), but is limited to common nouns (+ TYPE(NOU)), thus excluding any proper nouns like Dwight Eisenhower.
The second operand matches any unknown proper name (+ SYNCON (UNKNOWN)) recognized as the name of a person (ANCESTOR(78452)).

If the rule is run against the following sample text:

A year spent learning to lead troops in the land of the long white cloud has enriched Oakey lad Lieutenant James Martin with a wealth of life experience.

it will be triggered by Lieutenant James Martin and it will fill the @rank field with Lieutenant and the @name field with James Martin.

Right reference

The strict sequence operator with right reference (double less-than sign, <<) is perfectly equivalent to the strict sequence operator unless it's combined with negative operands. To understand the effect of the right reference on sequence interpretation read the paragraphs under Right reference operators in the topic about negations in sequences.