Week 5 · Counting words
The Marvel network gets language
Does a character's place in the link network show in the words of its page? We read the 303 Marvel Wikipedia pages as text, with this week's tools: tokens, counts, Runs of n words in a row, in the order they appear in the text: an 8-gram is eight words in a row., Every place a word occurs, each shown with the words around it. and the A table with one row per document and one column per word. Each cell says how much that word counts in that document., and asked seven questions where the words meet the links.
A link is an editor's choice to point to a page, not a friendship in the comics.
713,617words on 303 pages
1,784links between the pages
Seven findings
Seven sections, seven findings
Turn links into relationships
54% of links written in fight words join two communities, against 42% when the labels are shuffled; family links cross only 23% of the time. Read by hand, the word list labels only 32 of 60 links right.
Catch Wikipedia copying itself
20 of the 22 pairs of pages that share a copied passage already link to each other, against 3.1% of all pairs.
A Marvel search engine in 20 lines
Raw word counts put the right page in the top five for 6 of 11 queries, but first for only 1: short pages win most misses.
Community autocomplete
Every fake page repeats a run of 8 to 17 words from its community's pages. No other group has guessed yet.
Heaps' law of the Marvel universe
Read least-linked first, the first 100,000 words hold 11,079 different words, against 10,570 ± 207 in random orders: minor characters bring new words.
Does network fame buy you more words?
Yes: page length follows in-degree at Pearson 0.77, and pages for a codename several characters share sit below the trend.
Who has the weirdest Wikipedia page?
10 of the 30 most repetitive pages are about several characters who share one name, where 4.6 would be expected.
Opening
303 Wikipedia pages about Marvel characters, read once as a network and once as text.
The pages are the English Wikipedia articles in Category:Marvel Comics superheroes, as the course froze them on 26 August 2026. Each is plain text, from 193 to 14,037 words long, 1,218 at the median.
What a link means. A link runs from page A to page B when A's text links to B's article. The pages hold 1,784 such links, joining 1,434 pairs of pages. 58 pages receive no link at all, and 17 of those also link to no page. A link records an editor's choice to point there, not a friendship or a fight in the comics.
How each section reads
Every section answers one question on one card.
- Question
- What we asked, and the short answer
- Did
- What we did, beside what to notice
- Figure
- The chart or table that answers it
- Drawers
- Method and its limits, more numbers, and the passages we read
How to read the charts
What counts as a word
What a word is. A tokenizer decides where one word ends and the next begins. Unless a section says otherwise, a word is a run of letters, lowercased, with an apostrophe or hyphen inside it kept and a possessive 's removed: "Spider-Man's first appearance in 1962" gives spider-man, first, appearance, in. The pages then hold 713,617 tokens, word occurrences, of 27,754 types, different words.
Turn links into relationships
Links written in fight words reach across the network's communities, and links written in family words stay inside them.
Do enemies sit in different communities from allies and family?
Mostly yes, as a tendency: about half of the word list's labels are right.
We labelled each link from page A to page B by the sentence on A's page that names B, using a small word list that gives each sentence one of five labels: killed, family, enemy, ally, teammate. Then we counted how often each label's links join two communities, against the labels shuffled.
Links that join two communities, by label
Dot: the share of that label's links that join two communities, over 100 Louvain runs. Band: the same share with the labels shuffled, mean ± one standard deviation.
Where the fight and family links run
Each dot is a page, coloured by its community in section 4's consensus; grey pages have none. Dark lines join the pairs whose linking sentence uses the chosen kind of word.
Method
A link from A to B means A's Wikipedia page links to B's. For each of the 1,784 links we took the first sentence on A's page that names B, and found one for 1,513 (85%). Most of the rest come from infoboxes and navigation boxes, which our copy of the text has lost; 33 point at one of 7 alternate versions, such as the film Jean Grey, whose name belongs to the main character.
A small word list labels each sentence: killed, family, enemy, ally or teammate. It matches lower-case words only, so a name such as Doctor Nemesis supplies no label. 836 of the sentences (55%) match no word at all.
The communities come from 100 A method that finds communities by moving nodes between groups until links inside the groups are as dense as it can make them. It starts at random, so two runs can differ. runs on the link network. For each label we counted how often its links join two different communities, averaged over the runs, and compared it with 1,000 shuffles of the labels over the 677 labelled links.
Each page splits into paragraphs at its line breaks and into sentences with spaCy's rule-based sentencizer. Sentences under References, External links, Notes, See also and Further reading are dropped. A character is found by its page title without the disambiguation ("Storm (Marvel Comics)" is "Storm") and by the real name its description gives in brackets ("Emil Blonsky" for the Abomination), as a whole word. A name several pages go by belongs to the main page: "Spider-Man" is the main Spider-Man, not the Mangaverse one.
A sentence that matches several labels takes the first of killed, family, enemy, ally, teammate. Negation is not handled. Louvain runs on the weighted, undirected link network with seeds 2805 to 2904. The runs disagree with each other, so the test uses how often each link crosses over all 100 runs, for the real labels and the shuffled ones alike.
The word list reads the sentence, not the pair: a long sentence that names B often tells of a third character. "Phyla then goes with Nova and Star-Lord to lead a final battle against Annihilus" makes Star-Lord her enemy.
More numbers
A stricter shuffle only swaps labels between links that leave the same page, so a page written in hostile words throughout cannot carry the result. Enemies still cross more than it predicts (46%, \htmlClass{x-z}{z} = 3.6) and family less (33%, \htmlClass{x-z}{z} = −3.7). A pair of characters who link both ways counts twice above; counting each pair once gives \htmlClass{x-z}{z} = 3.6 for enemies and −4.0 for family.
The labelled links: 217 teammate, 202 enemy, 116 family, 84 killed and 58 ally. 113 sentences match more than one label.
What we read
We read 60 sentences, 12 per label, drawn at random: 32 of the labels describe how A and B relate. Ally labels hold up best (9 of 12), enemy and killed worst (5 of 12 each), family in between (6 of 12).
✓ means the label describes how A and B relate; ✗ says what the sentence is about instead.
Catch Wikipedia copying itself
Pages copy each other when their characters share a codename or a team, and what they copy is mostly publication history and lists of films and games, rarely the character's story.
Which Marvel pages copy text from each other?
22 pairs of pages, in 12 clusters, nearly all about characters who already link to each other.
We collected every run of eight words in a row on each page, set aside runs found on more than 10 pages as house style, and linked two pages when they share a passage of 30 words or more.
The copying network
Each dot is a page, sized by the words it shares. A line joins two pages that share a passage of 30 words or more, thicker for more shared words; a dashed line means the two pages do not link to each other. Hover a line for the passage.
Method
We split every page into lower-case words, 740,282 in all, and collected every run of eight words in a row, an 8-gram. A run found on many pages is house style, not copying: "in American comic books published by Marvel Comics" is on 282 of the 303 pages. So 8-grams on more than 10 pages are set aside.
The remaining 8-grams merge into passages, overlapping runs counting once. Two pages copy each other when they share a passage of 30 words or more. The copying network links those pages, and its connected pieces are the clusters.
A word is a run of letters and digits, with an apostrophe inside a word kept ("jean's"); punctuation and line breaks are dropped. Each word keeps its place on the page, so every shared passage is quoted from the page itself, and a passage copied twice on a page counts twice. A passage is labelled with the section heading above it on each of the two pages. What ties each cluster's characters was read from their pages.
The check: a pair that copies is compared with all 45,753 pairs of pages and with the 2,830 pairs that share only a phrase, an 8-gram run shorter than 30 words. A link counts in either direction.
The text has no edit history, so we cannot tell who copied whom. The passage length matters: at 20 words, 80 pairs copy and 46 of them link; at 50 words, 11 copy and all of them link.
More numbers
The two pairs that do not link are Wild Child's: his page shares a stock sentence about Krakoa with Storm's and Rachel Summers's. Five clusters share a codename (Venom and Eddie Brock), six a team (Rocket Raccoon and Star-Lord) and one a family.
The house-style cutoff barely matters: any cutoff from 3 to 20 pages gives the same 22 pairs. And runs of 12 words add 16 pairs from a templated lead that 8-word runs split, on eight Strikeforce: Morituri pages whose leads come in two versions.
Table
What we read
The longest passage of the largest copying pair, quoted from its first page. The next two pairs, and a templated lead that only runs of 12 words find, are one click away.
A Marvel search engine in 20 lines
Counting shared words beats chance, but it loves short pages: a 255-word page beats Storm's 9,831 words for "weather-controlling mutant from Kenya".
Can a Bag-of-Words search find the right Marvel page from a short description?
Rarely first: the right page comes first for 1 of 11 queries and in the top five for 6. Short pages win most misses.
We turned every page and every query into a Bag of Words: a count of each word, with the order thrown away. We wrote 12 queries, 11 with a target page, ranked all 303 pages by cosine similarity to each, and looked where the target came: once with every word, once with stopwords removed, spaCy's list of 306 words.
Try the search (stopwords removed)
The eight pages with the highest cosine for the query; (target) marks the page we meant.
The 12 queries
| Query | Target | Raw rank | No stopwords | Raw top hit |
|---|
Click a query to see the words it shares with the winning page and with its target.
Method
A word is a run of letters and digits in any alphabet, lowercased, and a hyphen splits words, so Spider-Man counts as spider and man. The 303 pages and their 28,062 different words form a document-term matrix that is 97.2% empty. The most common word, the, makes up 6.1% of all 740,340 words: a handful of words dominate every page, as Zipf's law says.
The brief's own example, "Norse god of thunder", has no target: the snapshot holds no page for Thor, so it stays out of the hit rates.
Pages with equal cosine rank in node order, in the script and in the search box. A random ranking puts the target first with probability 1 in 303 and in the top five with 5 in 303; a binomial test gives each hit count its p-value.
With raw counts, 8 of the 10 misses are won by a page shorter than the median page of 1,258 words.
A miss is labelled from the data, for each model: a short-page win when the winning page has at most a third of the target's words, a missing word when the target shares no content word with the query, and otherwise a win by a page that is not short. The search box runs the stopword-free model on the same vocabulary as the table.
We chose the 12 queries and their targets ourselves, so the hit rate says how the search does on our questions, and the single first-place hit, Moon Knight, carries the raw headline.
What we read
Redneck's page wins "weather-controlling mutant from Kenya" while sharing one word with the query besides stopwords, mutant, in its first sentence:
Community autocomplete
Trained on one community's pages, a trigram generator copies: every fake page repeats a run of 8 to 17 words straight from its community's text.
Can someone who has not seen the pages tell which community a fake page came from?
We do not know yet: no other group has guessed. What the fakes already show is copying.
Each group of at least 8 pages gets its own trigram model: the probability of the next word given the two before it, P(w3 | w1, w2), counted from the group's pages. We will post the 9 fake pages, one per group with names masked, in the week 5 Teams channel and report the correct guesses out of all guesses, against the 1 in 9 (11%) a random guess gets right.
Guess the community
A locked guess stays locked. Your score stays in this browser and is not part of our results.
The eight groups the generators learn from
Each dot is a page, coloured by its consensus group. Grey pages are outside the giant component: the 9 Strikeforce: Morituri pages and the 17 with no links. A link takes its group's colour when both pages are in it.
Method
First the communities. Louvain ran 100 times on the giant component of the link network, the 277 of 303 pages joined to each other by links. The runs disagree: they found 89 different partitions, the most common one in only 4 runs, and 77 runs found 8 groups. Two runs agree with a median Normalised mutual information: how much two splits into groups agree, from 0 (unrelated) to 1 (identical). of 0.90. So we kept a consensus: two pages share a group when at least half the runs put them together, which gives 8 groups, the same for all 100 seeds we tried on it. The 9 Strikeforce: Morituri pages link only to each other and form a ninth group; the 17 pages with no links have none.
A trigram model is next-token prediction, what a large language model does, with a two-word window and a table of counts in place of a neural network. Each fake page opens with one sentence we wrote by hand ("Aetherion is a character appearing in American comic books published by Marvel Comics.") and continues with 5 sentences the model samples word by word.
Before training we replace every character's name, the page title and the real name its description gives, by [name], so a guess cannot rest on spotting a member. The quiz shows these masked fakes.
Tokeniser: each page splits into paragraphs at its line breaks and into sentences with spaCy's rule-based sentencizer, which knows that "Dr." does not end a sentence. Heading lines are dropped, and so is every sentence under References, External links, Notes, See also and Further reading. A word is a run of letters in any alphabet, with an apostrophe or hyphen inside it kept, lowercased and with a possessive 's removed; digits and punctuation are dropped.
Each sentence is padded with two start markers and one end marker before counting. The model has no smoothing and no backoff: sampling starts from the start markers and only ever reaches two-word contexts that occur in the pages. A sentence that reaches 40 words without ending is thrown away and drawn again, never cut; that happened to 5 sentences. Names are matched as whole words with their capitals, so "Storm" becomes [name] and "storm" stays.
The mask covers only the 303 characters' own names. Other characters, surnames on their own and team names stay, and all 9 masked fakes keep some, such as mephisto, khonshu and krakoa, so a guess can still rest on a name.
More numbers
The groups, named after their page with the most link weight: Hulk, 40 pages; Wolverine, 40; Spider-Man, 38; Scarlet Witch, 38; Quasar, 35; Doctor Strange, 34; Iron Fist, 30; Black Widow (Natasha Romanova), 22; Radian (Morituri), 9.
The groups shift from run to run, as the median normalised mutual information of 0.90 shows; the consensus keeps the pairs most runs agree on.
Without the mask, 7 of the 9 fakes name a member of their own group.
The links hold these groups together far more tightly than chance. Louvain's A score for a split into groups: how many more links fall inside the groups than a random network with the same link counts would put there. averages 0.503 over the 100 runs, against 0.347 ± 0.004 on 100 rewired copies of the network (\htmlClass{x-z}{z} = 36.6). The consensus groups score 0.506. The rewiring swaps the ends of two links of equal weight, 50 swaps per link, so every page keeps its number of partners and its total link weight.
Modularity of the groups against rewired networks
Dot: Louvain's modularity on the real network, the mean of 100 runs. Band: the same on 100 rewired networks that keep every page's partners and link weight, mean and one standard deviation either side. Higher means more link weight inside groups than chance.
What we read
For every fake we searched its group's sentences for the longest run of words it repeats verbatim. The runs are 8 to 17 words long, and 8 of the 9 come from a single page. Opening the example gives away one quiz answer.
Show one fake's copied run beside its source sentence
Heaps' law of the Marvel universe
Word for word, the least-linked characters' pages bring more new vocabulary than random pages, and the most-linked pages bring less.
Do minor characters bring new words, or mostly repeat the famous ones?
They bring new words.
We read the pages in three kinds of order: most-linked first, by the number of other pages that link to a page; least-linked first; and 500 random orders as the baseline. The ten most-linked pages hold 84,807 tokens and the ten least-linked only 6,636, so we compare the orders after the same number of tokens, not the same number of pages.
Types seen against tokens read
Both axes are logarithmic. Band: the middle 90% of 500 random page orders. Dashed: Heaps' law fitted to their mean. The two ordered lines stay within 11% of the random mean at every point, too close to tell apart at this scale; the right chart shows the gaps.
Each order against random, at two points
Dot: how many more (right) or fewer (left) types an order has than the random mean after the same number of tokens. Band: one standard deviation of the random orders either side of zero. The badge is z.
Method
A token is one word as it occurs, a type one distinct word: "the Hulk smashes the tank" has 5 tokens and 4 types, since "the" comes twice. We read the 303 pages one after another, 713,617 tokens in all, and counted after every token how many types had appeared so far. The whole corpus holds 27,754 types.
The rule that the number of distinct words in a text grows as a power of its length below 1, so each new stretch of text brings fewer new words than the last. says that count grows as a power of the tokens read, \htmlClass{x-types-seen}{V} = \htmlClass{x-heaps-k}{K}\,\htmlClass{x-tokens-read}{n}^{\htmlClass{x-beta-heaps}{\beta}}, with \htmlClass{x-beta-heaps}{\beta} below 1: the more you have read, the more often a word is one you have met before. On Marvel \htmlClass{x-beta-heaps}{\beta} = 0.56, so reading 4 times as many words turns up about 2.2 times as many types.
A word is a run of letters in any alphabet with an inner apostrophe or hyphen kept, lowercased, with a possessive 's removed; digits and punctuation are dropped. So "Spider-Man's" and "Spider-Man" are one type and "Pérez" stays whole. Ties in link count are broken by the page's id. Every curve is read off on 41 token counts spaced evenly on a log scale from 1,000 tokens to the whole corpus.
The gap of an ordered curve to random is given in types and in z, the number of How far values typically sit from their average. of the 500 random orders. Every order ends on the same 27,754 types, so the random spread shrinks to nothing near the end; the two token counts we quote stay well short of it.
The fit is a straight line through \htmlClass{x-log-fit}{\log} \htmlClass{x-types-seen}{V} against \htmlClass{x-log-fit}{\log} \htmlClass{x-tokens-read}{n} on the random orders' mean, over the 26 grid points from 11,750 to 713,617 tokens: \htmlClass{x-heaps-k}{K} = 16.7, \htmlClass{x-beta-heaps}{\beta} = 0.56. Fitted to each random order alone, \htmlClass{x-beta-heaps}{\beta} runs from 0.54 to 0.57 (5th to 95th percentile).
Pages differ in length, and the most-linked pages are the long ones. Shuffling in-degree only among pages of similar length, in fifths by word count, 500 times, leaves both gaps standing (\htmlClass{x-z}{z} = 3.2 for least-linked first at 100,000 tokens, \htmlClass{x-z}{z} = −2.8 for most-linked first at 400,000), but fifths hold length only roughly.
More numbers
The gaps hold across the grid, not only at 100,000 and 400,000 tokens. The least-linked order stays 1.6 to 2.9 standard deviations above random from 11,750 to 266,346 tokens, and the most-linked order 2.0 to 3.9 below from 313,893 to 605,520 tokens. Each order leads or lags only while it reads its own end of the list: by 400,000 tokens the least-linked order has begun 253 pages, reached pages linked from 10 others, and sits at random (\htmlClass{x-z}{z} = 0.2).
Every count rests on one word rule; keeping digits or splitting hyphens would move them. And the link count only covers links among these 303 pages, not a character's fame in the comics: 58 of the pages get no link at all.
Does the curve flatten?
It bends but never flattens out. The slope on A chart where both axes are logarithmic: each step along an axis multiplies the value by the same factor, so small and huge counts fit on one chart. is 0.63 below 91,570 tokens and 0.49 above, so new words come more slowly as the corpus grows. In the last tenth of the corpus the random orders still meet 18 new types per 1,000 tokens.
Table
What we read
The last 100 pages in most-linked order, each linked from 2 pages or fewer, hold 90,907 tokens and add 2,144 types no earlier page used. 1,055 of them (49%) look like names, words that only ever occur with a capital letter, against 41% ± 1.6% for the last 100 pages of the random orders.
The split is a rough proxy: 53 of those names are capitalised only where they open a sentence or a line.
Does network fame buy you more words?
Pages that more characters link to are longer. Pages for a codename several characters share sit below that trend, and so do minor characters whose every linking page names the same team or place.
Do characters that more pages link to get longer Wikipedia pages?
Yes, and strongly (Pearson 0.77, Spearman 0.75).
The correlation of 0.77 is far from chance: in 1,000 shuffles of in-degree over the pages it averaged 0.00 ± 0.06 and never passed 0.19. For the five pages furthest above the line and the five furthest below we measured what could explain the gap, then read each page and the pages that name it.
Page length against incoming links
Each dot is one of the 303 pages, on log scales; hollow dots are the 17 isolates. The line is the fit. The ten named pages sit furthest from it, coloured by side as the key shows, each marked with its length over the predicted length. Pages with the same in-degree are spread slightly sideways so they do not hide each other; hover a dot for its numbers.
Method
A character's in-degree is the number of the other pages that link to its page. We counted the words on each of the 303 pages by the rule sections 5 to 7 share: runs of letters in any alphabet, an inner apostrophe or hyphen kept, lowercased, a possessive 's removed; digits and punctuation dropped.
We fitted a straight line to \htmlClass{x-ln-length}{\ln}(\htmlClass{x-words-doc}{\text{words}}) against \htmlClass{x-ln-length}{\ln}(\htmlClass{x-log-shift}{1 +} \htmlClass{x-in-links}{\text{in-degree}}) by Fitting a line by making the sum of the squared vertical distances from the points to the line as small as possible. over all 303 pages. The 1 + keeps the 58 pages nobody links to, 17 of them Nodes with no links at all. with no links at all. The slope is 0.72: each doubling of 1 + in-degree multiplies the predicted length by 1.65, starting from 546 words at zero in-degree. A page's What is left of an observation once the model's prediction is taken out. is its distance from the line in natural-log units, so \htmlClass{x-exp}{\exp}(\htmlClass{x-residual-log}{\text{residual}}) is its length over the predicted length: ×2 means twice as long as the line predicts.
What we measured for each of the ten: whether the page is an isolate; how many other pages name the character and how many of those link to it, where a name is its title without the disambiguation plus the real name its node description gives in brackets, as in section 1; whether the page is for a codename several characters share, which we call a hub page (its first sentence says several characters share its title, the rule section 7 uses); and its section headings before the references.
Reading added two things the rules miss: a codename other pages use instead of the title, which we counted with series titles and the Captain Britain Corps set aside, and a team that every page linking to a character mentions. Each shuffle test uses 1,000 shuffles with seed 2805.
In-degree counts only links among these 303 pages. A character famous from British comics or television, like Miracleman or Isaiah Bradley, gets nothing for it. The trend is a correlation: links do not write words, and both could share a cause we did not measure.
More numbers
Out-degree, the links a page makes, tracks length even more closely (Spearman 0.78), but a longer page has more room for links, so it partly measures length itself. A score that a node earns from the nodes linking to it, each passing on a share of its own score, so a link from a high-scoring node counts for more., which counts a link from a much-linked page for more, gives 0.71.
The names we counted come from the text alone, which lost its infoboxes, so a page can link to a character without naming it in our copy.
Pages named without a link: Spearman 0.07 with the residual, against 0.00 ± 0.06 in shuffles (\htmlClass{x-p-empirical}{p} = 0.202). The 46 hub pages: mean residual −0.21, against 0.04 for the other pages (\htmlClass{x-p-empirical}{p} = 0.008).
Each of the two explanations, hub pages and names without a link, shows at its extreme in one outlier: Brian Braddock's codename, Captain Britain, is on 14 other pages but linked from 1, and Quasar is a page for a name four characters share, with 24 incoming links.
Table
What we read
The ten pages furthest from the line, above it first. For each, the reason we found by measuring and reading, and a passage that supports it, from the page itself or a page that names it. Four of the five below the line are minor characters whose every linking page names the same team or place.
Who has the weirdest Wikipedia page?
The pages with the most varied words hold lists and an interview, and 10 of the 30 most repetitive pages are about several characters who share one name.
Which Marvel page uses the most varied words for its length, and is that real or boilerplate?
Real text: Coldblood, Super Rabbit and Ravage 2099 win with a list of cyborg parts, a Golden Age publication record and an interview.
Weird, for us, means varied words. We slide a window of 100 words along each page one word at a time, count the different words in each window and average them: the moving-average type-token ratio, MATTR. The fixed window lets the shortest page, 193 words, meet the longest, 14,037 words, since the share of different words in a whole page falls as the page grows.
Varied words against page length
Each dot is a page: its MATTR against its length in words, on a log scale. The shaded band holds random stretches of the whole corpus of the same length (mean ± 2 standard deviations; the dashed line is the mean). The solid line is the mean of each page's 30 length neighbours, which the ranking measures against. The five highest and five lowest scores against pages of similar length are named. Hover a dot for its numbers.
Method
We split each page into words: runs of letters in any alphabet, an inner apostrophe or hyphen kept, lowercased, a possessive 's removed; digits and punctuation dropped. We keep stopwords and do not lemmatise. The 303 pages hold 713,617 words.
MATTR has no trend with length, but short pages spread more because they have fewer windows to average: a standard deviation of 0.031 in the shortest quarter of pages against 0.021 in the longest. So each page gets a How far a value lies from what chance would give, measured in standard deviations, the typical size of chance's swings. The farther from 0, the less likely chance alone produced it. against the 30 pages nearest to it in length. Then we read the five highest and the five lowest.
The score passes its length checks. Its rank correlation with page length is 0.02, its z-scores spread 1.11 in the shortest quarter and 1.00 in the longest, and 6 of the top 10 pages are shorter than the median page of 1,218 words. With a 50-word window instead of 100, 7 of the top 10 and 8 of the bottom 10 stay in their ten (rank correlation 0.945 over all pages).
Real or boilerplate: a rare word is one found on at most 2 of the 303 pages. House phrasing is any run of 8 words found on more than 10 pages, section 2's cutoff applied to our word rule. It finds 113 such runs, led by "in american comic books published by marvel comics" on 282 pages. Both shares move with length (rank correlation 0.55 for rare words and −0.54 for house phrasing), since the house lead is a bigger slice of a short page, so each page we show is compared with the median of its 30 length neighbours. We leave out the share of a page's words used once (the hapax share): it falls as a page grows, so it cannot compare pages of different length.
Long pages also stray from random text more often: 6.6% of pages longer than the median fall outside the corpus band, against 2.0% of shorter pages. That is why each page is ranked against pages of its own length and not against the band.
The band: 2,000 random stretches of the whole corpus, every page joined in order, at each of 40 lengths (seed 2805), scored the same way. Sentences come from spaCy's rule-based sentencizer, so "Ms." and "U.S." do not end one. A page is about several characters when its first sentence says so ("Hawkeye is the name of several fictional characters"): 46 pages do. Section 6 calls them hub pages.
MATTR counts repeats, not strangeness: Coldblood wins by naming each cyborg part once, and only reading tells a list from an odd story.
Table
What we read
A sentence past the lead of each of the top three pages, and one from the last page, quoted from the page.
The top and bottom five, read
Rank of 303 by z-score. Rare words: the share of the page's different words found on at most 2 pages. House phrasing: the share of its words inside runs of 8 found on more than 10 pages. In brackets, the median of the page's 30 length neighbours.
Closing
Counting words finds the network in the text, and shows where counting stops.
Where the words meet the links, the links show through. Page length follows in-degree at Pearson 0.77, 20 of the 22 copied pairs already link to each other, and 54% of enemy links cross communities against 42% for shuffled labels, though the word list labels only 32 of the 60 links we read right. Raw counts rank and read less well: they put the right page first for 1 of 11 queries, because cosine favours a short page over a long one with the same words, and a trigram model trained on one community copies its pages word for word.
Methods, data and AI use
Data: the course's snapshot of the 303 pages, their node table and their links, frozen on 26 August 2026 and checked against a SHA-256 hash on every load (week05_text.py). Every random step has a fixed seed.
Word counts depend on the tokenizer. The course brief quotes about 727,000 tokens and 27,000 types for these pages, 36% of them used once, without naming its tokenizer. Our word rule counts 713,617 words and 27,754 types, 38% used once: it keeps 14,341 words such as Spider-Man whole and drops numbers and the possessive 's. spaCy's tokenizer with punctuation dropped gives 744,495 tokens, 26,987 types and 36% used once (course_reference.py).
- 1 · week05_relations.py Concordance of the sentence behind each link, a word list of five labels, Louvain run 100 times; 1,000 label shuffles, and 1,000 more within each page.
- 2 · week05_copying.py Shared 8-word n-grams, n-grams on more than 10 pages set aside as template; the link rate of all pairs as the baseline.
- 3 · week05_search.py Bag of Words and cosine similarity on the document-term matrix, with and without spaCy's stopwords; a random ranking as the baseline.
- 4 · week05_communities.py, week05_autocomplete.py A consensus of 100 Louvain runs against 100 rewired networks that keep each page's partners and link weight; one trigram model per community.
- 5 · week05_heaps.py Vocabulary growth in link order against 500 random orders and 500 orders that keep page length, and Heaps' law \htmlClass{x-types-seen}{V} = \htmlClass{x-heaps-k}{K} \cdot \htmlClass{x-tokens-read}{n}^{\htmlClass{x-beta-heaps}{\beta}} fitted to their mean.
- 6 · week05_fame.py Log length against log in-degree, against 1,000 shuffles of in-degree.
- 7 · week05_weird.py Moving-average type-token ratio over a 100-word window, scored against the 30 pages nearest in length; 2,000 random stretches of the corpus draw the figure's band.
AI use and how we checked it
AI coding assistants helped write the analysis and page code, drafted and revised text, and tested the page in a browser. The numbers come from the course data and the scripts above.
Each script writes the numbers its section quotes to a JSON file the page reads. A schema check tests each file against the fields the page uses, and the site tests fail when a number or a word such as "barely" in the text drifts from that file. We reran the scripts under two hash seeds and got identical files, and we read the passages behind the counts: 12 sentences per relation label, the copied runs, the search misses, the ten outliers of section 6 and the top pages of section 7.