From 67de14995304c0ff4af0ce11ac80940c0d029bbe Mon Sep 17 00:00:00 2001 From: alistairjcbrown <635903+alistairjcbrown@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:58:03 +0000 Subject: [PATCH] Update title normalization test --- common/known-removable-phrases.js | 3 + common/normalize-title.js | 3 + common/tests/test-titles.json | 156 ++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) diff --git a/common/known-removable-phrases.js b/common/known-removable-phrases.js index da53c21..6f80fdc 100644 --- a/common/known-removable-phrases.js +++ b/common/known-removable-phrases.js @@ -371,6 +371,7 @@ const knownRemovablePhrases = [ "AWAN x Fhamtini:", "Awards Lunch:", "Babykino:", + "BAFTA 2026 Best Picture Winner:", "Black to the Beginning-", "Bar Screening x Muse:", "BAR TRASH Positive East Fundraiser:", @@ -500,6 +501,7 @@ const knownRemovablePhrases = [ "Early fan screening", "EOS:", "Electric Scream!:", + "Electric Scream! ", "Escapes:", "Everyman Barnet's 90th Anniversary:", "Everyman in Therapy:", @@ -787,6 +789,7 @@ const knownRemovablePhrases = [ "Soundtracking:", "Spielberg at 80:", "Spike Lee’s", + "St Patrick's Day:", "Staff Pick:", ": Staff Picks!", "Stephanie Rothman:", diff --git a/common/normalize-title.js b/common/normalize-title.js index e169b41..4f938d5 100644 --- a/common/normalize-title.js +++ b/common/normalize-title.js @@ -199,6 +199,7 @@ function normalizeTitle(title, options) { "Evangelion: Death (True)² + The End of Evangelion", "Neon Genesis Evangelion: Death (True)² & The End of Evangelion", ], + ["We Live Here + Chornobyl 22", "We Live Here & Chornobyl 22"], ["Terror Dome", "Terrordome"], ["Wu Viet", "Woo Viet"], ["The Adventures of Tintin: ", "Tintin and "], @@ -551,6 +552,7 @@ function normalizeTitle(title, options) { "Looney tunes: The day the world blew up", "Looney tunes: The day the earth blew up", ], + ["Looney tunes - ", "Looney tunes: "], [ /(The Scarecrows' Wedding)\s*\+\s*(The Smeds (and|&) the Smoos)/i, "$1 & $2", @@ -582,6 +584,7 @@ function normalizeTitle(title, options) { [/ in \w+: live(?: viewing)?$/i, ""], [/Fri-GAY/i, "Friday"], ["If I Had Legs I Would Kick You", "If I Had Legs I'd Kick You"], + [/: One Battle$/i, ": One Battle After Another"], ]; corrections.forEach(([phrase, replacement]) => { diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 08a41aa..8124229 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -56106,5 +56106,161 @@ { "input": "BTS WORLD TOUR ‘ARIRANG’ IN GOYANG: LIVE VIEWING", "output": "bts world tour arirang" + }, + { + "input": "4pm Screening: Mamma Mia", + "output": "mamma mia" + }, + { + "input": "6:30pm Screening: Freaky Friday", + "output": "freaky friday" + }, + { + "input": "Cold War Visions: We Live Here + Chornobyl 22", + "output": "we live here chornobyl 22" + }, + { + "input": "Future on Film Holiday Workshop", + "output": "future on film holiday workshop" + }, + { + "input": "BAFTA 2026 Best Picture Winner: One Battle", + "output": "one battle after another" + }, + { + "input": "Looney Tunes - The Day The Earth Blew Up", + "output": "looney tunes the day the earth blew up" + }, + { + "input": "Marnie", + "output": "marnie" + }, + { + "input": "Quartermaine's Terms", + "output": "quartermaines terms" + }, + { + "input": "The Lodger + Live Score by Hugo Max", + "output": "the lodger" + }, + { + "input": "They Never Slept", + "output": "they never slept" + }, + { + "input": "Two Sundays & Plaintiffs and Defendants", + "output": "two sundays plaintiffs defendants" + }, + { + "input": "The Hannah Montana Movie Bottomless Brunch Party!", + "output": "hannah montana movie" + }, + { + "input": "The Liberated Film Club: Dr. Sophie Sleigh-Johnson", + "output": "dr sophie sleighjohnson" + }, + { + "input": "MADE IN DAGENHAM", + "output": "made in dagenham" + }, + { + "input": "Electric Scream! My Father's Shadow", + "output": "my fathers shadow" + }, + { + "input": "Electric Scream! Peaky Blinders", + "output": "peaky blinders the immortal man" + }, + { + "input": "Electric Scream! The Secret Agent", + "output": "secret agent" + }, + { + "input": "Electric Scream! Wuthering Heights", + "output": "wuthering heights" + }, + { + "input": "Beyond: If I Had Legs I'd Kick You", + "output": "if i had legs id kick you" + }, + { + "input": "Screening + Q&A: Palestine Action, the Truth Behind the Ban", + "output": "palestine action the truth behind the ban" + }, + { + "input": "UK PREMIERE Gangsterism", + "output": "gangsterism" + }, + { + "input": "American Beauty - Oscar Icons", + "output": "american beauty" + }, + { + "input": "Braveheart - Oscar Icons", + "output": "braveheart" + }, + { + "input": "Forrest Gump - Oscar Icons", + "output": "forrest gump" + }, + { + "input": "La La Land - Oscar Icons", + "output": "la la land" + }, + { + "input": "The Godfather - Oscar Icons", + "output": "the godfather" + }, + { + "input": "The Godfather Part II - Oscar Icons", + "output": "godfather part ii" + }, + { + "input": "The Silence of the Lambs - Oscar Icons", + "output": "silence of the lambs" + }, + { + "input": "It Was Just an Accident + Live Panel Discussion", + "output": "it was just an accident" + }, + { + "input": "One Last Deal + Danny Dyer Q&A", + "output": "one last deal" + }, + { + "input": "Drink & Dine: The Princess Bride - Quote-Along", + "output": "princess bride" + }, + { + "input": "Akira", + "output": "akira" + }, + { + "input": "His Girl Friday + Live Organ", + "output": "his girl friday" + }, + { + "input": "ICI London and CinemaItaliaUK Special Screening of Damned If You Do, Damned If You Don't", + "output": "damned if you do damned if you dont" + }, + { + "input": "The Awful Truth", + "output": "awful truth" + }, + { + "input": "Doc'n Roll x Rio: A CENTURY IN SOUND + Q&A", + "output": "a century in sound" + }, + { + "input": "Pink Palace: Wakefield Poole’s Bijou + Intro", + "output": "wakefield pooles bijou" + }, + { + "input": "St Patrick's Day: Handsome Devil", + "output": "handsome devil" + }, + { + "input": "Grounded: A climate justice film screening and conversation", + "output": "a climate justice conversation" } ]