Vocabulary properties

In the vocabulary file, you define properties such as precedence, format, and sortIndex to specify terms and phrases that verbalize the boot BOM.

Vocabulary properties specify terms and phrases that verbalize the boot BOM. Vocabulary properties are defined in a vocabulary file (_<locale>.voc) that stores the verbalization data for the BOM. You have one vocabulary file per locale.

The following table lists some of the properties that you can define in the vocabulary file.

Table 1. Vocabulary properties 
Property Element Value Description
sortIndex Static Reference Number

The sortIndex property specifies the order in which the constants verbalized in the vocabulary are displayed in the Syntactic Editor menu or in the tree view of the completion menu in the Intellirule Editor.

If the sorting is locale-specific, you must specify it in the vocabulary file.

The first day of the week can vary depending on the country. In the following example, you set Day of week Monday in the first position:

ilog.rules.brl.DayOfWeek.Monday#label = Monday

ilog.rules.brl.DayOfWeek.Monday#sortIndex = 1

precedence Sentence Formatted String

You can set the precedence property on phrases (sentences) to help the Business Rule Language parser disambiguate expressions, such as arithmetic or Boolean expressions.

The value of the precedence property is composed of three parts separated by a colon:

  • Description of the operator

  • Associativity

  • Level of precedence

The following example indicates the precedence for the sentence doesNotEquals on a number:

ilog.rules.brl.Number.doesNotEqual(ilog.rules.brl.Number)#sentence.navigation = {this} does not equal {0}

ilog.rules.brl.Number.doesNotEqual(ilog.rules.brl.Number)#sentence.navigation.precedence = 1-3:left:30

In this example, the precedence values have the following meaning:

  • 1-3: The indices of the words that represent the operator in the text property. For example: 0:{this} 1:does 2:not 3:equal 4:{0}

  • left: The associativity of the operator. The operator is left associative (the possible values are: nonassoc, left or right)

  • 30: The level of priority

format Sentence Formatted String

The format property specifies a format for operators when they are rendered in the cells of a Decision Table or in the links of a Decision Tree.

For example:

  • ilog.rules.brl.Percentage.isGreaterThanOrEquals(ilog.rules.brl.Percentage)#sentence.navigation.format = >= {0}

    prepends the >= symbol to the argument of this predicate.

  • ilog.rules.brl.Percentage.isBetweenEE(ilog.rules.brl.Percentage,ilog.rules.brl.Percentage)#sentence.navigation.format = ]{0}ilog.rules.brl.Percentage.isBetweenEE(ilog.rules.brl.Percentage,ilog.rules.brl.Percentage)#sentence.navigation.format.1 = {0}[

    prepends the ] symbol to the first argument of this predicate and appends the [ symbol to the second argument of the predicate.