Oracle Policy Modeling allows you to override the sentence and question forms generated by the inbuilt parser. You can also set up substitution which allows the text of a variable to be substituted with its actual value when it is used in another boolean attribute. Substitution can also be used to replace variables with pronouns rather than the text of the variable's value, and to substitute and attribute's value into headings and screen names on interview screens.
Substitute the actual value of a variable for its text
Substitute a gender pronoun for a text variable
Collect the gender of a person
Substitute an attribute value into the text on screens
Display interview questions in second person form
Oracle Policy Modeling provides an alternate mechanism for sentence generation. This can be used for "canned text" (where a fixed statement, question, negation and uncertain form is used for each attribute). Overriding the text in this way should only be used:
Text overriding should never:
To customize the sentence text for an attribute follow these steps:
Not all question forms generated by Oracle Policy Modeling's automatic parsing of attributes are suitable for the required purpose. In many cases, rather than asking a question in question form, you might want to abbreviate this to a label for the text field.
For example, instead of asking "Who is the person?" in question form, it might be better to express this more simply as "Name:"
Overriding the default question text in this way is used when you need to abbreviate or shorten the text. The change in text should NEVER change the meaning of the sentence. If you want to simplify the sentence concept you should not use this mechanism – you should use the Override feature available in the properties file in Oracle Policy Modeling. For more information, see Customize sentence text above.
To override the default question text obtained from the automatic attribute parse:
General principles to bear in mind when editing question text are:
It is possible to substitute the text of a variable with its actual value when it is used in another attribute in the rulebase.
For example, having the following attribute:
the claimant lives in the country of residence
and the variable:
the country of residence
allows substitution of the words "the country of residence" for the value of the variable.
So if the country of residence is "France" then
the claimant lives in the country of residence
becomes:
the claimant lives in France
This sort of substitution can occur at a more complex level, for example:
the claimant’s sibling lives in the claimant’s sibling’s country with the claimant
can become:
Charlene lives in Morocco with Anne
where "the claimant’s sibling", "the claimant’s sibling’s country" and "the claimant" are all substituting variables.
Using name substitution is particularly important when using entities. For example, asking:
"Is the child a full-time student?"
is not helpful if there are multiple children in the family. It is more useful to ask:
"Is Bart a full-time student?", "Is Lisa a full-time student?" etc.
How to set up substitution is explained below. For more information on how variable substitution operates, see Text substitution principles.
Variables can be replaced with pronouns rather than the text of the variable's value. The pronoun substitution is based on the default gender specified for an attribute. This applies only to text variables which have substitution allowed (see Set up substitution below).
For example, if we had the following attribute which uses the substituting text variable "the claimant":
the claimant lodged the claimant's form
we would not want this to become:
Tom lodged Tom's form
Rather we would want this to become:
Tom lodged his form
To set the default gender for a text variable:
There are four default gender options to choose from:
Default Gender | When to use | Example |
---|---|---|
Impersonal (it) | This is typically used for things which don't have a gender like company names or inanimate objects. |
The client company expended more than thirty percent of the client company's income in the relevant tax year. becomes Parker Incorporated expended more than thirty percent of its income in the relevant tax year. |
Generic (he/she) |
This is the most commonly used gender option for variables specifying people. The substitution pronoun will be automatically determined based on what gender the variable is given at runtime. NOTE: This setting should be used in conjunction with a gender attribute which is a means for collecting whether or not a person is male or female at runtime. See Collect the gender of a person below. |
The client expended more that thirty percent of the client's income in the relevant tax year. becomes He expended more that thirty percent of his income in the relevant tax year. |
Male (he) | This is used where the gender is known to be masculine (eg "the man"). In this case the sex of the phrase need not be set at runtime - it will permanently be set to male. |
The man has had surgery to the man's knee. becomes Bob has had surgery to his knee. |
Female (she) | This is used where the gender is known to be feminine (eg "the girl"). In this case the sex of the phrase need not be set at runtime - it will permanently be set to female. |
The client is in the second trimester of the client's pregnancy. becomes Gillian is in the second trimester of her pregnancy. |
Values can only be substituted into other attributes if the variable is set to allow substitution. To specify this, follow the steps below.
TIPS:
When substitution is enabled, any existing translations will need to be manually updated. For more information, see Update a translation file.
NOTE: Most attributes will not use the substitution option as it can lead to nonsensical attributes being produced during interviews.
For example, if you had an attribute:
the claimant's weekly rent doubled is more than one half of the claimant's weekly pay
and the variables "the claimant's weekly rent" and "the claimant's weekly pay" had substitution turned on, an attribute like the following would be generated:
$200 doubled is more than one half of $1,500
A gender collect control is used to provide a means for collecting whether or not a person is male or female. This is done by adding a gender attribute as a control on a screen. Essentially, the gender attribute is a text type variable, and the control will set it to a value of either "male" or "female".
This is important for determining the correct pronoun to substitute when the default gender of a variable is generic (he/she), otherwise we will end up with attributes like "Tom lodged his/her form".
To set up a gender attribute:
You also need to create a new input control for the gender attribute in your screen file. To do this:
It is possible to substitute an attribute value into free form question text, list display text, a heading or a screen name. For instance, we could substitute the person's name into the screen name, enabling the "Financial Details" screen to appear as "John’s Financial Details". Substituting the person's name in this way can help personalize the interview process for the user.
To substitute an attribute value into the text on an interview screen:
In the example above, you would get the Financial Details screen to appear as John’s Financial Details by defining the screen name as either:
When an attribute is unknown or uncertain, the value substituted depends on the variation of the syntax used.
If the syntax "%<Attribute ID>%" is used, the formatted values for unknown and uncertain are used for the values unknown and uncertain respectively. For example, the caption "%applicant_name%'s Financial Details" would be substituted as "unknown's Financial Details" and "uncertain's Financial Details" for unknown and uncertain respectively.
If the syntax "%<Attribute ID>?%" is used, the basic attribute text (eg the applicant's name) is substituted for both unknown and uncertain values. For example, "%applicant_name?%'s Financial Details" would be substituted as "The applicant's name's Financial Details" for both unknown and uncertain.
If you wish to substitute a gender pronoun attribute onto screen text, you can use the syntax "%<Attribute ID>:his/her/its%", where <Attribute ID> is the main attribute to which the gender is applied (eg "the person"), rather than the gender attribute itself (eg "the person's gender").
For example, you may wish to define your screen title to read "Jane and her assets" (for an interview involving a person Jane who is female). You would do this with a screen title "%person% and %person:his/her/its% assets".
You can debug or run your rulebase with the questions being asked in second person form, rather than the more usual third person form. For example, "What is your taxable income?" instead of "What is Fred's taxable income?". This can be useful for self-service style interviews.
To have your rulebase questions asked in second-person form, you must first have a text variable set up to substitute into other attributes, for example "the applicant".