Wonderland,
measured.
This started with a tiny Python program and two words: Alice and Rabbit. I’ve kept that first question—and added a few ways to get lost in the book along the way.
“Curiouser and curiouser!” seems a good place to start.
Wait—what counts as Alice?
Alice looks straightforward. Then there’s Alice’s, a pair of quotation marks, or a name in a chapter heading. Try a different rule and watch the answer change.
Alice
Rabbit
A small warning before we chase the Rabbit: a matching word is not proof that we’ve
identified a character. rabbit-hole stays one word, and final ’s grouping is an optional
mechanical rule—not a full understanding of the language.
Where do the words wander?
The Rabbit doesn’t stay in chapter I. Pick a word, switch between raw counts and appearances per 1,000 words, then choose a chapter to have a look at the passages.
Each bar is scaled from zero. The small n is the raw occurrence count, not the chapter length. All tokens—not only content words—form the rate denominator.
“Said” has rather a lot to say.
Before dismissing a common word as boring, click it and see how Carroll uses it. Or try a chapter’s handful of distinctive words. See where they take you.
The most frequent words
The filtered view removes a small, published list of common function words and forms shorter than three letters. “Said” stays. Words are case-folded but not stemmed; click any one to read it in context.
A chapter's fingerprint
Five words brought forward by TF–IDF weighting, each used at least three times in the chapter. They aren’t a summary. Click one and decide whether it feels like the chapter you remember. The weighting and filter are explained in the methods.
MATTR · fixed 100-token window
Mean share of distinct word forms within overlapping 100-token windows. Same window size across chapters; whole-chapter type/token ratios would be length-sensitive. This is not a readability or quality score.
Back to the book.
Try “curiouser”. Or “tea”. Or that word you noticed in the chart. Here are the bits of the book where it actually appears.
Source: Lewis Carroll, Project Gutenberg eBook #11. This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org.
A small book doesn’t need a cluster.
Back then, this part of the assignment ran on AWS. Here, you can watch the same basic map/reduce pattern work locally. No account setup. No bill at the end.
Emit.
Each letter becomes a key/value pair: ["e", 1].
Compress.
Count within fixed-size text chunks, before grouping.
Gather.
Bring the same character's local totals together.
Sum.
Add each key's totals. Sorted-input checks prevent silent errors.
The letter distribution
The book has no #
and no %.
Each occurs once in the supplied full source file, but neither occurs in the twelve chapter bodies. The licence and metadata are data too—unless you deliberately exclude them.
This local implementation demonstrates partitioning, combining, grouping, and reduction.
It is not a distributed benchmark. A direct Counter is simpler for this file;
tests establish equivalence across chunk sizes.
e.
A literal lowercase count in this supplied full file is .
That historical character result is not reproduced; the old mapper settings
or exact input would be needed to resolve the difference. That difference stays visible:
a tidy story isn’t worth a made-up explanation. The two original word counts are reproduced.A few ground rules.
There’s plenty of room to be curious. These are the rules that keep the counting honest while we’re exploring.
One pinned edition.
Millennium Fulcrum Edition 3.0, supplied as a local Gutenberg file. The original bytes and SHA-256 are retained. Narrative analysis excludes the title page, chapter headings, “THE END”, end credits, and legal boilerplate.
A word, explicitly defined.
Unicode letters with internal apostrophes and hyphens. Case-folding is optional; final ’s grouping is separate. No stemming, entity resolution, dialogue attribution, or sentiment model is hidden behind the charts.
Descriptions, not discoveries of cause.
These are exact counts under stated rules in one edition, not estimates of a literary population. No causal, significance, emotion, authorship, or character-importance claims follow from them.
Evidence is computed, not generated.
The Python standard library computes every figure and export. No API keys, paid models, cloud cluster, external font, or CDN are needed. The browser keeps its search data on the page; queries never leave your device.
python -m wonderland buildpython -m unittest discover -s tests -v