# Methodology — "King of Hearts": the Westminster charm audit ## What was measured Two metrics, for (a) every UK Prime Minister in the Hansard record and (b) every member of Andy Burnham's cabinet, over each person's **whole parliamentary career** (Commons and Lords): 1. **Laughs** — the number of "[Laughter]" stage directions Hansard transcribed inside the person's own spoken contributions (variants matched: "[Laughter.]", "(Laughter)", "loud/prolonged/renewed laughter" etc., by regex). Contributions merely containing the *word* laughter score zero. Hansard does not record whether the House laughed with or at the speaker; we note the most famous "at" cases in the piece. 2. **Romance (strict)** — occurrences of a 27-term affection vocabulary (full list below) where the usage is verified as genuinely affectionate/romantic. Everything else is retained, flagged, in the dataset: raw and cleaned counts are published. Headline rates divide by years in Parliament (ParlParse service records, dissolution gaps excluded). ## Sources and volume - Hansard API (hansard-api.parliament.uk), spoken contributions only, swept 22–23 July 2026: **48,329 unique (contribution, term) rows in 560 requests, zero failures**, cached in SQLite (charm.db). - Speaker resolution: Hansard MemberId → ParlParse for 2005+; parsed AttributedTo (name, initials, constituency, office wrappers) matched against ParlParse (memberships to 1761) for earlier records; Members API fallback for 82 modern IDs missing from ParlParse. - **PM office attribution**: rows attributed to "The Prime Minister (…)" — the PMQs convention — are assigned to the office-holder on the sitting date, from the Wikidata list of PM tenures. During this step Wikidata was found to be listing *David, the fictional PM from Love Actually* (Q131426522), as an incumbent since 2003; he was removed (and footnoted, because some things are too good to delete). - PM gender and TheyWorkForYou IDs from Wikidata (bulk SPARQL, ~4 queries). ## Romance term list and variants romantic(ally); romance(s); honeymoon(s); "I love"/"we love"; fell/fall(en) in love; in love with; my darling; sweetheart(s); love letter(s); love story/stories; true love; wedding anniversary/ies; valentine('s); kiss(es/ed/ing); cuddle/cuddly; wooing/wooed; courtship; love at first sight; blind date(s); speed dating; Love Island; chat-up line(s); flirt(ing/ed/ation); my wife; my husband. ## False-positive rules (all flagged, none deleted) - **Political metaphors**: honeymoon period/is over; sweetheart deals; "kiss goodbye to", "kiss of death", "kissing hands" (taking office); wooing voters/investors; flirting with disaster/the idea/insolvency; romantic poets/movement; courtship displays (ornithology). - **Names**: people called Valentine. - **Quoted material**: occurrences inside quotation marks (curly or paired straight quotes) or immediately after reading-out markers ("wrote", "letter", "told me", "said:") — MPs constantly read constituents' letters mentioning "my husband/my wife"; those are the constituent's spouse, not the member's. (Discovered via Andy Burnham's rows, two of which quoted a contaminated-blood widow and a Leveson witness; also Edward Heath — famously unmarried — "mentioning his wife" while quoting an unemployed constituent.) - **Bereavement and abuse contexts**: windows containing died/widow/ funeral/grief etc., and grooming/exploitation contexts, are excluded from romance regardless of phrasing. - Rule-flagged 'review' rows (5,308) are counted in the published "cleaned" column but NOT in the strict headline counts. ## Fairness caveats 1. **Per-year rates are suppressed** (shown †) where more than 20% of a person's rows fall outside their ParlParse-recorded service — chiefly PMs who spoke from the Lords before 1999 (e.g. Lord Salisbury: 48 laughs, no fair denominator). 2. **Era bias in laughter transcription**: Victorian Hansard logged "[Laughter.]" enthusiastically and at multiple points per speech; the modern record is sparser. Cross-era comparisons flatter the 1890s; within-era comparisons (e.g. cabinet colleagues) are safe. 3. Pre-1909 Hansard is not verbatim; historic counts are floors. 4. Namesake risk in 19th-century name matching persists (three Sir Robert Peels); no top-20 result depends on an ambiguous era. 5. PMQs attributions ("The Prime Minister") begin appearing consistently in the modern record; historic PMs are mostly matched by name. 6. The gender split covers the 23 cabinet members only (12 women, 11 men — the first female-majority cabinet), normalised per 100 years of combined service. ## Reproducibility Pipeline at /home/claude/kingofhearts: sweep_charm.py → classify_charm.py → resolve_charm.py (+ mnis fallback) → analyze_charm.py → build_data.py. All API responses cached; re-runnable as the cabinet changes. Outputs: pm_leaderboard.csv, cabinet_charm.csv, gender_split.csv, quote_candidates.md. Licences: Open Parliament Licence v3.0 (quotes), CC BY 3.0 © UK Parliament (portraits), CC0 (Wikidata), ParlParse (public data). Total external requests for the entire audit: ~700.