Change the text of an interview question or sentence

Change the text of an interview question or sentence

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.

What do you want to do?

Customize sentence text

Customize question text

Substitute the actual value of a variable for its text

Substitute a gender pronoun for a text variable

Set up substitution

Collect the gender of a person

Substitute an attribute value into the text on screens

Display interview questions in second person form

Customize sentence text

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:

  1. when you need to simplify a complex sentence, or
  2. in a Rapid Language Support rulebase where the generic form defined in the RLS parser does not create the correct sentence text. For more information on using an RLS parser, and changing individual sentence forms in such a project, see the Help available in the Rapid Language Support Tool.

Text overriding should never:

  1. change the meaning of the sentence, or
  2. be used instead of alternate parsing. If the sentences forms for an attribute are not what you expect, you should first consider an alternate parse for the attribute. See Select an alternate parse for more information.

To customize the sentence text for an attribute follow these steps:

  1. In Oracle Policy Modeling, open the properties file for your project.
  2. Double-click the attribute whose sentence text you want to change. This will open the Attribute Editor.
  3. Select the Override button. This will open the Override Text dialog.
  4. Select the check box next to the sentence form you want to change (statement, question, negative, uncertain). This will activate the text field for that form and you can then change the sentence text as required.



  5. Select OK in the Override Text dialog box and then OK in the Attribute Editor dialog box.

Customize question text

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:

  1. In the Attribute Input Control pane, select the Free Form Text radio button.
  2. Enter the override text which you would like displayed.



Tips for question wording

General principles to bear in mind when editing question text are:

Substitute the actual value of a variable for its text

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.

Substitute a gender pronoun for a text variable

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:

  1. In Oracle Policy Modeling, double click the properties file in the Project Explorer to open it for editing.
  2. On the Attributes tab, double-click the variable to open it in the Attribute Editor.
  3. Select an option from the Default Gender drop-down list (see below for an explanation of these choices), then click OK.

 

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.

Set up substitution

Values can only be substituted into other attributes if the variable is set to allow substitution. To specify this, follow the steps below.

  1. Once you have created your variable in your rules document and compiled your rules, open the properties file for the project.
  2. Create a public name for your attribute.
  3. Select your variable in the attribute list, and double-click to open the Attribute Editor.
  4. Check the Allow Substitution check box. If the variable is a text variable select the Default Gender from the drop-down box. This is to ensure that the correct pronoun is substituted for subsequent occurrences of the variable in the attribute. For more information, see Substitute a gender pronoun for a text variable below.
  5. Click OK and save your document to apply these changes.

 

TIPS:

  1. To prevent unwanted substitution occurring in your rules, when specifying substitution in a variable you should ensure that the same text is only used in other attributes in which substitution is appropriate. 
  2. Use the string concatenation function if you have collected a person's first name and last name separately but you want to combine them for the purpose of name substitution. See Combine multiple text strings into a single text variable for more information.
  3. 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

Collect the gender of a person

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:

  1. In your properties file, create a new text variable to be used as the gender attribute (eg "the person's gender").
  2. In the Attribute view for the properties file, right-click on the gender attribute and select Copy Attribute ID.
  3. Also in the Attribute view, double-click on the attribute with which the gender attribute is to be associated (eg "the person") to open the Attribute Editor dialog box for that attribute.
  4. In the Gender Attribute text box paste the attribute ID for your gender attribute.



  5. Click OK and then compile your document.

 

You also need to create a new input control for the gender attribute in your screen file. To do this:

  1. In Oracle Policy Modeling, open your screen file and select the screen where you want to collect the gender.
  2. Create a new input control on the screen and select the gender attribute. Click Create.
  3. Set the control type to an appropriate restricted input control type (list box, drop-down list or radio button). You will notice that the values "male" and "female" will automatically be added to those control definitions. Click OK.

Substitute an attribute value into the text on screens

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:

  1. In Oracle Policy Modeling, open your screen file and select the screen where you want the substitution to occur.
  2. In the appropriate field (ie the Screen Title field for screen name, the Display Text field for list items, the Text field for the heading label, or the Free Form Text field for the question text) use the syntax "%<Attribute ID>%" or "%<Attribute ID>?%" where you would like the substitution to occur. (How these two different options operate is explained below.) NOTE: The attribute ID can be either the public name (eg %applicant_name%) or the automatically assigned attribute ID (eg %p1@veterans_doc%).
  3. Click OK.

 

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:

Handling unknown and uncertain values

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.

Substituting gender pronoun attributes

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".

Display interview questions in second person form

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".

  1. Open the Project Properties window from File | Project Properties.
  2. In the Build and Deploy Properties, select the 2nd Person Sentence Generation option.
  3. All text attributes in the rulebase which have substitution enabled are displayed. Tick the checkbox next to the attribute which you wish to designate as the second person attribute, and click OK.
    TIP: You would usually only tick one attribute for second person question forms in a rulebase.



  4. The next time you debug or run your rulebase, any questions or statements using the attribute you ticked will be phrased in second person form.



    NOTE: You may select entity attributes for second person sentence generation, however for this to operate in a meaningful way, you will require customizations to the application in which the rulebase runs. Entity instances by definition represent multiple items, so it is not meaningful for an interview to use second person form questions for every entity instance. However, application customizations may allow a particular entity instance to be designated as the single instance for which the second person questions should be shown, which would make this arrangement more meaningful to a user.