APE - alphabetic predictive encoder
APE builds strings of output text based on the statistics of the input text. The higher the specified order (an input parameter), the more closely the output resembles the input.
As the most simple example, consider APE operating at order 2, generating output text based on a paragraph of input text. If the starting seed (the seed length is the same as the order, in this case 2) were Th, APE would copy the seed to the output, and then examine the input text to see what letters immediately follow Th throughout. It might find that the letters a e i and o as well as space occur right after Th, each of them several times. APE would select either a e i o or space and copy it to the output. The probability of chosing a particular letter is based on how frequently it occurs after the seed sequence in the input text.
Assume for the sake of illustration that APE chooses the letter e. APE copies the letter e to the output which now contains the letters The. APE then drops the first letter T from the seed and adds e to the end; the seed is now he.
APE then starts over, examining the input text to see which letters follow the sequence he. It continues on generating letters based on the seed, selecting a letter from the input that follows the seed sequence, transferring that letter to the output, and then updating the seed.
For lower orders (e.g., 2 or 3) APE will generate short runs of letters that are recognizeable and these may appear in interesting combinations to create new words. For higher orders, longer sequences from the input text appear in the output, possibly complete words. For the highest order (e.g., 8 or 9) complete words and phrases or even sentences from the input may appear in the output since higher orders give less flexibility for variation. Of course the output is highly dependent on the input.
APE requires the following inputs:
- input text: Cut and paste text from some other document into the input box near the bottom of the page. APE will convert question marks, exclamation points, and semicolons to periods, as well as removing some non-alphabetic characters. You can paste in several paragraphs; APE will ignore the paragraph separations.
- output size: Select the size in characters of the output. APE will generate and display the output of this length in the output area at the top of the page.
- order: See the overview above for discussion of the order. The greater the order, the longer will be the recognizeable sequences of letters from the input that appear in the output. Try different orders for the same input text to see how this works.
- seed: The seed you specify here (if any) will be the first letters in the output text. APE uses the initial seed to generate subsequent letters of the output, and succssive new seeds. If you don't specify a seed, APE will select one out of the input text.