From 39fb46544722125cd50ec65167e731a1bec07f8a Mon Sep 17 00:00:00 2001 From: alistairjcbrown <635903+alistairjcbrown@users.noreply.github.com> Date: Thu, 21 May 2026 19:44:42 +0000 Subject: [PATCH] Update title normalization test --- common/known-removable-phrases.js | 5 + common/normalize-title.js | 4 + common/tests/test-titles.json | 180 ++++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+) diff --git a/common/known-removable-phrases.js b/common/known-removable-phrases.js index ac2cdb71..4902345e 100644 --- a/common/known-removable-phrases.js +++ b/common/known-removable-phrases.js @@ -23,6 +23,7 @@ */ const knownRemovablePhrases = [ // Suffixes + "Nolan in 35mm:", "[16mm]", "[35mm]", "on 16mm film", @@ -312,6 +313,7 @@ const knownRemovablePhrases = [ "with Steve Zissou", "with wine tasting", "with Molly Miles", + "with Illustrated Lecture!", "with Live Acoustic Guitar & Introduction", "with Live Performance", "with Loose Willis & Maxim Melton", @@ -583,6 +585,7 @@ const knownRemovablePhrases = [ "Classic Movies:", "Classic Movies :", "Classics Night", + "Classic Night:", "CLUB ROOM:", "CLUB ROOM x MUSE:", "Concession:", @@ -1041,6 +1044,7 @@ const knownRemovablePhrases = [ "Vladimir Pogacic's", "Wallace & Gromit in ", "Wallace & Gromit :", + "Weird Wednesday:", "Windrush Caribbean Film Festival 2025:", "Work in Progress:", "Women's Only Event:", @@ -1105,6 +1109,7 @@ const knownRemovablePhrases = [ "14 February 8:30pm:", "× MILKTEA Post-Screening Creative Workshop", "Thanga Natchathiram", + " & Gathering", // Common superfluous pieces "** SCREENING CANCELLED **", diff --git a/common/normalize-title.js b/common/normalize-title.js index 49343c35..4d5d74a8 100644 --- a/common/normalize-title.js +++ b/common/normalize-title.js @@ -720,13 +720,17 @@ function normalizeTitle(title, options) { ["Andre Rieu - ", "Andre Rieu: "], ["Andre Rieu: Summer 2026:", "Andre Rieu's 2026 Summer Concert:"], [" + UK Premiere: Replikka", " + Replikka"], + [" + Iggy Pop – Lust for life", " & Lust for life"], [ /Bluey At The Cinema - Playdates$/i, "Bluey At The Cinema: Playdates with Friends", ], ["A Night of Latin Jazz - ", "A Night of Latin Jazz: "], + ["Classic Night - ", "Classic Night: "], + ["Weird Wednesday - ", "Weird Wednesday: "], ["The Life + Legacy", "The Life and Legacy"], [" - Oggi", ": Oggi"], + [" x metropolis", " metropolis"], // Variant families collapsed from known-removable-phrases.js // Each pattern covers multiple near-identical string entries that shared a common structure [/dog[- ]?friendly(?:\s+screening)?[:\s]*/i, ""], diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 6fda4b43..f5e11c89 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -72118,5 +72118,185 @@ { "input": "The Bench x Haft Cinema: Hope Faces Defeat and Invents Possibility", "output": "hope faces defeat invents possibility" + }, + { + "input": "CARERS & BABIES: POWER BALLAD", + "output": "power ballad" + }, + { + "input": "HEN", + "output": "hen" + }, + { + "input": "Leonora In The Morning Light", + "output": "leonora in the morning light" + }, + { + "input": "LIFE SUPPORT + LIVE Q&A", + "output": "life support" + }, + { + "input": "Symposium: Audio-visual Media and the Global Dream Space", + "output": "symposium audiovisual media the global dream space" + }, + { + "input": "Burning Skies: Short Film Showcase + Earth Set Panel", + "output": "burning skies short film showcase" + }, + { + "input": "Classic NIght - A Trip to the Moon (1902) x Metropolis (1927)", + "output": "a trip to the moon (1902) metropolis (1927)" + }, + { + "input": "Weird Wednesday - Being John Malkovich (1999)", + "output": "being john malkovich (1999)" + }, + { + "input": "TRANSMISSIONS PRESENTS Twin Peaks: Fire Walk With Me", + "output": "twin peaks fire walk with me" + }, + { + "input": "Beyond: Kokuho", + "output": "kokuho" + }, + { + "input": "Throwback: Dunkirk", + "output": "dunkirk" + }, + { + "input": "Throwback: The Dark Knight Rises", + "output": "dark knight rises" + }, + { + "input": "Toddler Club: Arco", + "output": "arco" + }, + { + "input": "Toddler Club: Cloudy With A Chance of Meatballs", + "output": "cloudy with a chance of meatballs" + }, + { + "input": "Toddler Club: Madagascar", + "output": "madagascar" + }, + { + "input": "Toddler Club: The Super Mario Galaxy Movie", + "output": "super mario galaxy movie" + }, + { + "input": "Toddler Club: Zog + The Gruffalo", + "output": "zog the gruffalo" + }, + { + "input": "Nolan in 35mm: Batman Begins", + "output": "batman begins" + }, + { + "input": "Nolan in 35mm: Dunkirk", + "output": "dunkirk" + }, + { + "input": "Nolan in 35mm: Inception", + "output": "inception" + }, + { + "input": "Nolan in 35mm: Interstellar", + "output": "interstellar" + }, + { + "input": "Nolan in 35mm: Tenet", + "output": "tenet" + }, + { + "input": "Nolan in 35mm: The Dark Knight", + "output": "dark knight" + }, + { + "input": "Nolan in 35mm: The Dark Knight Rises", + "output": "dark knight rises" + }, + { + "input": "Nolan in 35mm: The Prestige", + "output": "the prestige" + }, + { + "input": "Royal Ascot Afternoon Tea at Waters Edge", + "output": "royal ascot afternoon tea at waters edge" + }, + { + "input": "Aliens Presented by the Cult Classic Collective", + "output": "aliens" + }, + { + "input": "Bar Trash: MATINEE (1993) with Illustrated Lecture!", + "output": "matinee (1993)" + }, + { + "input": "Voidance + Q&A Presented by The Filmmakers Podcast", + "output": "voidance" + }, + { + "input": "The Magic City: Birmingham according to Sun Ra + Q&A", + "output": "magic city birmingham according to sun ra" + }, + { + "input": "Karuppu Uncut (Tamil)", + "output": "karuppu" + }, + { + "input": "Art is my Therapy - community workshop", + "output": "art is my therapy" + }, + { + "input": "Angel's Egg", + "output": "angels egg" + }, + { + "input": "Swallow Film Screening & Gathering", + "output": "swallow" + }, + { + "input": "7 DAYS IN MAY + Intro", + "output": "7 days in may" + }, + { + "input": "TV Party, Tonight presents: ENO (1973) + Iggy Pop – Lust for life (1986)", + "output": "eno (1973) lust for life (1986)" + }, + { + "input": "TV PARTY, TONIGHT! Dogme 95", + "output": "tv party tonight dogme 95" + }, + { + "input": "Dress-Up Preview: Lesbian Space Princess", + "output": "lesbian space princess" + }, + { + "input": "Fist Club x The Castle: Bottoms", + "output": "bottoms" + }, + { + "input": "Kiki + in-conversation", + "output": "kiki" + }, + { + "input": "The Matrix: Reloaded + DJ set", + "output": "matrix reloaded" + }, + { + "input": "A Sad and Beautiful World + Q&A", + "output": "a sad beautiful world" + }, + { + "input": "London Animation Club presents ARCHIVES, COLLAGE AND CHAOS: the films of Joan Ashworth and Laurie Hi", + "output": "archives collage chaos the films of joan ashworth laurie hi" + }, + { + "input": "Home Front/Front Line + Q&A", + "output": "home front/front line" + }, + { + "input": "Cinema Club : Shrek", + "output": "shrek" } ]