Skip to content

TITLETEXT

The TITLETEXT transformer allows you to manipulate the value of an extracted field, setting it to the whole title in which it has been matched.

The syntax is:

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

For example considering the template HEADING

TEMPLATE(HEADING)
{
    @CONTENT
}

the following rule finds the word policy in an heading of level 2 and normalizes the extraction in the whole text document:

SCOPE SENTENCE
{
    IDENTIFY(HEADING)
    {
        // extract the whole title of the policy section
        @CONTENT[TITLELEVEL(2)+KEYWORD("policy")]|[TITLETEXT]
    }
}