Skip to content

TAG

TAG transformation turns the extracted field values into previously defined tags.

For example, consider this template and this tag list used to tag extraction values related to the PETS field.

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

TAGS
{
    @DOG,
    @CAT
}

With the following tag 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 a beautiful rottweiler and a doberman.

you will get this record:

Template: ANIMALS

Field Value
@PETS DOG

The extracted values—rottweiler and doberman—were turned into their previously defined tag.

Warning

If you use the TAG transformation option on untagged elements, you will get a value extracted to its base form.

If two or more tags overlap on the same token(s), only the tag specified by the rule will be extracted.

The syntax of the TAG transformation option is the following:

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

Warning

The syntax is not useable for tagging rules.