Skip to main content

Postprocessing

Studio automatically applies some postprocessing to help eliminate grammatical or typographical errors.

Postprocessing 1.png

This feature is very reliable, but in some scenarios it might produce unwanted results. For this reason, you can enable or disable the postprocessing tools as required. The tools are:

"A" and "An" correction

Postprocessing 2.png

When this tool is enabled, Studio automatically selects between "a" and "an" in situations where one or the other is required depending on the value of a data variable. By default, the tool is enabled.

Assume a "Describe Each Row" project with this data:

ID

Name

Position

Department

Row 1

1001

Eric Blair

Manager

Shipping

Row 2

1002

Mary Evans

Assistant Manager

Sales

With ENABLE "A" and "AN" CORRECTION TOOL set to YES:

ATL in Script

Row 1 Result

Row 2 Result

[[Name]] is a [[Position]] in the [[Department]] department.

Eric Blair is a Manager in the Shipping department.

Mary Evans is an Assistant Manager in the Sales department.

The Row 2 value for Position is "Assistant Manager", so Studio automatically replaces the "a" with "an".

With ENABLE "A" and "AN" CORRECTION TOOL set to NO:

ATL in Script

Row 1 Result

Row 2 Result

[[Name]] is a [[Position]] in the [[Department]] department.

Eric Blair is a Manager in the Shipping department.

Mary Evans is a Assistant Manager in the Sales department.

No "a" to "an" correction is performed when the text is generated, so the Row 2 result contains an error.

Automatic sentence capitalization

Postprocessing 3.png

When this tool is enabled, Studio automatically capitalizes the first letter of each sentence. By default, the tool is enabled.

Assume a "Describe Each Row" project with this data:

ID

Product

Sales

Row 1

1001

iPhone 11

256,129.56

Row 2

1002

Galaxy S20 FE

311,292.61

With ENABLE AUTOMATIC SENTENCE CAPITALISATION set to YES:

ATL in Script

Row 1 Result

Row 2 Result

[[Product]] sales were [[currencyFormat(Sales)]]

IPhone 11 sales were $256,129.56

Galaxy S20 FE sales were $311,292.61

The Row 2 value for Product is "iPhone 11" but the postprocessing updates this to "IPhone 11", which is incorrect.

With ENABLE AUTOMATIC SENTENCE CAPITALISATION set to NO:

ATL in Script

Row 1 Result

Row 2 Result

[[Product]] sales were [[currencyFormat(Sales)]]

iPhone 11 sales were $256,129.56

Galaxy S20 FE sales were $311,292.61

No automatic capitalization occurs and the product name is displayed correctly in the result for both rows.

Tip

You can use the lower function to convert all letters in a string to lowercase. Please be aware, however, that the ENABLE AUTOMATIC SENTENCE CAPITALISATION tool (if enabled) will overwrite the function.

Whitespace collapsing

Postprocessing 4.png

When this tool in enabled, Studio automatically removes duplicate spaces from your output narrative. In addition, it removes any spaces inserted before a comma. By default, the tool is disabled.

Example 1

There are two typographical errors in this script:

Postprocessing 5.png

First, there is a space before the comma. Second, there are four spaces between the fixed text "London" and the start of the second ATL block. This second error is easy to miss because the script breaks over multiple lines, but it's clear when you preview the output:

With ENABLE WHITE SPACE COLLAPSING set to NO:

Postprocessing 6.png

With ENABLE WHITE SPACE COLLAPSING set to YES:

Postprocessing 7.png

The postprocessing corrects both errors.

Tip

You can use the trim function to trim leading, trailing, and internal whitespace from an input string.

If you want to remove duplicate spaces in one part of your script but leave duplicate spacing in others, the best approach is to disable ENABLE WHITE SPACE COLLAPSING and use trim on the relevant script part.

Example 2

Sometimes duplicate spaces are not visible in Preview Mode. For example:

Postprocessing 8.png

The first ATL block is a conditional that returns "outstanding" if the value of risePct is greater than or equal to 50. A double space is produced when risePct is less than 50 because the ATL block — which in this case would return nothing — has a space on either side.

In an instance like this, the double space exists but is not visible when you preview — not even when the whitespace collapsing tool is disabled. For example, if risePct is 42 and ENABLE WHITE SPACE COLLAPSING is set to NO, the preview is:

Postprocessing 9.png

This looks fine, but the double space will be in the output narrative and may be visible in the application you use for your output. To prevent this, set ENABLE WHITE SPACE COLLAPSING to YES.