Director's Chair: open from a saved report, curated lists aren't franchises
Scores every mode in one pass with cached text vectors, keeps the report on the box and refreshes it in the background each hour, and changes mode when a chip is selected rather than focused. The library's collections are curated lists (Trending, IMDB Top 250, streamers), so only '... Collection' sets link franchises; broadcaster lists (BBC, Channel 4, ITV, Sky, BritBox) count as verified British origin. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,8 +52,8 @@ class DirectorChairTest {
|
||||
val spinoff = line("c5", "Inspector Show: New York", "Series", listOf("Crime", "Drama"), "A new team.")
|
||||
val docOfIt = line("c6", "Inside Inspector Show", "Series", listOf("Documentary"), "The making of the show.")
|
||||
val (ev, sets) = files(listOf(spinoff, docOfIt), listOf(JSONObject().put("id", "b1").put("name", "Inspector Show Collection").put("members", JSONArray(listOf("e1", "c5", "c6")))))
|
||||
val (links, count) = franchiseLinks(sets, pools)
|
||||
assertEquals(1, count)
|
||||
val (links, count, franchises) = franchiseLinks(sets, pools)
|
||||
assertEquals(1, count); assertEquals(1, franchises)
|
||||
assertEquals(setOf(107), links.channels("c5"))
|
||||
assertNull(links.channels("unlisted")) // unknown, never guessed from the title
|
||||
val evidence = (channelTitles + listOf(spinoff, docOfIt)).associate { it.getString("id") to TitleEvidence.of(it) }
|
||||
@@ -79,8 +79,25 @@ class DirectorChairTest {
|
||||
assertTrue(channelScore(evidence.getValue("l"), Briefs.first { it.number == 107 }, text).first < .35)
|
||||
}
|
||||
|
||||
@Test fun curatedListsAreNotFranchisesButBroadcasterListsVerifyBritishOrigin() {
|
||||
// The library's collections are mostly curated lists: being on IMDB Top 250 or Netflix together links nothing.
|
||||
val a = line("c7", "Gangland", "Movie", listOf("Crime"), "A London gangster plans one last heist.")
|
||||
val (ev, sets) = files(listOf(a), listOf(
|
||||
JSONObject().put("id", "b2").put("name", "IMDB Top 250").put("members", JSONArray(listOf("e1", "c7"))),
|
||||
JSONObject().put("id", "b3").put("name", "Netflix Movies").put("members", JSONArray(listOf("e1", "c7"))),
|
||||
JSONObject().put("id", "b4").put("name", "BBC - Shows").put("members", JSONArray(listOf("c7")))))
|
||||
val (links, count, franchises) = franchiseLinks(sets, pools)
|
||||
assertEquals(3, count); assertEquals(0, franchises)
|
||||
assertNull(links.channels("c7")); assertNull(links.collection("c7"))
|
||||
assertEquals("BBC - Shows", links.britishList("c7"))
|
||||
val evidence = mapOf("c7" to TitleEvidence.of(a))
|
||||
val britx = channelScore(evidence.getValue("c7"), Briefs.first { it.number == 309 }, ChannelText(emptyMap(), evidence), links)
|
||||
assertTrue(britx.first > 0); assertTrue(britx.second.any { "BBC - Shows" in it })
|
||||
assertTrue(ev.exists())
|
||||
}
|
||||
|
||||
@Test fun aReportReadsBackAsItWasSaved() {
|
||||
val r = DeskReport(10, 2, 9, 1, listOf("Terra" to 1), 1, listOf(DeskPick("A", "Terra", "STRONG MATCH", "Line")), listOf(DeskAsk("B", "Sci-Fi", "Horror")), 0, false, 5, 6)
|
||||
val r = DeskReport(10, 2, 9, 1, listOf("Terra" to 1), 1, listOf(DeskPick("A", "Terra", "STRONG MATCH", "Line")), listOf(DeskAsk("B", "Sci-Fi", "Horror")), 0, false, 0, 5, 6)
|
||||
val back = DeskReport.of(r.toJson())
|
||||
assertEquals(r.picks.single().title, back.picks.single().title); assertEquals("Horror", back.asks.single().second); assertFalse(back.catalogueComplete); assertEquals(1, back.unread)
|
||||
assertEquals("A detective returns home.", sentence("A detective returns home. Then more happens."))
|
||||
|
||||
Reference in New Issue
Block a user