Director's Chair: eligibility before suitability for films
Paul, 30 November 2026 (166-film sample): a film must be eligible for a channel before it is scored. Wonder TV takes TV movies only; Vortex no superhero films (Heroes' territory); Wonder's live action must be family storytelling; no ambient or screensaver features; SYNDICATE needs organised crime at the heart of an action, comedy or romance film. Paul's sample verdicts added to ChairFilmExamplesTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -328,23 +328,9 @@ internal fun channelScore(e: TitleEvidence, b: Brief, text: ChannelText, links:
|
||||
if (ch == 101 && rating in Adult) return 0.0 to listOf("rated $rating, too old for Orbit 1")
|
||||
if (ch == 601 && rating in PreschoolRatings) return 0.0 to listOf("rated $rating, a preschool show")
|
||||
if (ch == PUNCHLINE_NUMBER && "Horror" in g) return 0.0 to listOf("a horror film: After Dark's, not PUNCHLINE's")
|
||||
// What kind of film it is, not only its tags (Paul, 30 November 2026, the film discovery): a secondary genre tag doesn't
|
||||
// make a film the channel's. Each rule says which heavier genre outweighs the channel's own.
|
||||
if (b.kinds == setOf("Movie") || ch in setOf(SYNDICATE_NUMBER, ATLAS_NUMBER, 601)) {
|
||||
val comedyWords = Regex("\\b(comedy|comedian|spoof|parody|slapstick|stand-up|farce|hilarious|zany|madcap)", RegexOption.IGNORE_CASE).containsMatchIn(ov)
|
||||
if (ch == PUNCHLINE_NUMBER && (g intersect setOf("Drama", "Crime", "Biography", "Action", "Thriller", "War")).isNotEmpty() && !comedyWords && !LiveSpecial.containsMatchIn(ov))
|
||||
return 0.0 to listOf("comedy is a secondary tag here: ${(g intersect setOf("Drama", "Crime", "Biography", "Action", "Thriller", "War")).joinToString()} carries the film")
|
||||
if (ch == 307 && (g intersect setOf("Biography", "Sport", "War", "Action", "Crime", "History")).isNotEmpty())
|
||||
return 0.0 to listOf("romance is a secondary tag here: ${(g intersect setOf("Biography", "Sport", "War", "Action", "Crime", "History")).joinToString()} carries the film")
|
||||
if (ch == CHRISTMAS_NUMBER && (g intersect setOf("Action", "Thriller", "Horror", "Crime", "War")).isNotEmpty())
|
||||
return 0.0 to listOf("set at Christmas, but ${(g intersect setOf("Action", "Thriller", "Horror", "Crime", "War")).joinToString()}: not festive family viewing")
|
||||
if (ch == SYNDICATE_NUMBER && (g intersect setOf("Action", "Adventure")).isNotEmpty() && b.themes.findAll(all).count() < 2)
|
||||
return 0.0 to listOf("an action film with a criminal in it, not organised crime")
|
||||
if (ch == 601 && "Action" !in g && "Anime" !in g) return 0.0 to listOf("animation without action: PixelZ's or Wonder's, not Vortex's")
|
||||
if (ch == 601 && PixelzStudio.containsMatchIn(e.studios.orEmpty().joinToString(" "))) return 0.0 to listOf("a PixelZ studio's film")
|
||||
if (ch == 301 && e.community != null && e.community < 6.5) return 0.0 to listOf("not an event film: its viewers rate it ${e.community}")
|
||||
if (ch == 309 && "Crime" !in g && !b.themes.containsMatchIn(all)) return 0.0 to listOf("British, but not crime or gritty drama")
|
||||
}
|
||||
// Eligibility before suitability (Paul, 30 November 2026): whether a film may be considered for a channel at all, by its
|
||||
// format, origin, animation style, audience and primary genre. Only an eligible film is then scored for how it fits.
|
||||
if ("Movie" in b.kinds && e.type == "Movie") filmIneligible(e, b, g, ov, all)?.let { return 0.0 to listOf(it) }
|
||||
if (ch == ATLAS_NUMBER && !international(e)) return 0.0 to listOf(if (e.countries.isNullOrEmpty()) "country of origin not known" else "made in the English-speaking world")
|
||||
val countries = e.countries.orEmpty().joinToString(" "); val studios = e.studios.orEmpty().joinToString(" ")
|
||||
val british = Uk.containsMatchIn(countries) || UkStudio.containsMatchIn(studios) || links.britishList(e.id) != null
|
||||
@@ -397,3 +383,46 @@ internal fun placeTitle(e: TitleEvidence, text: ChannelText, links: FranchiseLin
|
||||
}
|
||||
|
||||
internal fun closeEnough(a: Double, b: Double) = abs(a - b) < 1e-6
|
||||
|
||||
/** The heavier genres that outweigh a channel's own when a film is tagged with both. */
|
||||
private val OutweighComedy = setOf("Drama", "Crime", "Biography", "Action", "Thriller", "War")
|
||||
private val OutweighRomance = setOf("Biography", "Sport", "War", "Action", "Crime", "History")
|
||||
private val OutweighChristmas = setOf("Action", "Thriller", "Horror", "Crime", "War")
|
||||
private val ComedyWords = Regex("\\b(comedy|comedian|spoof|parody|slapstick|stand-up|farce|hilarious|zany|madcap)", RegexOption.IGNORE_CASE)
|
||||
/** Organised crime, as SYNDICATE means it: a heist alone isn't. */
|
||||
private val OrganisedCrime = Regex("\\b(mob|mobster|mafia|cartel|syndicate|gangster|crime family|triad|yakuza|kingpin|underworld|crime boss|drug lord)", RegexOption.IGNORE_CASE)
|
||||
/** Superheroes: Heroes' territory, never Vortex's. */
|
||||
private val Superhero = Regex("\\b(superhero|super hero|batman|superman|justice league|green lantern|spider-man|x-men|avengers|wonder woman|the flash|aquaman|teen titans|marvel|dc comics)", RegexOption.IGNORE_CASE)
|
||||
private val SuperheroStudio = Regex("dc entertainment|dc comics|marvel|warner bros\\. animation", RegexOption.IGNORE_CASE)
|
||||
/** Television studios: a film from one of these is a TV movie. */
|
||||
private val TvMovieStudio = Regex("disney channel|disney channels worldwide|disney branded television|walt disney television|nickelodeon productions|it's a laugh|disney television", RegexOption.IGNORE_CASE)
|
||||
/** Not a feature at all: ambient loops and screensavers. */
|
||||
private val NotAFeature = Regex("\\b(reef cam|ambient|screensaver|fireplace|relaxing scenes|virtual aquarium)", RegexOption.IGNORE_CASE)
|
||||
|
||||
/**
|
||||
* Why a film can't be considered for [b] at all, or null when it can (Paul, 30 November 2026, the film discovery review).
|
||||
* These are boundaries, not weights: format, origin, animation style, audience and primary genre.
|
||||
*/
|
||||
private fun filmIneligible(e: TitleEvidence, b: Brief, g: Set<String>, ov: String, all: String): String? {
|
||||
val ch = b.number
|
||||
val studios = e.studios.orEmpty().joinToString(" ")
|
||||
if (NotAFeature.containsMatchIn(all)) return "not a feature film (ambient or screensaver)"
|
||||
if (ch == WONDER_TV_NUMBER && "TV Movie" !in g && !TvMovieStudio.containsMatchIn(studios)) return "a cinema release, not a TV movie: Wonder TV is television"
|
||||
if (ch == 612 && "Animation" !in g && ("Family" !in g || (g intersect setOf("Fantasy", "Music", "Musical", "Adventure", "Comedy")).isEmpty()))
|
||||
return "live action that isn't family storytelling: not Wonder's storybook"
|
||||
if (ch == 601 && (Superhero.containsMatchIn(all) || SuperheroStudio.containsMatchIn(studios))) return "a superhero film: Heroes' territory, not Vortex's"
|
||||
if (ch == 601 && "Action" !in g && "Anime" !in g) return "animation without action: PixelZ's or Wonder's, not Vortex's"
|
||||
if (ch == 601 && PixelzStudio.containsMatchIn(studios)) return "a PixelZ studio's film"
|
||||
if (ch == PUNCHLINE_NUMBER && (g intersect OutweighComedy).isNotEmpty() && !ComedyWords.containsMatchIn(ov) && !LiveSpecial.containsMatchIn(ov))
|
||||
return "comedy is a secondary tag here: ${(g intersect OutweighComedy).joinToString()} carries the film"
|
||||
if (ch == 307 && (g intersect OutweighRomance).isNotEmpty()) return "romance is a secondary tag here: ${(g intersect OutweighRomance).joinToString()} carries the film"
|
||||
if (ch == CHRISTMAS_NUMBER && (g intersect OutweighChristmas).isNotEmpty()) return "set at Christmas, but ${(g intersect OutweighChristmas).joinToString()}: not festive family viewing"
|
||||
// An action film needs organised crime at its heart (two signs of it, Fast X has one kingpin); a comedy or romance needs one.
|
||||
val mob = OrganisedCrime.findAll(all).map { it.value.lowercase() }.toSet().size
|
||||
val lighter = g intersect setOf("Action", "Adventure", "Comedy", "Romance")
|
||||
if (ch == SYNDICATE_NUMBER && lighter.isNotEmpty() && mob < (if ((lighter intersect setOf("Action", "Adventure")).isNotEmpty()) 2 else 1))
|
||||
return "not organised crime: ${lighter.joinToString()} with a crime in it"
|
||||
if (ch == 301 && e.community != null && e.community < 6.5) return "not an event film: its viewers rate it ${e.community}"
|
||||
if (ch == 309 && "Crime" !in g && !b.themes.containsMatchIn(all)) return "British, but not crime or gritty drama"
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -20,7 +20,11 @@ class ChairFilmExamplesTest {
|
||||
"Superman III" to 309, "Superman II" to 309, "Rye Lane" to 309, "Fast X" to SYNDICATE_NUMBER, "A Shaun the Sheep Movie: Farmageddon" to 601,
|
||||
"Megamind vs. The Doom Syndicate" to SYNDICATE_NUMBER, "Three Billboards Outside Ebbing, Missouri" to PUNCHLINE_NUMBER,
|
||||
"Are You There God? It's Me, Margaret." to PUNCHLINE_NUMBER, "Tucker: The Man and His Dream" to PUNCHLINE_NUMBER, "Charlie's Angels" to PUNCHLINE_NUMBER,
|
||||
"Silent Night" to CHRISTMAS_NUMBER, "Cinderella Man" to 307, "Superman IV: The Quest for Peace" to 301)
|
||||
"Silent Night" to CHRISTMAS_NUMBER, "Cinderella Man" to 307, "Superman IV: The Quest for Peace" to 301,
|
||||
// The 166-film sample (30 November 2026): not TV movies on Wonder TV; superheroes off Vortex; no sword and sorcery on Wonder.
|
||||
"Cats" to WONDER_TV_NUMBER, "Teenage Mutant Ninja Turtles" to WONDER_TV_NUMBER, "A Dog's Way Home" to WONDER_TV_NUMBER,
|
||||
"Green Lantern: Beware My Power" to 601, "Justice League: Warworld" to 601, "Jingle Bell Heist" to SYNDICATE_NUMBER,
|
||||
"Conan the Destroyer" to 612, "Dory's Reef Cam" to 613)
|
||||
private val must = listOf(
|
||||
"Cemetery Man" to 305, "Tales from the Darkside: The Movie" to 305, "Circus of Horrors" to 305, "Gunfight at the O.K. Corral" to OUTLAW_NUMBER,
|
||||
"A Christmas Story" to CHRISTMAS_NUMBER, "KPop Demon Hunters" to 601, "Peaky Blinders: The Immortal Man" to SYNDICATE_NUMBER)
|
||||
|
||||
@@ -19,3 +19,11 @@
|
||||
{"id": "5438910", "type": "Movie", "name": "Megamind vs. The Doom Syndicate", "year": 2024, "overview": "Megamind's former villain team, The Doom Syndicate, has returned. Newly crowned hero Megamind's must now keep up evil appearances until he can assemble his friends to stop his former evil teammates from launching Metro City to the...", "genres": ["Animation", "Action", "Adventure"], "studios": ["DreamWorks Animation Television"], "rating": "TV-G", "community": 2.5, "taglines": ["Act like a villain, think like a hero."], "countries": ["United States of America"]}
|
||||
{"id": "5437297", "type": "Movie", "name": "A Shaun the Sheep Movie: Farmageddon", "year": 2019, "overview": "When an alien with amazing powers crash-lands near Mossy Bottom Farm, Shaun the Sheep goes on a mission to shepherd the intergalactic visitor home before a sinister organization can capture her.", "genres": ["Animation", "Adventure", "Comedy"], "studios": ["Netflix"], "rating": "G", "community": 6.8, "taglines": ["Close encounters of the furred kind."], "countries": ["France", "United Kingdom"]}
|
||||
{"id": "5439643", "type": "Movie", "name": "Silent Night", "year": 2023, "overview": "A grieving father enacts his long-awaited revenge against a ruthless gang on Christmas Eve.", "genres": ["Action", "Crime", "Drama"], "studios": ["Thunder Road", "Capstone Group", "A Better Tomorrow Films", "Lionsgate"], "rating": "R", "community": 5.3, "taglines": ["Action speaks louder than words."], "countries": ["United States of America"]}
|
||||
{"id": "5438071", "type": "Movie", "name": "Conan the Destroyer", "year": 1984, "overview": "Conan leads a ragtag group of adventurers on a quest for a princess.", "genres": ["Action", "Adventure", "Fantasy"], "studios": ["Universal Pictures"], "rating": "PG", "community": 5.9, "taglines": ["The most powerful legend of all is back in a new adventure."], "countries": ["United States of America"]}
|
||||
{"id": "5475786", "type": "Movie", "name": "Teenage Mutant Ninja Turtles", "year": 1990, "overview": "A quartet of humanoid turtles, trained by their mentor in ninjitsu, must learn to work together to face the menace of Shredder and the Foot Clan.", "genres": ["Science Fiction", "Action", "Adventure", "Comedy", "Family"], "studios": ["Orange Sky Golden Harvest"], "rating": "PG", "community": 6.8, "taglines": ["Hey dude, this is NO cartoon."], "countries": ["Hong Kong", "United States of America"]}
|
||||
{"id": "5599778", "type": "Movie", "name": "Jingle Bell Heist", "year": 2025, "overview": "Two down-on-their-luck hourly workers team up to rob a posh London department store on Christmas Eve. Will they steal each other's hearts along the way?", "genres": ["Romance", "Crime", "Comedy"], "studios": ["ACE Entertainment"], "rating": "PG-13", "community": 5.8, "taglines": ["'Tis the season to give. And take."], "countries": ["United States of America", "United Kingdom"]}
|
||||
{"id": "5587228", "type": "Movie", "name": "Justice League: Warworld", "year": 2023, "overview": "Until now, the Justice League has been a loose association of superpowered individuals. But when they are swept away to Warworld, a place of unending brutal gladiatorial combat, Batman, Superman, Wonder Woman and the others must somehow unite to form an unbeatable resistance able to lead an entire planet to freedom.", "genres": ["Animation", "Action", "Science Fiction", "Adventure"], "studios": ["Warner Bros. Animation"], "rating": "R", "community": 5.3, "taglines": ["Three heroes. Three worlds. One salvation."], "countries": ["United States of America"]}
|
||||
{"id": "5585769", "type": "Movie", "name": "Green Lantern: Beware My Power", "year": 2022, "overview": "Recently discharged Marine sniper John Stewart is at a crossroads in his life, one which is only complicated by receiving an extraterrestrial ring which grants him the powers of the Green Lantern of Earth. Unfortunately, the ring doesn't come with instructions - but it does come with baggage, like a horde of interplanetary killers bent on eliminating every Green Lantern in the universe. Now, with the aid of the light-hearted Green Arrow, Adam Strange and Hawkgirl, this reluctant soldier must journey into the heart of a galactic Rann/Thanagar war and somehow succeed where all other Green Lanterns have failed.", "genres": ["Animation", "Science Fiction", "Action"], "studios": ["Warner Bros. Animation"], "rating": "PG-13", "community": 6.2, "taglines": ["Soldier. Lantern. Hero."], "countries": ["United States of America"]}
|
||||
{"id": "5589256", "type": "Movie", "name": "Dory's Reef Cam", "year": 2020, "overview": "Dive into the waters below and watch the aquatic wildlife from the world of Nemo and Dory.", "genres": ["Family", "Animation", "Comedy", "Adventure"], "studios": ["Pixar"], "rating": "G", "community": 3.8, "taglines": null, "countries": ["United States of America"]}
|
||||
{"id": "5438402", "type": "Movie", "name": "A Dog's Way Home", "year": 2019, "overview": "A female dog travels four hundred miles in search of her owner throughout a Colorado wilderness.", "genres": ["Adventure", "Drama", "Family"], "studios": ["Columbia Pictures"], "rating": "PG", "community": 6.7, "taglines": ["A lot can happen between lost and found."], "countries": ["China", "United States of America"]}
|
||||
{"id": "5439495", "type": "Movie", "name": "Cats", "year": 2019, "overview": "A tribe of cats called the Jellicles must decide yearly which one will ascend to the Heaviside Layer and come back to a new Jellicle life.", "genres": ["Comedy", "Drama", "Family"], "studios": ["Universal Pictures"], "rating": "PG", "community": 2.8, "taglines": ["You will believe."], "countries": ["China", "United Kingdom", "United States of America"]}
|
||||
|
||||
Reference in New Issue
Block a user