Skip to content

TAG

TAG transformation turns the value of the instance of a field, extracted with the TAG attribute, into the name of the tag referenced in the attribute.
This transformation is not usable in the conditions of tagging rules.

For example, consider these definitions:

TEMPLATE(ANIMALS)
{
    @PETS,
    @SEA_ANIMALS,
    @BIRDS,
    @WILD_ANIMALS
}

TAGS
{
    @DOG,
    @CAT
}

With the following tagging and tag-based extraction rules:

SCOPE SENTENCE
{
    TAGGER(1)
    {
        @DOG[ANCESTOR(100000144)]//@SYN: #100000144# [dog]
    }
}

SCOPE SENTENCE
{
    IDENTIFY(ANIMALS)
    {
        @PETS[TAG(DOG)]|[TAG]
    }
}

applied to this text:

I have beautiful rottweilers and a dobermans.

you will get this extraction record:

Template: ANIMALS

Field Value Count
@PETS DOG 2

Expressions of concepts that have syncon 100000144 (dog) as their ancestor—rottweilers and dobermans—are covered by the first rule with an instance of tag DOG which becomes an additional attribute of the tokens.

The extraction rules is triggered by any instance of tag DOG. Without the TAG transformation, the value of the instances of the extracted field would have been rottweiler and doberman, that is the base forms of rottweilers and dobermans, as for the default normalization.
With the TAG transformation, instead, the value of the field instances becomes the name of the tag matched by the TAG attribute of the condition.

The syntax of the TAG transformation option is the following:

SCOPE scopeOption
{
    IDENTIFY(templateName)
    {
        @field[tagAttribute]|[TAG]
    }
}