Inserting variables
We’ll use the data you have imported to generate short stories about the states and territories. To get started, click the Compose button in the left-hand ribbon.
You are now in the Compose view.
Script editor
The main component of the Compose view is a script-editing window. To the left of this editor is a list of the scripts that make up your project: right now there’s only one, called Main. You will create and use additional scripts later in this tutorial.
The script editor has two rows of buttons. Hover over each one to see what the buttons are for. The first row provides access to NLG Studio’s functionality; the second row provides common formatting operations that you’ll be familiar with from other editing environments.
Programming in ATL
When you construct an NLG Studio script, you are effectively writing a program in Articulate Text Language, or ATL for short.
Once you understand ATL, you can type ATL expressions into your narrative directly in the Compose editor. But when you’re just starting out, it’s easier to use the NLG Studio user interface. With the first set of top-row buttons, you insert various ATL elements into your script.
Inserting a variable with a button click
Let’s add a value from the data table. We need to tell Studio which value we want; we can use a variable for this.
Click the Insert Variable button (highlighted below).
As shown above, this produces a list of variables corresponding to the column headers in your data table.
Select Jurisdiction from the list.
The variable now appears in the editor, underlined in green.
Important
Studio shows variable references underlined in green when the editor is in Marked Up View.
Switch to ATL View by clicking the ATL View button (highlighted below).
The green underline disappears and you see the underlying ATL:
[[Jurisdiction]]
. So now you know how to reference a variable in ATL: type its name inside two sets of square brackets.Switch back to Marked Up View by clicking the Marked Up View button (located to the left of the ATL View button).
Type the following text after the variable name: "is one of the eight states and territories that make up Australia.”
Congratulations! You’ve just completed your first — very simple — NLG Studio script. In the next step, you'll preview the generated text.