Write rules in other languages

Write rules in other languages

Oracle Policy Modeling supports rule authoring in any language. The rule language and region are set for a rulebase, defining the language parser used to write rules, and the formatting used for date, number and currency values.

What do you want to do?

Specify the rule language

Specify the rulebase region

Change the rule language or region

View the function syntax for the rule language

See which version of a language parser a rulebase is using

Specify the rule language

The rule language determines what language documents are parsed in. It is also used to decide what language rule table text should be added in.

You specify the rule language for a project when you create a new project. In the New Project dialog there is a drop-down list that contains a list of Rule Languages for you to select from. This list reflects the language parsers installed with Oracle Policy Modeling. The default rule language is English (American), or the last rule language you worked with in Oracle Policy Modeling previously.

Once you have created your project and commenced rulebase development (ie once rules or attributes have been created), the rule language is locked and you cannot change it.

Creating a new language parser

If the language that you want to create your project in is not listed in the Rule Language list, you can use the Oracle Policy Modeling Rapid Language Support Tool to create a language parser for that language. (The Oracle Policy Modeling Language Support Tool is available from Start | All Programs | Oracle Policy Modeling | Oracle Policy Modeling Tools | Oracle Policy Modeling Rapid Language Support Tool. Help on using that tool is available from the Help menu in the tool itself.)

Once you have created a new language parser using this tool, when you reopen Oracle Policy Modeling and create a new project, the parser you created will appear in the Rule Language drop-down list.

Syntactic and non-syntactic parsers

Syntactic parsers are those that include a configurable list of recognized verbs. This means that attributes can be entered in rules using the positive, negative or uncertain form and the parser will generate the other forms correctly. Syntactic parsers are those in the Rule Languages list (in the New Project dialog) that do not have "(RLS)" after the language name.

Non-syntactic parsers do not have a built-in verb list and so the sentence parses are generated using a generic sentence form defined in the configuration for that particular RLS parser. These parsers are shown in the Rule Languages list with "(RLS)" after the language name , for example "Thai (RLS)".

Specify the rulebase region

The rulebase region determines how numbers, dates and currency values are formatted. This is used to interpret any constant values used within your rules, eg income limits, dates of effect, etc.

You specify the region for a project when you create a new project, by selecting from the Region drop-down list in the New Project dialog. The default region shown for this list is based on what Oracle Policy Modeling detects as your current system locale.

The region setting also controls the default formatting applied when your rulebase is deployed, eg whether a date value entered by a user is interpreted in dd-mm-yyyy or mm-dd-yyyy format. Note that you may customize the deployment settings so they are not based on this project setting - please see the Oracle Policy Automation Developer's Guide for details.

Once you have created your project and commenced rulebase development (ie once rules or attributes have been created), the rulebase region is locked and you cannot change it.

Change the rule language or region

If no rules or attributes have been added to the project, you can change the rule language or region by:

  1. Go to File | Project Properties | Common Properties | General.
  2. Click the browse button next to Rule Language to open the Language Selector. Select a different rule language, then click OK.
  3. Click the browse button next to Region to open the Region Selector. Select a different region, then click OK.

 

Once you have created your project and commenced rulebase development (ie once rules or attributes have been created), the rule language and region are locked and you will not be able to change these settings.

View the function syntax for the rule language

For the languages that Oracle Policy Modeling has in-built parsers for, the syntax for the functions in the chosen rule language is available at Help | Function Reference. To view the localized versions of the function reference, go to the topic Localized function references.

See which version of a language parser a rulebase is using

The version numbers for each of the parsers is shown at Help | Available Languages.


 

The Display Anglicized Language Names checkbox is used to display the English names for each language rather than the localized name. (This setting is not saved, so it will always be un-checked when the dialog is first shown.)

 

See also: