ChomskyBot
What is a ChomskyBot?
ChomskyBot is an applet that generates sentences solely on their
syntactical properties simply by combining phrases randomly into a sentence.
The results might appear to make sense sometimes.
The phrases are taken from the linguist Noam Chomsky's book
Syntactic Structures, 1957.
All the information needed for the program and the phrase files were copied from
John Lawler's original version
written in Perl. I don't have access to any server
side processing, so therefore I ported it to Java and created an applet. The
program is quite generic, so it can be used for other similar types of tasks.
It lets you specify the number of sentences in a paragraph and accepts
any amount of phrase files. The tricky part is to make those files.
Files
- ChomskyBot.java
- The ChomskyBot application written in Java 1.1. You can use it
as a standalone command-line application. Type
java ChomskyBot
for parameter info.
- ChomskyBot.class
- ChomskyBot.class file.
- ChomskyBotApplet.java
- An applet that creates the GUI for the above ChomskyBot.
Written in Java 1.1. The Applet accepts two parameters:
filenames - obligatory
- A list of files containing the phrases separated by white
spaces (" \t\n\r\f"). The files must be located where the codebase of
the applet is or in a subdirectory, i.e. an URL relative to the
codebase, and they must be given in the correct order.
sentenceno - optional
- An integer specifiying the number of sentences in a paragraph. The
default is 3.
- ChomskyBotApplet.class
- ChomskyBotApplet.class file.
- Phrase files:
- chomsky1.txt
- chomsky2.txt
- chomsky3.txt
- chomsky4.txt
Return