Skip to content

BTAG attribute

The BTAG attribute is very similar to TAG, but it is applied at the atom level of the disambiguation output and not the word level. This allows the user to match sub-tokens (atoms) that, at the word level, would be part of compounds, collocations or idiomatic expressions.

For example, given this tag and this template:

TAGS
{
    @DATE_TAG
}

TEMPLATE(DATE)
{
    @DATE_FIELD
}

with these tagging and extraction rules:

SCOPE SENTENCE ON ATOM
{
    TAGGER()
    {
        @DATE_TAG[ANCESTOR(100005151)]//@SYN: #100005151# [month]
    }
}

SCOPE SENTENCE
{
    IDENTIFY(DATE)
    {
        @DATE_FIELD[TAG(DATE_TAG)]
    }
}

applied to this text:

Today is March 15th, 2023.

you would get no extraction output since the month is part of a broader entity—the entire date—at the word level.

If you change the extraction rule like this:

SCOPE SENTENCE
{
    IDENTIFY(DATE)
    {
        @DATE_FIELD[BTAG(DATE_TAG)]
    }
}

you will get this extracted output:

Template: DATE

Field Value
DATE_FIELD March

As you can see, only the month from the entire date has been extracted, corresponding to what has been previously tagged in the tagging rule.