Write Rules In Japanese
Policy Modeling supports rule authoring in Japanese.
For the syntax for rule functions in Japanese, see Function reference (Japanese).
When writing rules in Japanese, the concepts listed in the following table require special consideration.
| Concept | Special consideration |
|---|---|
| Verb forms |
Verb forms in the Japanese verb file end in a -u such as iku, kangaeru. For each verb there are present tense forms (both polite and plain forms) and past tense forms (both polite and plain forms). For each of the polite and plain forms, the following verb conjugations are provided:
The automatic verb conjugations work for the majority of the ichidan and godan verbs. The conjugations for irregular verbs, and verbs where the use of kanji characters introduces ambiguity as to whether the verb is ichidan or godan, will have to be entered manually. For more information, see Configure the List of Recognized Verbs. The copula だ (da) which is the infinitive form of です (desu), and である (de aru) which is the infinitive form of であります, have been included in the verbs list. |
| Verb recognition |
In a Subject-Object-Verb sentence, the verb at the end is taken to be the active verb. When a compound verb is present, the active verb is selected based on the longest match. For example, the verbs nakatta (なかった) and kawa nakatta (買わなかった) are both present in the file. In this case, if a sentence has kawa nakatta as its active verb (ie the verb at the end), the parser will recognize the compound verb kawa nakatta instead of just nakatta. In cases where the sentence uses a compound verb, where the compound verb itself has not been entered in the file, the parser will try to recognize the longest match it can find. For example, if nakatta is in the file, and the verb shitagawa nakatta is not in the file then the parses generated for the sentence containing shitagawa nakatta will be based on the conjugations of the verb nakatta. To avoid this problem, you need to add the missing verb. For compound verbs where only the second verb is inflected, for examplebenkyō + suru, suru is taken to be the active verb. For such noun + suru verbs, there is no need to enter the compound verbs separately if suru is in the verbs list. |
| Adjectives |
If adjectives are present within the sentence, they are not inflected. In a verbless sentence, the adjectives may be inflected. There are two form of Japanese adjectives, the -na adjectives and the -i adjectives.
In both the above scenarios, and also for a Subject-Object-Verb sentence when the uncertain form is constructed, the copula is omitted. |
| Other verb forms |
The handling of the remaining Japanese verb inflections in Policy Modeling is explained below:
|
| Verb form | Japanese sentence | Should be written in Policy Modeling as |
|---|---|---|
| Conditional mood | The person is eligible if the person pays tax. 当人は税金を払ったら、適格である。 |
当人は適格である。
当人は税金を払います。 The person is eligible. The person pays tax. |
| Clauses | The person is retired and the person’s age is greater than 65. 当人は退職していて、(年齢が)65歳以上である。 |
This will be reflected by the 'and' (oyobi) rather than inflecting the verb to the -te form. This should be written as two attributes: The person is retired and The person’s age is greater than 65 当人は退職している。および 当人は(年齢が)65歳以上である。 |