The Internet TESL Journal

A Hypercard Random Sentence Generator For Language Study

Charles I. Kelly
Aichi Institute of Technology (Toyota, Japan)

Originally published in
Bulletin of Aichi Institute of Technology
Vol. 28, Part A, pages 51-55
March 1993

You can download the 38K stack from Charles Kelly's HyperCard page at


This is a description and explanation of a random sentence generator which can be used in the study of foreign languages. The paper explains in detail how to use the Hypercard stack Random Sentences. A listing of the stack's script is also included. This random sentence generator differs from others in that the user is allowed to input sentence patterns as regular English and does not need to use "grammar" language or code words.


This paper describes and explains the random sentence generator, Random Sentences, which I wrote using Hypercard on a Macintosh computer. This random sentence generator differs from others in that the user is allowed to input sentence patterns as regular English and does not need to use "grammar" language or code words. Since the input of data is simple, it is a useful tool for second language learners. A teacher can customize this stack to fit the needs of his students or the student himself can experiment with his own sets of sentence patterns and substitution phrases. The user may alter the data without any knowledge of Hypertalk.

Random Sentence Production

When you start this Hypercard stack, it will open up to the title card which includes the title, copyright notice and information about the stack. Click on the Start button and you will be brought to the Sentence Production card (Fig. 1). Click the Produce a Sentence button. On the screen you will first see the sentence pattern which was randomly chosen from the Sentence Pattern card (Fig. 2). Next, you will see the words or phrases to be replaced (wildcards) followed by the words or phrases (substitutions) randomly chosen from their respective cards (Fig. 3) which will replace the wildcards Finally, the finished sentence will be displayed on the screen. If you have chosen the Macintalk option and if you have Macintalk in your system folder, you will hear the sentence spoken by Macintosh's speech synthesizer.

Customizing the Stack

Here is a step by step explanation of how to customize this stack for your own students.

1. Make a copy of the original stack. Go to the title card of the new stack and click the Make a Blank Stack button.

2. Next, go to the sentence card (Fig. 2) and input some sentences which your students should know.

I am John.
Are you John?
This is a pen.
These are pens.
John has a pen.
John can swim.
3. Next, enter the wildcards and the substitutions. Notice that in the above sentences we have three sentences with the word "John". So we may consider "John" to be a wildcard. Go to the substitution card (Fig. 3) and enter "John" in the Wildcard field. In the Substitution field of the same card, enter names of people (George, Jane, Mr. Jones, etc.) and singular phrases for people (a man, an American, a young girl, etc.).

Repeat the process with the following information. To make new data cards, choose New Card from the Edit menu.

Wildcard: a pen
Substitutions: an appleetc.

Wildcard: pens
Substitutions: books
my magazines

Wildcard: swimplay baseball

Wildcard: can
Substitutions: must

4. Now go to the Sentence Production card (Fig. 1) and try it out.

Substitution Within Substitutions

It is possible to have the computer substitute into the substitutions already made. For example, if "a pen" is substituted by "a blue book" and if you have a card like the one below, the word "blue" will be substituted by one of the other colors. For this to work, the card "blue" must be after the card "a pen".
Wildcard: blue
Substitutions: yellow

More Ideas for Customizing

The most obvious customization is to use sentence patterns and vocabulary that the student already knows. The stack can be expanded by adding new sentence patterns and new phrases as the student learns them. Other possibilities are to limit the patterns while introducing new vocabulary or to limit the vocabulary while introducing new sentence patterns. It is possible to customize stacks using many different teaching approaches (grammar, functional, situational etc.). If the teacher is developing a lesson on survival English for travel, all phrases could be limited to those that might be used when traveling or those that include useful vocabulary for the traveler. For teachers developing a lesson on the use of modals, all sentence patterns should include a modal wildcard (e.g. must) and a card should be included in the stack which has all the modals being studied (e.g. can, should, etc.).

The Cards

Figure 1. The Sentence Production Card is where the sentence are made. In the top field you can see what has been chosen. The bottom field shows the resulting sentence.

Figure 2. The Sentence Pattern card has all the sentence patterns that the stack uses.

Figure 3. A Substitution Card. There is a card like this for every wildcard. Field 1 contains the wildcard, field 2 a short description, and field 3 the substitutions.

The Script

The script was included in the original paper, but has been removed. Download the current version of this stack and look at the newer script.

The Internet TESL Journal, Vol. 1, No. 1, November 1995