Script files

This section summarises the structure of the CALL-SLT Lite script file.

If you want to present your lesson as a dialogue, you need to write a script. Each script is put in a separate file, which needs to be declared in the appropriate Lesson. A script file contains two kinds of units. The greater part of the file consists of steps; there will also be one init statement.

In the rest of this section, we describe the file format, steps, and init statements.

Form of the script file

Script files are written in XML format. The file should start with the lines

<?xml version="1.0"?>
<script>

and finish with the line

</script>

Comments are in the usual XML style. A typical comment looks like this:

<!-- This is a comment -->

Steps

A step defines the dialogue flow for one interaction between the system and the student. It says which multimedia file to play, where to take the prompt from, and what to do next. A simple step looks like this:

<step>
   <id>hello</id>
   <group>welcome_greeting</group>
   <next_limit>ask_for_number_nights</next_limit>
   <next_success>ask_for_number_nights</next_success>
</step>

Here, the tags have the following meanings:

<id>
The name of the step, here “hello”.
<group>
The name of the Prompt group, here “welcome_greeting”. The relevant Prompts need to be defined in the grammar file and listed as belonging to this Group. One of them will be randomly selected and shown to the student.
<next_limit>
The step to move to if the student’s response has been rejected too many times, Here “ask_for_number_nights”.
<next_success>
The step to move to if the student’s response has been accepted. Here, “ask_for_number_nights”.

Conditions

You may sometimes want to define several different alternatives for the <next_success> tag. One simple possibility is that you just intend to provide more variety in your script. You can do this by assigning a probability condition to a tag. For example, in the following step

<step>
   <id>dont_understand_but_is_one_night_okay</id>
   <group>yes</group>
   <next_limit>here_is_your_room_number</next_limit>
   <next_success probability="50">here_is_your_room_number_end</next_success>
   <next_success>here_is_your_room_number_ask</next_success>
</step>

there are two possible next steps after a successful response. We move to “here_is_your_room_number_end” with 25% probability, and otherwise to “here_is_your_room_number_ask”.

Another possibility is to make the choice of next step depend on the student’s current badge level. In this step,

<step>
   <id>here_is_your_room_number_ask</id>
   <group>missing_article/group>
   <next_limit>exit</next_limit>
   <next_success cond="level >= bronze">where_to_buy</next_success>
   <next_success>not_available_end</next_success>
</step>

there are two possible next steps after a successful response. If the student is currently at the “bronze” badge level or higher, it moves to “where_to_buy”; otherwise, it moves to “not_available_end”.