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:
Reorder phrases
Move non-initial info (e.g. temporal expressions) to the front:
Change the sentence structure
Transform clauses into phrases (and vice versa):
Use synonyms
Substitute words for others of same meaning: