Regnus 5.5

The Random Text Scripting Language

The Regnus Scripting Tutorial

Part 5: Article Correction

A common situation you may encounter when randomising text is the difference between the articles "a" and "an". For example:

START <Example>I have a ##Fruit;!

ENTRY banana
ENTRY plum
ENTRY apple

Here, the resulting text works fine if the reference returns "plum" or "banana", but if "apple" is selected, you might expect the text to read "I have a apple!", which would be linguistically incorrect.

However, in fact, Regnus will automatically correct any instance of the word "a" followed by a word starting with a vowel to the word "an", so the above script will work just fine.

Therefore, it is always correct to use the word "a" rather than "an" in a Regnus script, as it will be automatically corrected where necessary.

But what if this behaviour is undesired? Well, luckily, Regnus does have a function to achieve just this: the "DEBAR" qualifier.

This qualifier works by defining words which should not trigger an automatic correction. So, to give an example:

START <Example>I'm a member of a ##Group;!

ENTRY chess club
ENTRY union
ENTRY academic institution

DEBAR union

Here, it would be undesirable to correct the article "a" to "an" if "union" were selected by the reference, even though it starts with a vowel. So, we use the "DEBAR" qualifier to exclude the word "union" from triggering this response from the parser.

If you would like to disable this functionality entirely, you can use the qualifier "DEBAR" by itself with no data, which simply tells the parser not to correct articles at all in this script!