Overview

Artificial intelligence is an active and exciting area of computer science. Can computers be made to do tasks that seem "intelligent"? Some of the goals (and partial successes) of artificial intelligence include important areas such as medical diagnosis, drug discovery, and robotics. For this assignment, we will visit the part of artificial intelligence referred to as "natural language processing," i.e. getting a computer to work with a natural language such as English.

More specifically, you will write a program called AIAuthor that will actually write original prose in the style of a chosen human author. Can computers be creative? We'll find out!

This is a team assignment.

Details

Find a source text. Specifically, find a text file that contains some text that you want the computer to creatively imitate. Project Gutenberg is a great place to start.

The technique that you will use works conceptually as follows:

Here's an example of some text that my program generates, using a window size of 5 on Grimm's fairy tales:

I will you learn home to taken his way, and around him, and left his come intender him in they cried: 'The little child,' said the other; 'let us for the cloak, and brough the peasant was to King.

Alternatively, when I tried it with a window size of 8, here's what I got one of the times that I ran it:

The servants running across the stables to salt and butter to eat and drink, the head you must get up quickly, and fell fainting to the test.

For part 1 of this assignment, your program should at least be able to read in a source text, ask for a window size, and choose a random seed from the text (which should be printed to the screen). Of course, you can turn in more of the entire assignment (or the whole thing) for part 1 if you like.

Final notes

Make sure that you use good design. Think carefully about how to layout your program so that you use classes and objects appropriately, and so that your methods remain short and self-contained.

Once you get your program running, try to get your program to write the most funny or insightful text that you can.