Zipf's Law from Random Typing: Monkey Text, Word-Length Blocks and the Exponent alpha
A monkey hits m letter keys and the space bar at random. Words are the letter runs between spaces, and their rank-frequency plot is a straight Zipf line with exponent alpha = ln(m/(1-q))/ln m, close to 1. Watch a Blender typewriter produce thousands of words, towers at ranks 1, 2, 4, 8 ... grow, vocabulary follow Heaps' law and word lengths follow q(1-q)^(L-1). Change keys, space probability, corpus size and the seed, and compare the exact theory with the typed text.
A monkey hits m letter keys and the space bar at random. Words are the letter runs between spaces, and their rank-frequency plot is a straight Zipf line with exponent alpha = ln(m/(1-q))/ln m, close to 1. Watch a Blender typewriter produce thousands of words, towers at ranks 1, 2, 4, 8 ... grow, vocabulary follow Heaps' law and word lengths follow q(1-q)^(L-1). Change keys, space probability, corpus size and the seed, and compare the exact theory with the typed text.
A monkey hits m letter keys and the space bar at random. Words are the letter runs between spaces, and their rank-frequency plot is a straight Zipf line with exponent alpha = ln(m/(1-q))/ln m, close to 1. Watch a Blender typewriter produce thousands of words, towers at ranks 1, 2, 4, 8 ... grow, vocabulary follow Heaps' law and word lengths follow q(1-q)^(L-1). Change keys, space probability, corpus size and the seed, and compare the exact theory with the typed text.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install