long-div / scripts /generate_tier1_batch02.py
ymyy307's picture
Upload folder using huggingface_hub
5b12ab1 verified
Raw History Blame Contribute Delete
26.2 kB
#!/usr/bin/env python3
"""Generate diverse Tier-1 cases 006-010 from their approved blueprints."""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
OUT = ROOT / "generated" / "tier1_batch02.json"
def p1(desc: str, line: str = "", sound: str = "Natural room tone; no music.") -> str:
text = f"integrated_multimodal_description:\n[Shot 1] {desc}"
if line:
text += f"\n\n{line}"
return text + f"\n\noverall_soundscape:\n{sound}"
def pn(defs: list[str], retained: list[int], desc: str, line: str = "", sound: str = "Natural room tone; no music.") -> str:
d = "\n".join(f"<Subject {i}> is {x}." for i, x in enumerate(defs, 1))
r = "\n".join(f"<Subject {i}>: fully_preserved - Maintain identity." for i in retained)
text = (
f"subject_definitions:\n{d}\n{{{{REFERENCE_DEFINITIONS}}}}\n\n"
f"summary:\n{{{{REFERENCE_SUMMARY}}}}\n\n"
f"retention_analysis:\n{r}\n{{{{REFERENCE_RETENTION}}}}\n\n"
f"detailed_description:\n[Shot 1] {desc}"
)
if line:
text += f"\n\n{line}"
return text + f"\n\noverall_soundscape:\n{sound}"
def sh(no: int, visible: list[str], speakers: list[str], first: list[str], dialogue: list[dict], prompt: str) -> dict:
return {"shot_no": no, "visible_characters": visible, "speakers": speakers,
"first_time_speakers": first, "dialogue": dialogue, "prompt": prompt}
def d(ch: str, text: str) -> dict:
return {"character": ch, "language": "English", "text": text}
cases = []
# 006 — bakery: n5, first1, gap1, reapp3; two post-reappearance shots.
c = {
"case_id": "diverse_t1_006", "tier": 1, "target_identity": "<char1>",
"first_appearance_shot": 1, "reappearance_shot": 3, "absence_gap": 1,
"characters": {
"<char1>": "a middle-aged Middle Eastern woman with dark curls under a cream headscarf, a terracotta baker's coat, and black trousers",
"<char2>": "a young white man with sandy hair, a pale denim apron, and a forest-green shirt",
"<char3>": "an older Black woman with a short silver natural cut, a violet raincoat, and round amber glasses",
},
}
c["shots"] = [
sh(1, ["<char1>", "<char2>"], ["<char1>"], ["<char1>"],
[d("<char1>", "I will silence the proofing timer; open the front door when the glass clears.")],
p1("In the oven aisle of a corner bakery before opening, <Subject 1>, a middle-aged Middle Eastern woman with dark curls under a cream headscarf, a terracotta baker's coat, and black trousers, carries one tray of fresh loaves past <Subject 2>, a young white man with sandy hair, a pale denim apron, and a forest-green shirt. Steam drifts from the tray as <Subject 1> sets it onto a tall cooling rack, listens to a timer beyond the back doorway, and walks into the proofing room. <Subject 2> turns toward the fogged street entrance.",
'<Subject 1> (S1) says: <d>[English] I will silence the proofing timer; open the front door when the glass clears.</d>',
"A distant timer, oven ventilation, tray rails, light street rain, and one practical voice.")),
sh(2, ["<char2>"], ["<char2>"], ["<char2>"],
[d("<char2>", "The street is visible again, so I am opening the shop now.")],
pn(["a young white man with sandy hair, a pale denim apron, and a forest-green shirt"], [1],
"A warm medium shot follows <Subject 1> around the cooling rack to the street-facing door. He wipes a small circle of condensation with his sleeve, sees the pavement beyond, turns the latch, and pulls the door inward. Cool air rolls across the floor while the loaves remain untouched on the rack.",
'<Subject 1> (S1) says: <d>[English] The street is visible again, so I am opening the shop now.</d>',
"A latch turning, the door seal releasing, quiet traffic, oven fans, and one friendly voice.")),
sh(3, ["<char1>", "<char2>"], [], [], [],
pn(["the middle-aged Middle Eastern baker with the same cream headscarf, terracotta baker's coat, and black trousers",
"the young white man with sandy hair, pale denim apron, and forest-green shirt"], [1, 2],
"<Subject 1> returns through the back doorway as <Subject 2> holds the front entrance open. Her cream headscarf and terracotta coat clearly match the first shot. She steps around the cooling rack, feels the cooler airflow with one raised hand, and gives <Subject 2> a small confirming nod as the timer falls silent.", "",
"The front door moving, softened street noise, cooling bread crackling faintly, and bakery ventilation; no speech or music.")),
sh(4, ["<char3>", "<char2>", "<char1>"], ["<char2>"], [],
[d("<char2>", "Good morning; the first loaves are cooling, and the room is open.")],
pn(["an older Black woman with a short silver natural cut, a violet raincoat, and round amber glasses",
"the young white man with sandy hair, pale denim apron, and forest-green shirt",
"the middle-aged Middle Eastern woman with a cream headscarf, terracotta baker's coat, and black trousers"], [2, 3],
"<Subject 1> enters from the wet street and pauses just inside while <Subject 2> steps aside from the doorway. <Subject 3> remains near the oven aisle, turning one cooling rack slightly so the walking route stays broad. The customer looks toward the steam above the loaves rather than approaching them.",
'<Subject 2> (S1) says: <d>[English] Good morning; the first loaves are cooling, and the room is open.</d>',
"Rain outside, a door closing, quiet oven fans, cooling crusts, and one welcoming voice.")),
sh(5, ["<char3>", "<char1>"], ["<char3>"], ["<char3>"],
[d("<char3>", "The warm air smells wonderful after the rain.")],
pn(["the older Black woman with a short silver natural cut, violet raincoat, and round amber glasses",
"the middle-aged Middle Eastern woman with a cream headscarf, terracotta baker's coat, and black trousers"], [1, 2],
"In a doorway-side two-shot, <Subject 1> loosens her raincoat collar while <Subject 2> walks with her past the cooling rack toward the brighter front window. Steam thins above the loaves, and the last patch of fog clears from the glass as both women look out at the wet street.",
'<Subject 1> (S1) says: <d>[English] The warm air smells wonderful after the rain.</d>',
"Low bakery fans, rainwater at the curb, fabric movement, and one appreciative voice; no music.")),
]
cases.append(c)
# 007 — pool corridor: n5, first2, gap2, reapp5 (final).
c = {
"case_id": "diverse_t1_007", "tier": 1, "target_identity": "<char2>",
"first_appearance_shot": 2, "reappearance_shot": 5, "absence_gap": 2,
"characters": {
"<char1>": "a middle-aged East Asian father with short black hair, a navy rain jacket, and tan chinos",
"<char2>": "a young Black woman swimming coach with tight braids, a teal track jacket, and black athletic trousers",
"<char3>": "an older white male facility attendant with a gray mustache, a burgundy polo shirt, and a clipped key ring",
},
}
c["shots"] = [
sh(1, ["<char1>", "<char3>"], ["<char3>"], ["<char3>"],
[d("<char3>", "The lesson is finishing beyond the glass; please wait on the dry side of the corridor.")],
p1("A reflection-rich medium shot in an indoor swimming-pool viewing corridor frames <Subject 1>, a middle-aged East Asian father with short black hair, a navy rain jacket, and tan chinos, near a broad window while <Subject 2>, an older white male facility attendant with a gray mustache, a burgundy polo shirt, and a clipped key ring, descends two tiled steps toward him. Blue reflections move across the walls from the pool beyond the glass. <Subject 2> indicates a dry bench farther along the corridor with an open hand.",
'<Subject 2> (S1) says: <d>[English] The lesson is finishing beyond the glass; please wait on the dry side of the corridor.</d>',
"Muffled pool water, ventilation, rubber soles on tile, and one clear voice.")),
sh(2, ["<char2>", "<char1>"], ["<char2>"], ["<char2>"],
[d("<char2>", "I will check which changing-room entrance is open, then meet you at these steps.")],
pn(["a young Black woman swimming coach with tight braids, a teal track jacket, and black athletic trousers",
"the middle-aged East Asian father with short black hair, navy rain jacket, and tan chinos"], [2],
"<Subject 1> enters from the pool-side door and joins <Subject 2> beside the window, her teal jacket bright in the shifting water light. She points along the glass toward the lesson area, then walks around the changing-room corner beyond the tiled steps. <Subject 2> remains facing the pool.",
'<Subject 1> (S1) says: <d>[English] I will check which changing-room entrance is open, then meet you at these steps.</d>',
"A pool door closing, distant splashes, tiled footsteps, and one calm voice.")),
sh(3, ["<char1>"], ["<char1>"], ["<char1>"],
[d("<char1>", "The quieter seats make it easier to watch without crowding the window.")],
pn(["the middle-aged East Asian father with short black hair, navy rain jacket, and tan chinos"], [1],
"A seated close reaction shot follows <Subject 1> as he walks beside the glass to the dry bench and sits, leaving a broad passage between his knees and the window. He watches the final swimmers climb from the pool, then shifts his gaze toward the changing-room junction. Moving blue light crosses his jacket and the empty tiled steps.",
'<Subject 1> (S1) says: <d>[English] The quieter seats make it easier to watch without crowding the window.</d>',
"Filtered splashes, bench upholstery, ventilation, and one low voice.")),
sh(4, ["<char1>", "<char3>"], [], [], [],
pn(["the middle-aged East Asian father with short black hair, navy rain jacket, and tan chinos",
"the older white male facility attendant with a gray mustache, burgundy polo shirt, and clipped key ring"], [1, 2],
"<Subject 1> rises from the bench as <Subject 2> opens a glass side door at the end of the corridor. They walk together toward the tiled steps and pause when a small group passes safely through the far junction. <Subject 2> holds the side door until the route becomes quiet again.", "",
"A glass door hinge, subdued pool echoes, passing footsteps, and ventilation; no speech or music.")),
sh(5, ["<char2>", "<char3>", "<char1>"], [], [], [],
pn(["the young Black woman swimming coach with the same tight braids, teal track jacket, and black athletic trousers",
"the older white male facility attendant with a gray mustache, burgundy polo shirt, and clipped key ring",
"the middle-aged East Asian father with short black hair, navy rain jacket, and tan chinos"], [1, 2, 3],
"<Subject 1> descends the short tiled stair beside <Subject 2>, her tight braids and teal jacket clearly matching her earlier appearance. She gestures toward the now-open entrance while <Subject 3> steps forward from the window. In a wide corridor composition, the three begin walking toward the changing-room junction as the pool lesson ends behind the glass.", "",
"Measured tiled footsteps, a distant pool whistle ending the lesson, water ambience, and a door settling; no speech or music.")),
]
cases.append(c)
# 008 — sculpture gallery: n4, first1, gap1, reapp3.
c = {
"case_id": "diverse_t1_008", "tier": 1, "target_identity": "<char1>",
"first_appearance_shot": 1, "reappearance_shot": 3, "absence_gap": 1,
"characters": {
"<char1>": "a middle-aged South Asian woman gallery educator with a silver-streaked black bob, a charcoal tunic, and a red enamel brooch",
"<char2>": "a young Latino man with loose dark curls, a pale green overshirt, and black jeans",
"<char3>": "an older white woman with cropped gray hair, a cobalt scarf, and a cream linen jacket",
},
}
c["shots"] = [
sh(1, ["<char1>", "<char2>"], ["<char1>"], ["<char1>"],
[d("<char1>", "Walk around it once, and notice when the open side disappears.")],
p1("A medium two-shot in a tall-windowed sculpture gallery follows <Subject 1>, a middle-aged South Asian woman with a silver-streaked black bob, a charcoal tunic, and a red enamel brooch, walking with <Subject 2>, a young Latino man with loose dark curls, a pale green overshirt, and black jeans, around a large folded-metal sculpture. A smooth semicircular track keeps both figures and the artwork in view. <Subject 1> pauses at the archway to the adjacent gallery and steps through it while <Subject 2> continues circling.",
'<Subject 1> (S1) says: <d>[English] Walk around it once, and notice when the open side disappears.</d>',
"Soft gallery footsteps, distant ventilation, fabric movement, and one reflective voice.")),
sh(2, ["<char2>", "<char3>"], ["<char2>"], ["<char2>"],
[d("<char2>", "From here it feels closed, but the window light still passes through the center.")],
pn(["a young Latino man with loose dark curls, a pale green overshirt, and black jeans",
"an older white woman with cropped gray hair, a cobalt scarf, and a cream linen jacket"], [1],
"An over-the-shoulder view from behind <Subject 2> shows <Subject 1> reach the darker side of the sculpture as <Subject 2> enters from the window gallery and stops several paces away. They exchange a brief glance, then both shift sideways to compare the solid silhouette with a narrow opening lit from behind. The open floor and tall windows dominate the composition.",
'<Subject 1> (S1) says: <d>[English] From here it feels closed, but the window light still passes through the center.</d>',
"Quiet shoes on polished floor, a faint building hum, and one conversational voice.")),
sh(3, ["<char1>", "<char2>", "<char3>"], [], [], [],
pn(["the middle-aged South Asian gallery educator with the same silver-streaked black bob, charcoal tunic, and red enamel brooch",
"the young Latino man with loose dark curls, pale green overshirt, and black jeans",
"the older white woman with cropped gray hair, cobalt scarf, and cream linen jacket"], [1, 2, 3],
"<Subject 1> appears through the far archway, her red brooch and silver-streaked bob clearly matching the first shot. She walks across the negative space behind the sculpture and stops at a second sightline. <Subject 2> and <Subject 3> turn toward her, then move apart enough to see the artwork from both positions.", "",
"Measured gallery footsteps, soft room tone, and clothing movement; no speech or music.")),
sh(4, ["<char3>", "<char1>", "<char2>"], ["<char3>"], ["<char3>"],
[d("<char3>", "The opening feels wider when a person crosses behind it.")],
pn(["the older white woman with cropped gray hair, cobalt scarf, and cream linen jacket",
"the middle-aged South Asian woman with a silver-streaked black bob, charcoal tunic, and red enamel brooch",
"the young Latino man with loose dark curls, pale green overshirt, and black jeans"], [1, 2, 3],
"In an architectural wide, <Subject 2> walks slowly behind the folded metal while <Subject 1> and <Subject 3> watch from offset angles. Her silhouette appears briefly through the central opening and then clears it. <Subject 1> turns toward <Subject 3> with a small smile as window light lengthens across the floor.",
'<Subject 1> (S1) says: <d>[English] The opening feels wider when a person crosses behind it.</d>',
"Quiet footsteps, broad gallery room tone, and one thoughtful voice; no music.")),
]
cases.append(c)
# 009 — forest bridge: n5, first1, gap2, reapp4.
c = {
"case_id": "diverse_t1_009", "tier": 1, "target_identity": "<char3>",
"first_appearance_shot": 1, "reappearance_shot": 4, "absence_gap": 2,
"characters": {
"<char1>": "a young Black woman with shoulder-length locs, a maroon hiking shell, and a gray daypack",
"<char2>": "a young East Asian man with short black hair, a mustard fleece, and dark hiking trousers",
"<char3>": "an older white man with a neat silver beard, a deep blue rain jacket, and a brown canvas backpack",
},
}
c["shots"] = [
sh(1, ["<char3>", "<char1>", "<char2>"], ["<char3>"], ["<char3>"],
[d("<char3>", "I will cross first and check the landing beyond the bend.")],
p1("At a forest footbridge over a shallow stream, <Subject 1>, an older white man with a neat silver beard, a deep blue rain jacket, and a brown canvas backpack, stands with <Subject 2>, a young Black woman with shoulder-length locs, a maroon hiking shell, and a gray daypack, and <Subject 3>, a young East Asian man with short black hair, a mustard fleece, and dark hiking trousers. A stream-level wide shows <Subject 1> test the damp first plank, cross slowly with one hand near the rail, and continue around the fern-covered bend on the far bank.",
'<Subject 1> (S1) says: <d>[English] I will cross first and check the landing beyond the bend.</d>',
"Shallow water, damp wood under boots, leaves overhead, and one calm voice.")),
sh(2, ["<char1>", "<char2>"], ["<char1>"], ["<char1>"],
[d("<char1>", "The center boards look drier if we keep our steps narrow.")],
pn(["a young Black woman with shoulder-length locs, a maroon hiking shell, and a gray daypack",
"a young East Asian man with short black hair, a mustard fleece, and dark hiking trousers"], [1, 2],
"A close reaction shot holds on <Subject 1> as she crouches at the near end without stepping onto the bridge and studies the darker edges of the planks. <Subject 2> adjusts one shoulder strap and leans slightly to see past her. Water moves below them while filtered light shifts across the center boards.",
'<Subject 1> (S1) says: <d>[English] The center boards look drier if we keep our steps narrow.</d>',
"Stream water, a pack strap sliding, birds in the canopy, and one measured voice.")),
sh(3, ["<char2>", "<char1>"], ["<char2>"], ["<char2>"],
[d("<char2>", "I can wait on this bank until you reach the far rail.")],
pn(["a young East Asian man with short black hair, a mustard fleece, and dark hiking trousers",
"a young Black woman with shoulder-length locs, a maroon hiking shell, and a gray daypack"], [1, 2],
"A gentle lateral follow keeps both banks visible as <Subject 2> steps onto the bridge and crosses at an unhurried pace while <Subject 1> remains beside the trail marker on the near bank. <Subject 2> reaches the far rail, turns, and gives <Subject 1> a small nod as ferns move in a breeze.",
'<Subject 1> (S1) says: <d>[English] I can wait on this bank until you reach the far rail.</d>',
"Even boot steps on wood, running water, moving ferns, and one quiet voice.")),
sh(4, ["<char3>", "<char1>", "<char2>"], [], [], [],
pn(["the older white man with the same neat silver beard, deep blue rain jacket, and brown canvas backpack",
"the young Black woman with shoulder-length locs, maroon hiking shell, and gray daypack",
"the young East Asian man with short black hair, mustard fleece, and dark hiking trousers"], [1, 2, 3],
"Through foreground ferns on the far bank, <Subject 1> returns into view from beyond the bend, his silver beard and blue jacket clearly matching the first shot. He stops beside the landing and gives one open-handed signal. <Subject 2> begins crossing while <Subject 3> shifts farther along the rail to leave room.", "",
"Water below the bridge, three sets of restrained foot movement, leaves, and distant birds; no speech or music.")),
sh(5, ["<char1>", "<char2>", "<char3>"], ["<char3>"], [],
[d("<char3>", "The landing is firm, and the path widens just beyond these ferns.")],
pn(["the young Black woman with shoulder-length locs, maroon hiking shell, and gray daypack",
"the young East Asian man with short black hair, mustard fleece, and dark hiking trousers",
"the older white man with a neat silver beard, deep blue rain jacket, and brown canvas backpack"], [1, 2, 3],
"A wide from the far bank shows <Subject 1> step off the bridge beside <Subject 2> while <Subject 3> waits at the edge of the widened path. They turn together toward the fern-lined bend, then begin walking away from the stream in a loose single file.",
'<Subject 3> (S1) says: <d>[English] The landing is firm, and the path widens just beyond these ferns.</d>',
"Boots leaving damp wood, stream ambience receding, leaves brushing packs, and one voice.")),
]
cases.append(c)
# 010 — ferry: n5, first2, gap1, reapp4.
c = {
"case_id": "diverse_t1_010", "tier": 1, "target_identity": "<char2>",
"first_appearance_shot": 2, "reappearance_shot": 4, "absence_gap": 1,
"characters": {
"<char1>": "an older Pacific Islander woman with long silver curls, a coral windbreaker, and navy trousers",
"<char2>": "a middle-aged Black man deckhand with a shaved head, a yellow waterproof jacket, and dark deck boots",
"<char3>": "a young white woman with a chestnut ponytail, a stone-gray coat, and a blue knitted scarf",
},
}
c["shots"] = [
sh(1, ["<char1>", "<char3>"], ["<char1>"], ["<char1>"],
[d("<char1>", "The wind is stronger at this rail; the cabin side may be calmer.")],
p1("On the sheltered passenger deck of a small harbor ferry, <Subject 1>, an older Pacific Islander woman with long silver curls, a coral windbreaker, and navy trousers, stands near <Subject 2>, a young white woman with a chestnut ponytail, a stone-gray coat, and a blue knitted scarf. A stable-horizon wide shows both women hold the rail lightly as the ferry turns across calm water. Wind lifts <Subject 2>'s scarf, and they look toward the forward cabin threshold.",
'<Subject 1> (S1) says: <d>[English] The wind is stronger at this rail; the cabin side may be calmer.</d>',
"Low engines, water along the hull, wind against coats, and one conversational voice.")),
sh(2, ["<char2>", "<char1>", "<char3>"], ["<char2>"], ["<char2>"],
[d("<char2>", "I will check the forward side door and meet you along the opposite rail.")],
pn(["a middle-aged Black man deckhand with a shaved head, a yellow waterproof jacket, and dark deck boots",
"the older Pacific Islander woman with long silver curls, coral windbreaker, and navy trousers",
"the young white woman with a chestnut ponytail, stone-gray coat, and blue knitted scarf"], [2, 3],
"<Subject 1> comes up from the lower stair and joins <Subject 2> and <Subject 3> beneath the deck canopy, his yellow waterproof jacket distinct against the gray water. He slides the forward cabin door open, looks through the threshold, and steps inside while the passengers begin walking toward the opposite rail.",
'<Subject 1> (S1) says: <d>[English] I will check the forward side door and meet you along the opposite rail.</d>',
"A sliding door, deck boots, steady engines, wind, and one clear voice.")),
sh(3, ["<char3>", "<char1>"], ["<char3>"], ["<char3>"],
[d("<char3>", "The water is already smoother on this side of the turn.")],
pn(["a young white woman with a chestnut ponytail, a stone-gray coat, and a blue knitted scarf",
"the older Pacific Islander woman with long silver curls, coral windbreaker, and navy trousers"], [1, 2],
"A rail-level tracking view follows <Subject 1> and <Subject 2> along the sheltered side of the deck. <Subject 1>'s scarf settles against her coat as the ferry completes its turn, and <Subject 2> releases one hand from the rail. Harbor buildings slide slowly across the background.",
'<Subject 1> (S1) says: <d>[English] The water is already smoother on this side of the turn.</d>',
"Softer wind, engines, water slipping along the hull, and one relaxed voice.")),
sh(4, ["<char2>", "<char3>", "<char1>"], [], [], [],
pn(["the middle-aged Black deckhand with the same shaved head, yellow waterproof jacket, and dark deck boots",
"the young white woman with a chestnut ponytail, stone-gray coat, and blue knitted scarf",
"the older Pacific Islander woman with long silver curls, coral windbreaker, and navy trousers"], [1, 2, 3],
"<Subject 1> returns along the opposite rail from the forward cabin, his yellow jacket and shaved head clearly matching his earlier appearance. He slides the side door fully open and holds it as <Subject 2> and <Subject 3> approach at an easy pace. The vessel's motion has visibly softened.", "",
"A door rolling in its track, quiet deck steps, low engines, and calmer water; no speech or music.")),
sh(5, ["<char1>", "<char3>", "<char2>"], ["<char2>"], [],
[d("<char2>", "You can stand just inside the threshold and still keep the harbor in view.")],
pn(["the older Pacific Islander woman with long silver curls, coral windbreaker, and navy trousers",
"the young white woman with a chestnut ponytail, stone-gray coat, and blue knitted scarf",
"the middle-aged Black man with a shaved head, yellow waterproof jacket, and dark deck boots"], [1, 2, 3],
"In a medium doorway composition, <Subject 1> and <Subject 2> step into the sheltered threshold while <Subject 3> stands to the side of the open door. All three look through the broad cabin window as the ferry enters calmer harbor water, their coats and scarves now barely moving.",
'<Subject 3> (S1) says: <d>[English] You can stand just inside the threshold and still keep the harbor in view.</d>',
"Muted engines through the cabin wall, gentle water, a door latch, and one helpful voice.")),
]
cases.append(c)
OUT.write_text(json.dumps(cases, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")