Skip to content

SCOPE overview

When defining rules, SCOPE is the statement that allows the user to define the portion of text in which a single rule or a group of rules has to be instantiated and verified. A rule will generate a hit, only if it recognizes all the elements it contains within the defined interval.

The syntax to define a rule's scope is the following:

SCOPE scopeOption [ON ATOM]
{
    rule(s)
}

Defining a scope is mandatory for each rule, but it is up to the user to decide the extent. For greater flexibility, users can choose from a variety of scope options. The options can be divided into two groups:

  • The first relates to the standard textual divisions generated by the semantic disambiguator's text analysis.
  • The second to the textual divisions that can be optionally defined for a specific project and/or text type.

Note

Parts between square brackets ([]) are optional.

ON ATOM is optional and lets your rules trigger in function of an atom-based count of the textual elements of the sentence. You can find a practical example in the positional sequences section of this manual.

  • Standard options:

    • PARAGRAPH
    • SENTENCE
    • CLAUSE
    • PHRASE
  • Custom options:

    • SECTION
    • SEGMENT
    • TABLE

The different types of standard and custom SCOPE options can be used by themselves or in combination, depending on the rules' goals.

Info

Within the same project, rules can share the same scope definition; however, this is not mandatory as a different SCOPE can be defined for each rule in the project.

Note

The value of selecting a wider or narrower scope option can be better appreciated when the rule(s) to be managed contain(s) expressions made of two or more attributes connected by boolean operators. If a rule looks for a single element, the results obtained applying the rule on paragraphs or on single sentences will be the same. However there is a significant difference between a rule that looks for two lemmas using the AND operator within a single sentence as opposed to within two paragraphs. In fact, if the SCOPE is SENTENCE, a rule could trigger only within each single sentence; it will never recognize elements which are contained in two different sentences, not even if they are adjacent. On the other hand, if the SCOPE is PARAGRAPH, a rule could trigger on all the text contained within a paragraph, thus going beyond a single sentence scope.

SCOPE options can sometimes be used in combination with particular features that further restrict rules' actions to specific conditions; these conditions neither depend on the text's structure, nor on the position of the textual elements, but on the content and meaning of the text. These features are called: DOMAIN constraints and SENTENCE RELEVANT constraints. The first verifies whether a document has been associated to any domain during the disambiguation process, the second acts upon the most relevant sentences of a document. In other words, these two syntaxes take into consideration the context in which words occur. For a detailed description, please refer to the dedicated pages.