From f4c9a1bcac00fb936a26cb50e11b9aabf7f24cfa Mon Sep 17 00:00:00 2001 From: alistairjcbrown <635903+alistairjcbrown@users.noreply.github.com> Date: Thu, 8 Oct 2026 06:36:21 +0000 Subject: [PATCH 1/2] Update title normalization test --- common/tests/test-titles.json | 92 +++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 9f5368e7..8ab3a9a7 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -101106,5 +101106,97 @@ { "input": "Strange Case of Dr Jekyll and Mr Hyde – In Concert, Live To Film", "output": "dr jekyll mr hyde" + }, + { + "input": "Rooted Out", + "output": "rooted out" + }, + { + "input": "Macabre (1958)", + "output": "macabre (1958)" + }, + { + "input": "She Devils on Wheels (1968)", + "output": "she devils on wheels (1968)" + }, + { + "input": "Marie Antoinette (20th Anniversary)", + "output": "marie antoinette" + }, + { + "input": "Pan's Labyrinth 20th Anniversary 4K Restoration", + "output": "pans labyrinth" + }, + { + "input": "Rocky (50th Anniversary 4K Restoration)", + "output": "rocky" + }, + { + "input": "V for Vendetta (20th Anniversary)", + "output": "v for vendetta" + }, + { + "input": "All White in Barking followed by Q&A with Marc Isaacs", + "output": "all white in barking" + }, + { + "input": "Lift + Calais: The Last Border followed by Q&A with Marc Isaacs", + "output": "lift" + }, + { + "input": "Synthetic Sincerity followed by Q&A with Marc Isaacs", + "output": "synthetic sincerity" + }, + { + "input": "The Filmmaker's House followed by Q&A with Marc Isaacs", + "output": "filmmakers house" + }, + { + "input": "Members' Preview: La Bola Negra", + "output": "la bola negra" + }, + { + "input": "Celebrity Traitors Finale", + "output": "celebrity traitors finale" + }, + { + "input": "The Best Summer", + "output": "best summer" + }, + { + "input": "Celebrity Traitors Finale Watch Party", + "output": "celebrity traitors finale" + }, + { + "input": "LGBTQ+ Meetup", + "output": "lgbtq+ meetup" + }, + { + "input": "LGBTQ+ Speed Dating", + "output": "lgbtq+ speed dating" + }, + { + "input": "The Ideas Open Mic", + "output": "ideas open mic" + }, + { + "input": "Restricted View: Notes on the Human Experience", + "output": "restricted view notes on the human experience" + }, + { + "input": "UK Premiere: Meeting the Buddha", + "output": "meeting the buddha" + }, + { + "input": "Relaxed-Screening: Sunset Boulevard", + "output": "relaxed- sunset boulevard" + }, + { + "input": "Raise the Red Lantern", + "output": "raise the red lantern" + }, + { + "input": "Film Africa: In a Whisper", + "output": "in a whisper" } ] From cb88d12422db03c6217403c4c7695f01108321b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 11:11:04 +0000 Subject: [PATCH 2/2] Apply review feedback to title normalisation test update - Keep the second film in "Lift + Calais: The Last Border" by spelling the double bill with an ampersand before the separator rule runs - Treat "LGBTQ+ Meetup", "LGBTQ+ Speed Dating", "The Ideas Open Mic" and "Restricted View: Notes on the Human Experience" as non-film events and drop them from the test titles - Strip "Relaxed-Screening:", ahead of "Screening:" so it doesn't leave "Relaxed-" behind Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01C8ykPkcjcxYGBrkSNkDyC5 --- common/is-non-film-event.js | 7 +++++++ common/known-removable-phrases.js | 2 ++ common/normalize-title.js | 3 +++ common/tests/test-titles.json | 20 ++------------------ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/common/is-non-film-event.js b/common/is-non-film-event.js index ac8d2081..cf5d510f 100644 --- a/common/is-non-film-event.js +++ b/common/is-non-film-event.js @@ -215,6 +215,13 @@ const nonFilmEvents = [ // A zine-making workshop, with no film attached to it. Anchored, because // the phrase could as easily be a film's own title. /^Let's Make Zines$/i, + // Social nights with no film attached to them. Anchored, because the + // phrases could as easily be a film's own title. + /^LGBTQ\+ Meetup$/i, + /^LGBTQ\+ Speed Dating$/i, + /^The Ideas Open Mic$/i, + // A talk with no film attached to it. + /^Restricted View: Notes on the Human Experience$/i, ]; const isNonFilmEvent = ({ title }) => diff --git a/common/known-removable-phrases.js b/common/known-removable-phrases.js index b1ec200c..22ffd976 100644 --- a/common/known-removable-phrases.js +++ b/common/known-removable-phrases.js @@ -1282,6 +1282,8 @@ const knownRemovablePhrases = [ "Screening+Karaoke", "Screening 流麻溝十五號放映會", "Screening at Close-Up", + // Before "Screening:", which would otherwise leave "Relaxed-" behind. + "Relaxed-Screening:", "Screening:", "ScreenTalk:", "Screening of ", diff --git a/common/normalize-title.js b/common/normalize-title.js index 35133d2d..2c5c8234 100644 --- a/common/normalize-title.js +++ b/common/normalize-title.js @@ -108,6 +108,9 @@ function normalizeTitle(title, options) { // pairing is spelled with an ampersand before that runs. ["Yellow Ribbons + ", "Yellow Ribbons & "], ["HALT BOOK LAUNCH + ", "HALT BOOK LAUNCH & "], + // A double bill billed with a plus, which the separator rule reads as a + // separator and drops the second film at. + ["Lift + Calais: The Last Border", "Lift & Calais: The Last Border"], ["HERO + My Dad, Guyana and Me", "HERO & My Dad, Guyana and Me"], ["Music with Tara Franks + ", "Music with Tara Franks & "], ["Storytelling + ", "Storytelling & "], diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 8ab3a9a7..36c9e2b4 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -101141,7 +101141,7 @@ }, { "input": "Lift + Calais: The Last Border followed by Q&A with Marc Isaacs", - "output": "lift" + "output": "lift calais the last border" }, { "input": "Synthetic Sincerity followed by Q&A with Marc Isaacs", @@ -101167,29 +101167,13 @@ "input": "Celebrity Traitors Finale Watch Party", "output": "celebrity traitors finale" }, - { - "input": "LGBTQ+ Meetup", - "output": "lgbtq+ meetup" - }, - { - "input": "LGBTQ+ Speed Dating", - "output": "lgbtq+ speed dating" - }, - { - "input": "The Ideas Open Mic", - "output": "ideas open mic" - }, - { - "input": "Restricted View: Notes on the Human Experience", - "output": "restricted view notes on the human experience" - }, { "input": "UK Premiere: Meeting the Buddha", "output": "meeting the buddha" }, { "input": "Relaxed-Screening: Sunset Boulevard", - "output": "relaxed- sunset boulevard" + "output": "sunset boulevard" }, { "input": "Raise the Red Lantern",