Skip to content

Insert rule templates

To insert a rule template in your rules file:

  1. Open or select the .cr file in the editor.
  2. Put the cursor where you want to insert the rule.
  3. Right-click and choose Insert categorization rule template or Insert extraction rule template.

This is what a categorization rule template looks like:

SCOPE SENTENCE
{
    DOMAIN(dom1:NORMAL)
    {
        SYNCON(123456)
    }
    DOMAIN(dom1:NORMAL)
    {
        LEMMA("lemma")
    }
    DOMAIN(dom1:NORMAL)
    {
        KEYWORD("keyword")
    }
}
And this is an extraction rule template:

SCOPE SENTENCE
{
    IDENTIFY(TEMPLATE1)
    {
        @FIELD1[SYNCON(123456)]
    }
    IDENTIFY(TEMPLATE1)
    {
        @FIELD1[LEMMA("lemma")]
    }
    IDENTIFY(TEMPLATE1)
    {
        @FIELD1[KEYWORD("keyword")]
    }
}