Inhibitors of the distribution in sequences

The operands in a flexible sequence (operator `<>`) and in a loose sequence (operator `>`) can optionally accept inhibitors which limit their matches to the first or the last occurrence. In other words, if an operator matches more than one token, it is possible to discard all but the first occurrence with the minus inhibitor or all but the last occurrence with the plus inhibitor.

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 categorization rule:

``````SCOPE SENTENCE
{
DOMAIN(dom1:NORMAL)
{
ANCESTOR(69346)// 69346: look into, investigate, see about
<>
ANCESTOR(3113)//  3113: crime, offence, offense
}
}
``````

The rule's condition matches any concept descending from syncon 69346 (investigate) flexibly followed, in the same sentence, by any concept descending from syncon 3113 (crime).

If the rule is run against the following text:

``````A Tech officer investigated an attempted sexual assault and kidnapping, which occurred at Wall Residence Hall. A female student alleged a sexual assault by an acquaintance in her apartment.
``````

it is triggered two times, both in the first sentence, due to:

• investigated followed by sexual assault.
• investigated followed by kidnapping.

One token is matched by the first attribute and two are matched by the second. Now consider the previous rule with an inhibitor added to the second operand:

``````SCOPE SENTENCE
{
DOMAIN(dom1:NORMAL)
{
ANCESTOR(69346)// 69346: look into, investigate, see about
<>
-ANCESTOR(3113)//  3113: crime, offence, offense
}
}
``````

The second attribute will now match only sexual assault because it is the first (in positional order) of the tokens matched by the attribute: if the plus sign was used instead, the second attribute would match only kidnapping because it is the last token.

When a single rule can have multiple candidates for two or more operands, it is possible to combine plus and minus signs in order to combine the occurrences as needed. For example, given the following flexible sequence:

``````attribute_A
<>
attribute_B
``````

and the following tokens' stream:

``````A1 A2 B1 B2
``````

different uses of plus and minus will produce the results illustrated in the table below.

Condition with inhibitors Result
`+attribute_A`
`<>`
`+attribute_B`
A2 B2
`+attribute_A`
`<>`
`-attribute_B`
A2 B1
`-attribute_A`
`<>`
`-attribute_B`
A1 B1
`-attribute_A`
`<>`
`+attribute_B`
A1 B2