Skip to main content

How to vary language in narratives

In Arria NLG Studio, there are two ways to add variation: random and controlled.

Random variation

Things vary freely:

structure = chooseAtRandom(1, 2)

Controlled variation

Things vary based on a rule:

[[isFirstSentence == true ? "in [[reference(entity, true)]] " : '']]

Tips for adding variation

The following are some things to keep in mind as you add variation to narratives.

Refer back to the corpus

Look at examples of how text varies in the corpus to get ideas for good variations.

Start small

Begin with one variation of a sentence, then get your report or paragraph to work with that in place. Then add additional variations bit by bit.

Vary the sentence order

List all possible orderings of insights for your narrative:

List_all_possible_orderings_of_insights.png

Reorder phrases

Move non-initial info (e.g. temporal expressions) to the front:

Move_temporal_expressions_to_the_front.png

Change the sentence structure

Transform clauses into phrases (and vice versa):

Transform_clauses_into_phrases.png

Use synonyms

Substitute words for others of same meaning:

Use_synonyms.png