CS 10, Spring 1998

Lab 8.1 Artificial Intelligence-- Language Processing


Assignment for the Next Lab


Lab 8.1 Instructions

Copy the "module8" folder on the "Classes" file server to your disk.
  1. Browse through some of the Haiku poetry at http://www.lennartz.com/classhai.htm Write down a few of the poems you particularly enjoy. Later in the lab you'll use a HyperCard script to artificially create similar poems. You'll use these real examples to help judge how well the program does.

  2. Do lab exercise 2 on pages 314-316.

  3. Do lab exercise 3 (3.1 - 3.6) on pages 321-323.

  4. In its current form the Hype-ku stack can only create three line poems. Modify the stack so that it can accept forms of variable lengths. To do this you'll first need to find the function that produces the poems. Look at the script for the "Write a poem" button. What is the poem writing function called? Figure out where it's defined.

    Spend some time reading through the script of the poem writing function so that you understand how the script works.

  5. Once you understand how the poems are created, modify the script to allow for variable poem lengths. Then update the forms themselves. Make Form #1 use only 2 lines and make Form #4 use 4 lines. Test your changes by having the stack write a number of poems.

    When you have finished, call one of us over and demonstrate your modifications. If there is time remaining, play around with some of the web site below.

  6. For more computer-generated literature, visit the following sites:

  7. To talk to an computer program masquerading as a therapist, visit:

  8. Visit a database which accepts queries in plain English:

  9. To experiment with a program for translating natural languages, visit: