Skip to content

Domain name

The part of a categorization rule that associates it to its domain is the DOMAIN instruction:

DOMAIN(domainName)

where:

  • DOMAIN is a keyword that must be written in uppercase.
  • domainName is the exact name of the domain defined in the project's taxonomy to which the rule has to be associated.

For example, given the following taxonomy:

CONFERENCE
    EasternConference
    WesternConference
SEASON
    Regular
    Playoffs
    Finals
FOUL
    PersonalFoul
    FlagrantFoul
    TechnicalFoul
Money
OTHERNEWS
    Awards
        MVP
        DefensivePlayer
        RookiePlayer
        TopScorer
    Retirement
    CoachingChanges
    NBADraft

a rule like this:

SCOPE scope_option
{
    DOMAIN(EasternConference)
    {
        //condition//
    }
}

states that domain EasternConference will receive a certain amount of "points", becoming a candidate output category, whenever the rule's condition matches the input text. The exact amount of points the domain receives when the rule is triggered is determined by the optional score option.

Restrictions on domain names

The categorization domain naming convention allows the use of the hyphen (-) neither in the domain name in the taxonomy nor within the rules.

This is an example of a valid declaration:

<DOMAINTREE>
    <DOMAIN NAME="dom1" DESCRIPTION="Sport"/>
</DOMAINTREE>

And this is an example of an invalid declaration:

<DOMAINTREE>
    <DOMAIN NAME="dom-1" DESCRIPTION="Sport"/>
</DOMAINTREE>

Moreover, when declaring the domain name in a rule, if the domain name can be interpreted as a number, it will have to be declared in quotes. These are example of valid declarations:

DOMAIN("00001")
DOMAIN("00001.01")
DOMAIN(domain1)

Instead, these declarations are not valid:

DOMAIN(00001.01)
DOMAIN(00001)

It is possible to have domain names end with a period (.), however this practice is strongly discouraged.