This is a Java applet for random text generation. If you feed it with some text, it will generate interesting random results!
Instruction:
- Type some sentences in the applet text area and hit the "Go" button.
- A parameter window will pop up that asks you to specify the length of the context window, and the length of the result text. Specify your parameters (or just accept the default ones) and hit the "OK" button (or "Reset" for the default values).
- A synthesis window will pop up. You can hit the "Synthesize" button to see the result. If you click this button several times you will see different runs from the same input text.
Hints:
- The longer the input you type in, the more interesting the result will be. For best results, try to feed in texts with sufficient word repetitions.
- The length of the context determines the "randomness" of the output. If the context size is 0, a purely random output will be produced. As you increase the context size the result will tend to be more regular. However, a verbatim copy of the input will eventually show up if you make the context size too big. For best results, try to use context size between 1 and 4.
Notes:
- In my implementation, there is no restriction on the size of the context window. This is in contrast to most of the other implementations (as well as Shannon's original idea). The reason is that I choose not to build a probability table at all, and get away with the problem of memory explosion and training data size. I will publish the source code after I clean it to a reasonable degree.
- Ideally, we would like to be able to load the text source from the web, or some local files. However, Java doesn't allow network and disk I/O operations for applets (due to security reasons). I will publish a console based application (also in Java) that you can run on your machine, and you can load/save the texts from/to disk files or web documents.