Four numbers that identify a voice
Splitting on ". " was fine for one paragraph. Real copy ends sentences with ! and ? too, so the grown-up version splits on [.!?]+ — one or more sentence-enders — and strips the leftovers. That's the only regex sophistication you need today. Known blind spot, so it doesn't bite you on a real client: a decimal like "Rated 4.8 stars" splits at its period into two fake sentences, which drags avg_words down. Live with it while the samples are decimal-free; the day a client's copy leans on ratings, exclude digit-dot-digit before splitting.
Run the editor. fingerprint() reduces a sample to four numbers:
avg_words— mean sentence length. The single strongest voice signal there is. Windrow lives around 7-10; a luxury watch brand lives around 22; legal disclaimers live around 45. Get this one number wrong and nothing else saves you.exclaims— exclamation count. Windrow's is zero across all three samples. Zero is a finding, not an absence: it means the brand announces an 890-gram pack in a flat voice and trusts the number to do the shouting. A model left alone will not respect this.contractions— the\w+'\w+pattern catches "that's", "you'll", "won't". One trap, defused on the first line of the function: live published copy almost always carries typographic apostrophes (’) from the CMS, and\wdoesn't match those — skip thereplaceand the count silently reads 0 on exactly the copy this chapter tells you to fingerprint. Normalize first, always. Contraction rate separates conversational brands from institutional ones faster than any adjective. Windrow contracts steadily — this sample has one in five sentences, and across all three samples the rate lands near one every three.sentences— the denominator, and a sanity check that your splitter works.
Is four numbers a complete theory of voice? Obviously not. It won't catch that Windrow leads with specs, or the dry humor in "That's not a typo." Those judgments stay yours — you're the copywriter. But here's what the four numbers do that your judgment can't: they run on variant nine of twelve at 11pm, at the exact moment your ear has gone numb and the model has started drifting. Taste for the calls only a human can make; instruments for the calls a human stops making reliably after the fifth variant.
Fingerprint each sample separately
Next step you'll aggregate across the product page, the welcome email, and the about page. Keep them separate first, always — if the email averages 11 words and the product page 9, that's a channel difference worth knowing before you flatten it into one house number. One fingerprint per sample, then the average, then the rules. In that order.