Count the words in any book and a strange order appears: the most common word turns up about twice as often as the second, three times the third, and so on. Rank times frequency stays nearly constant. A handful of words do almost all the work; the rest are a long, thin tail. Slide the rank and test the law.
Zipf’s law: a word’s frequency is roughly inversely proportional to its rank, f(r) ≈ C/r, so on log-log axes the ranked frequencies fall on a near-straight line of slope ≈ −1. The instrument tokenizes a real public-domain text (Lincoln’s Gettysburg Address), ranks the words, and fits that line live. A fail-loud self-check throws unless the frequencies are monotone non-increasing by rank and the fitted log-log slope is negative and near −1 (within a band) — the empirical law that holds across languages and even code.
270 words is a small sample, so the slope is approximate (real corpora sit closer to −1, and the very top/tail bend — Zipf–Mandelbrot corrects them). The tokenization and the fitted line are exact for this text; the LAW is an empirical regularity, not a theorem.