Skip to content

PHRASE

PHRASE is can be described as a completion feature of the matched value rather than a normalization. It adds elements surrounding the original matched data to the final output value.

Its action is based on the concept of "phrase", one of the sentence subdivision levels resulting from the disambiguation process. Phrases are a group of words (or sometimes single words) that form constituents acting as single units in the syntax of a sentence; for example: noun phrases, verb phrases, prepositional phrase, etc.

The PHRASE option returns the whole group containing the value matched by an attribute.

The syntax for extraction rules is:

SCOPE scopeOption
{
    IDENTIFY(templateName)
    {
        @field[attribute]|[PHRASE]
    }
}

The syntax for tagging rules is:

SCOPE scopeOption
{
    TAGGER(tagLevel)
    {
        @tag[attribute]|[PHRASE]
    }
}

This option is useful in situations where it's necessary to expand the output revolving around a matched element.

Consider the following example:

SCOPE SENTENCE
{
    IDENTIFY(SUBJECT)
    {
        @Subject[TYPE(NPH) + ROLE(SUBJECT)]|[PHRASE]
    }
}

The purpose of this rule is to extract human proper nouns (TYPE(NPH)) only if the names identified are the subjects of a sentence or clause (+ ROLE(SUBJECT)). If this condition is verified, the PHRASE transformation option will ensure that every extracted value will be expanded to the phrase where the people's names are found as subjects.

Consider the extraction output if the rule above is run against the following sample sentence:

My sister Louise Letterman loves dogs and her husband loves cats.

The text contains one value matching the sample rule: Louise Letterman. This concept is recognized as a person's name and is the subject of the first clause of the sentence. Louise Letterman is also part of a broader noun phrase. The extraction would be the whole group in which the person's name was found: My sister Louise Letterman.