Download scripts/generate_tier1_batch04.py from ymyy307/long-div: direct link, hf CLI and curl.
- Browser
- Download file 22 kB
-
https://huggingface.co/ymyy307/long-div/resolve/main/scripts/generate_tier1_batch04.py
- Command line
-
hf download hf://ymyy307/long-div/scripts/generate_tier1_batch04.py
-
curl -L -o generate_tier1_batch04.py https://huggingface.co/ymyy307/long-div/resolve/main/scripts/generate_tier1_batch04.py
22 kB
| #!/usr/bin/env python3 | |
| """Generate diverse Tier-1 cases 016-020.""" | |
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| ROOT=Path(__file__).resolve().parents[1]; OUT=ROOT/"generated"/"tier1_batch04.json" | |
| def p1(desc,line="",sound="Natural ambience; no music."): | |
| x=f"integrated_multimodal_description:\n[Shot 1] {desc}"; x+=f"\n\n{line}" if line else ""; return x+f"\n\noverall_soundscape:\n{sound}" | |
| def pn(defs,ret,desc,line="",sound="Natural ambience; no music."): | |
| ds="\n".join(f"<Subject {i}> is {v}." for i,v in enumerate(defs,1)); rs="\n".join(f"<Subject {i}>: fully_preserved - Maintain identity." for i in ret) | |
| x=f"subject_definitions:\n{ds}\n{{{{REFERENCE_DEFINITIONS}}}}\n\nsummary:\n{{{{REFERENCE_SUMMARY}}}}\n\nretention_analysis:\n{rs}\n{{{{REFERENCE_RETENTION}}}}\n\ndetailed_description:\n[Shot 1] {desc}" | |
| x+=f"\n\n{line}" if line else ""; return x+f"\n\noverall_soundscape:\n{sound}" | |
| def sh(n,v,s,f,ds,p): return {"shot_no":n,"visible_characters":v,"speakers":s,"first_time_speakers":f,"dialogue":ds,"prompt":p} | |
| def d(c,t): return {"character":c,"language":"English","text":t} | |
| cases=[] | |
| # 016 rooftop garden — n5 first2 gap1 reapp4. | |
| c={"case_id":"diverse_t1_016","tier":1,"target_identity":"<char2>","first_appearance_shot":2,"reappearance_shot":4,"absence_gap":1, | |
| "characters":{"<char1>":"a young Latina woman with a dark ponytail, a pale denim jacket, and rust-colored trousers","<char2>":"an older East Asian man rooftop gardener with swept-back white hair, a forest-green vest, and a cream shirt","<char3>":"a middle-aged Black man with short locs, a gray hooded jacket, and navy trousers"}} | |
| c["shots"]=[ | |
| sh(1,["<char1>","<char3>"],["<char1>"],["<char1>"],[d("<char1>","The cloud cover is thinning, so the tender herbs may need shade soon.")],p1("A roofline wide shows <Subject 1>, a young Latina woman with a dark ponytail, a pale denim jacket, and rust-colored trousers, walking with <Subject 2>, a middle-aged Black man with short locs, a gray hooded jacket, and navy trousers, between herb planters and a row of solar panels. They pause as a brighter patch moves across the roof. <Subject 1> touches one leaf, then both look toward the shaded stair enclosure.",'<Subject 1> (S1) says: <d>[English] The cloud cover is thinning, so the tender herbs may need shade soon.</d>',"Roof wind, leaves, distant traffic, and one observant voice.")), | |
| sh(2,["<char2>","<char1>"],["<char2>"],["<char2>"],[d("<char2>","I will check the far planter beyond the panels; wait where the path stays shaded.")],pn(["an older East Asian man rooftop gardener with swept-back white hair, a forest-green vest, and a cream shirt","the young Latina woman with a dark ponytail, pale denim jacket, and rust-colored trousers"],[2],"A medium walking two-shot follows <Subject 1> as he joins <Subject 2> beside the shaded planters, his white hair and green vest bright in the changing light. He studies the leaf edges, then walks behind the solar-panel row while <Subject 2> remains near the stair enclosure.",'<Subject 1> (S1) says: <d>[English] I will check the far planter beyond the panels; wait where the path stays shaded.</d>',"Measured roof steps, panel brackets humming faintly in wind, leaves, and one calm voice.")), | |
| sh(3,["<char1>","<char3>"],["<char3>"],["<char3>"],[d("<char3>","The shade cloth can reach this planter without blocking the walkway.")],pn(["the young Latina woman with a dark ponytail, pale denim jacket, and rust-colored trousers","the middle-aged Black man with short locs, gray hooded jacket, and navy trousers"],[1,2],"An over-the-shoulder view from behind <Subject 2> shows <Subject 1> lift the loose edge of one shade cloth while <Subject 2> checks the clear walking space beneath it. Neither fastens it yet. Cloud shadow leaves the planters and sunlight begins warming the pale roof surface.",'<Subject 2> (S1) says: <d>[English] The shade cloth can reach this planter without blocking the walkway.</d>',"Cloth moving in wind, leaves, city ambience, and one practical voice.")), | |
| sh(4,["<char2>","<char1>","<char3>"],[],[],[],pn(["the older East Asian rooftop gardener with the same swept-back white hair, forest-green vest, and cream shirt","the young Latina woman with a dark ponytail, pale denim jacket, and rust-colored trousers","the middle-aged Black man with short locs, gray hooded jacket, and navy trousers"],[1,2,3],"A slow orbit around the stair enclosure reveals <Subject 1> returning from the solar-panel aisle, clearly matching his earlier appearance. He joins <Subject 2> and <Subject 3> as direct sun reaches the herbs. Together they draw a single shade cloth across one planter, leaving the roof path open.","","Shade fabric, roof wind, three sets of quiet steps, and leaves; no speech or music.")), | |
| sh(5,["<char1>","<char2>"],["<char2>"],[],[d("<char2>","That is enough cover; the stronger herbs can remain in the open light.")],pn(["the young Latina woman with a dark ponytail, pale denim jacket, and rust-colored trousers","the older East Asian man with swept-back white hair, forest-green vest, and cream shirt"],[1,2],"A close reaction shot catches <Subject 1> lift one shaded leaf while <Subject 2> watches its color settle out of the glare. They release the cloth, step back into the open aisle, and look across the sunlit rooftop toward the remaining planters.",'<Subject 2> (S1) says: <d>[English] That is enough cover; the stronger herbs can remain in the open light.</d>',"Gentle cloth tension, leaf movement, wind, and one measured voice."))] | |
| cases.append(c) | |
| # 017 bus shelter — n4 first1 gap1 reapp3. | |
| c={"case_id":"diverse_t1_017","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":3,"absence_gap":1, | |
| "characters":{"<char1>":"a middle-aged South Asian woman route supervisor with a low bun, a navy transit coat, and a reflective silver scarf","<char2>":"an older Black man with a gray beard, a camel overcoat, and a folded umbrella","<char3>":"a young white woman with short blond hair, a red rain shell, and a black backpack"}} | |
| c["shots"]=[ | |
| sh(1,["<char1>","<char2>","<char3>"],["<char1>"],["<char1>"],[d("<char1>","The replacement bus will use the next bay; I will confirm where it stops.")],p1("A telephoto lane view compresses a rain-dark bus depot as <Subject 1>, a middle-aged South Asian woman with a low bun, a navy transit coat, and a reflective silver scarf, stands beneath a glass shelter with <Subject 2>, an older Black man with a gray beard, a camel overcoat, and a folded umbrella, and <Subject 3>, a young white woman with short blond hair, a red rain shell, and a black backpack. <Subject 1> opens her umbrella and walks toward the next curved boarding bay.",'<Subject 1> (S1) says: <d>[English] The replacement bus will use the next bay; I will confirm where it stops.</d>',"Light rain, distant engines, umbrella fabric, and one clear voice.")), | |
| sh(2,["<char2>","<char3>"],["<char2>"],["<char2>"],[d("<char2>","We can wait inside the shelter until the headlights reach the curve.")],pn(["an older Black man with a gray beard, a camel overcoat, and a folded umbrella","a young white woman with short blond hair, a red rain shell, and a black backpack"],[1,2],"A reflective medium two-shot shows <Subject 1> sit on the shelter bench while <Subject 2> remains standing beside the glass. Rain trails distort the empty lane behind them. <Subject 2> turns toward the curve, and <Subject 1> shifts his folded umbrella away from the walking path.",'<Subject 1> (S1) says: <d>[English] We can wait inside the shelter until the headlights reach the curve.</d>',"Rain on glass, a bench settling, remote traffic, and one patient voice.")), | |
| sh(3,["<char1>","<char2>","<char3>"],[],[],[],pn(["the middle-aged South Asian route supervisor with the same low bun, navy transit coat, and reflective silver scarf","the older Black man with a gray beard, camel overcoat, and folded umbrella","the young white woman with short blond hair, red rain shell, and black backpack"],[1,2,3],"A restrained walking follow catches <Subject 1> returning along the curved lane, clearly matching her earlier appearance, as bus headlights appear behind her. She closes her umbrella beneath the shelter and gestures toward the next bay. <Subject 2> rises while <Subject 3> turns toward the approaching bus.","","An umbrella closing, rain, a bus engine rounding the curve, and footsteps; no speech or music.")), | |
| sh(4,["<char3>","<char1>","<char2>"],["<char3>"],["<char3>"],[d("<char3>","The new bay is close enough that we can walk over without hurrying.")],pn(["the young white woman with short blond hair, red rain shell, and black backpack","the middle-aged South Asian woman with a low bun, navy transit coat, and reflective silver scarf","the older Black man with a gray beard, camel overcoat, and folded umbrella"],[1,2,3],"A wide doorway-like frame through the shelter opening shows <Subject 1>, <Subject 2>, and <Subject 3> begin walking toward the illuminated bay. <Subject 2> keeps pace beside the passengers while the bus slows at the curb. Wet pavement reflects their silhouettes.",'<Subject 1> (S1) says: <d>[English] The new bay is close enough that we can walk over without hurrying.</d>',"Rain-softened steps, air brakes, idling engine, and one relaxed voice."))] | |
| cases.append(c) | |
| # 018 canal hat — n5 first1 gap2 reapp4. | |
| c={"case_id":"diverse_t1_018","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":4,"absence_gap":2, | |
| "characters":{"<char1>":"a young Black nonbinary person with short locs, a turquoise windbreaker, and charcoal joggers","<char2>":"an older East Asian woman with a silver bob, a burgundy quilted vest, and cream trousers","<char3>":"a middle-aged Latino father with wavy dark hair, a brown field jacket, and blue jeans","<char4>":"a child with curly dark hair, a yellow hooded coat, and green boots"}} | |
| c["shots"]=[ | |
| sh(1,["<char1>","<char2>","<char3>","<char4>"],["<char1>"],["<char1>"],[d("<char1>","The hat landed on the grass; I can follow the path around and pick it up safely.")],p1("A continuous-feeling walking medium follows <Subject 1>, a young Black nonbinary person with short locs, a turquoise windbreaker, and charcoal joggers, beside <Subject 2>, an older East Asian woman with a silver bob, a burgundy quilted vest, and cream trousers, along an urban canal. Nearby, <Subject 3>, a middle-aged Latino father with wavy dark hair, a brown field jacket, and blue jeans, stands with <Subject 4>, a child with curly dark hair, a yellow hooded coat, and green boots, as the child's knit hat blows into a safe pocket of grass. <Subject 1> walks around the reed-lined bend after it.",'<Subject 1> (S1) says: <d>[English] The hat landed on the grass; I can follow the path around and pick it up safely.</d>',"Canal water, wind in reeds, footsteps, and one reassuring voice.")), | |
| sh(2,["<char2>","<char3>","<char4>"],["<char3>"],["<char3>"],[d("<char3>","Stay beside me; the hat is well away from the water.")],pn(["an older East Asian woman with a silver bob, a burgundy quilted vest, and cream trousers","a middle-aged Latino father with wavy dark hair, a brown field jacket, and blue jeans","a child with curly dark hair, a yellow hooded coat, and green boots"],[1,2,3],"A calm group wide holds <Subject 2> beside <Subject 3> while <Subject 1> crouches to the child's height near the railing. <Subject 3> keeps one hand lightly on <Subject 1>'s shoulder. Reeds sway between the path and canal, but the grassy pocket remains visible beyond the bend.",'<Subject 2> (S1) says: <d>[English] Stay beside me; the hat is well away from the water.</d>',"Wind, canal birds, clothing movement, and one gentle voice.")), | |
| sh(3,["<char4>","<char2>","<char3>"],["<char4>"],["<char4>"],[d("<char4>","I can see the yellow stripe through the reeds.")],pn(["the child with curly dark hair, yellow hooded coat, and green boots","the older East Asian woman with a silver bob, burgundy quilted vest, and cream trousers","the middle-aged Latino man with wavy dark hair, brown field jacket, and blue jeans"],[1,2,3],"A child-height close reaction shot shows <Subject 1> point through moving reeds toward the hat's bright stripe. <Subject 2> sits briefly on the pocket-park wall while <Subject 3> looks along the dry path. All three remain well inside the railing.",'<Subject 1> (S1) says: <d>[English] I can see the yellow stripe through the reeds.</d>',"Reeds, water against the canal edge, distant bicycles, and one small voice.")), | |
| sh(4,["<char1>","<char4>","<char3>","<char2>"],[],[],[],pn(["the young Black nonbinary person with the same short locs, turquoise windbreaker, and charcoal joggers","the child with curly dark hair, yellow hooded coat, and green boots","the middle-aged Latino father with wavy dark hair, brown field jacket, and blue jeans","the older East Asian woman with a silver bob, burgundy quilted vest, and cream trousers"],[1,2,3,4],"A reveal through foreground reeds shows <Subject 1> returning from the park bend, clearly matching their earlier appearance, with the knit hat held at their side. <Subject 2> stands and steps forward while <Subject 3> and <Subject 4> remain near the low wall. <Subject 1> kneels and hands the hat back without ceremony.","","Footsteps on the path, reeds, soft fabric, canal ambience, and a small relieved laugh; no speech or music.")), | |
| sh(5,["<char4>","<char1>","<char2>","<char3>"],["<char2>"],["<char2>"],[d("<char2>","Now we can finish the walk before the next gust arrives.")],pn(["the child with curly dark hair, yellow hooded coat, and green boots","the young Black nonbinary person with short locs, turquoise windbreaker, and charcoal joggers","the older East Asian woman with a silver bob, burgundy quilted vest, and cream trousers","the middle-aged Latino father with wavy dark hair, brown field jacket, and blue jeans"],[1,2,3,4],"A gentle lateral follow keeps all four walkers beside the canal as <Subject 1> pulls the recovered hat snugly over their curls. <Subject 2> walks beside the child, while <Subject 3> and <Subject 4> follow a pace behind. Wind continues moving the reeds but no loose clothing lifts away.",'<Subject 3> (S1) says: <d>[English] Now we can finish the walk before the next gust arrives.</d>',"Four sets of easy steps, canal water, wind in reeds, and one warm voice."))] | |
| cases.append(c) | |
| # 019 theater foyer — n5 first2 gap2 reapp5 final. | |
| c={"case_id":"diverse_t1_019","tier":1,"target_identity":"<char2>","first_appearance_shot":2,"reappearance_shot":5,"absence_gap":2, | |
| "characters":{"<char1>":"a young South Asian woman with shoulder-length curls, a cream coat, and a dark red handbag","<char2>":"an older white man theater usher with swept-back gray hair, a bottle-green jacket, and a brass name pin","<char3>":"a middle-aged Black man with thin-rim glasses, a navy overcoat, and a pale gold scarf"}} | |
| c["shots"]=[ | |
| sh(1,["<char1>","<char3>"],["<char1>"],["<char1>"],[d("<char1>","The curved stair is beautiful, but the upper section looks dim.")],p1("A symmetrical foyer wide frames <Subject 1>, a young South Asian woman with shoulder-length curls, a cream coat, and a dark red handbag, and <Subject 2>, a middle-aged Black man with thin-rim glasses, a navy overcoat, and a pale gold scarf, beneath a curved theater staircase. They remove their coats slowly and look toward a darker upper landing. Warm wall lamps reflect across the empty foyer floor.",'<Subject 1> (S1) says: <d>[English] The curved stair is beautiful, but the upper section looks dim.</d>',"Coat fabric, distant auditorium ventilation, quiet foyer resonance, and one conversational voice.")), | |
| sh(2,["<char2>","<char1>","<char3>"],["<char2>"],["<char2>"],[d("<char2>","I will check the lit auditorium door; please stay near the coat alcove.")],pn(["an older white man theater usher with swept-back gray hair, a bottle-green jacket, and a brass name pin","the young South Asian woman with shoulder-length curls, cream coat, and dark red handbag","the middle-aged Black man with thin-rim glasses, navy overcoat, and pale gold scarf"],[2,3],"A medium doorway composition reveals <Subject 1> entering from the coat-alcove passage and joining <Subject 2> and <Subject 3>. His green jacket and brass pin stand out in the warm foyer. He opens one heavy vestibule door, looks into the adjoining corridor, and passes through while the visitors remain below the staircase.",'<Subject 1> (S1) says: <d>[English] I will check the lit auditorium door; please stay near the coat alcove.</d>',"A heavy door, quiet shoe steps, low ventilation, and one polite voice.")), | |
| sh(3,["<char3>","<char1>"],["<char3>"],["<char3>"],[d("<char3>","The side passage has enough light if we avoid the upper stair.")],pn(["the middle-aged Black man with thin-rim glasses, navy overcoat, and pale gold scarf","the young South Asian woman with shoulder-length curls, cream coat, and dark red handbag"],[1,2],"An over-the-shoulder view from behind <Subject 2> shows <Subject 1> walk toward the coat-alcove passage and test the brightness with one cautious step. <Subject 2> turns from the dark upper stair toward him. A wall lamp beside the passage casts a clear pool of light across the floor.",'<Subject 1> (S1) says: <d>[English] The side passage has enough light if we avoid the upper stair.</d>',"Soft footsteps, wall-lamp hum, distant auditorium air, and one low voice.")), | |
| sh(4,["<char1>","<char3>"],[],[],[],pn(["the young South Asian woman with shoulder-length curls, cream coat, and dark red handbag","the middle-aged Black man with thin-rim glasses, navy overcoat, and pale gold scarf"],[1,2],"A close reaction shot catches <Subject 1> notice a wall light come on beyond the passage. She looks to <Subject 2>, and both stand from a low foyer bench. They begin walking toward the brighter route as the dark stair remains unused in the background.","","A switch clicking at a distance, bench fabric, measured footsteps, and quiet foyer ambience; no speech or music.")), | |
| sh(5,["<char2>","<char1>","<char3>"],[],[],[],pn(["the older white theater usher with the same swept-back gray hair, bottle-green jacket, and brass name pin","the young South Asian woman with shoulder-length curls, cream coat, and dark red handbag","the middle-aged Black man with thin-rim glasses, navy overcoat, and pale gold scarf"],[1,2,3],"A soft follow around the curved stair reveals <Subject 1> emerging from the coat-alcove passage, clearly matching his earlier appearance, as the wall light behind him reaches full brightness. He holds the lit auditorium door while <Subject 2> and <Subject 3> approach and pass into the vestibule at an unhurried pace.","","A door held open, warm wall-light hum, quiet footsteps, and subdued theater ventilation; no speech or music."))] | |
| cases.append(c) | |
| # 020 adoption courtyard — n4 first1 gap2 reapp4 final. | |
| c={"case_id":"diverse_t1_020","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":4,"absence_gap":2, | |
| "characters":{"<char1>":"a young East Asian woman animal caregiver with a short black bob, a sky-blue utility jacket, and dark khaki trousers","<char2>":"a middle-aged white nonbinary visitor with short silver-blond hair, a plum sweater, and black jeans"}} | |
| c["shots"]=[ | |
| sh(1,["<char1>","<char2>"],["<char1>"],["<char1>"],[d("<char1>","I will take her around the short loop first, then we can stop near this bench.")],p1("A relaxed courtyard wide shows <Subject 1>, a young East Asian woman with a short black bob, a sky-blue utility jacket, and dark khaki trousers, holding the leash of one calm small brown dog beside <Subject 2>, a middle-aged white nonbinary visitor with short silver-blond hair, a plum sweater, and black jeans. <Subject 1> lets the dog sniff near a lattice gate, then walks with it through the gate onto a short garden loop while <Subject 2> remains by the bench.",'<Subject 1> (S1) says: <d>[English] I will take her around the short loop first, then we can stop near this bench.</d>',"Light leash hardware, paws on paving, courtyard birds, and one soft voice.")), | |
| sh(2,["<char2>"],["<char2>"],["<char2>"],[d("<char2>","I can wait here and let her choose how close she wants to come.")],pn(["a middle-aged white nonbinary visitor with short silver-blond hair, a plum sweater, and black jeans"],[1],"A seated medium shot shows <Subject 1> settle at one end of the courtyard bench, leaving the path and the other end open. They rest both hands loosely on their knees, watch leaves moving above the loop, and turn toward a faint collar sound beyond the lattice.",'<Subject 1> (S1) says: <d>[English] I can wait here and let her choose how close she wants to come.</d>',"Leaves, distant paws on gravel, quiet breathing, and one gentle voice.")), | |
| sh(3,["<char2>"],[],[],[],pn(["the middle-aged white nonbinary visitor with short silver-blond hair, plum sweater, and black jeans"],[1],"A dog-height close reaction shot frames <Subject 1>'s relaxed shoes and open posture beside the bench. They stand slowly, then stop several paces from the lattice gate as it begins to move inward. Flowering vines sway across the top of the frame.","","A gate beginning to swing, leaves, faint collar tags, and courtyard ambience; no speech or music.")), | |
| sh(4,["<char1>","<char2>"],[],[],[],pn(["the young East Asian animal caregiver with the same short black bob, sky-blue utility jacket, and dark khaki trousers","the middle-aged white nonbinary visitor with short silver-blond hair, plum sweater, and black jeans"],[1,2],"A gentle low tracking shot follows <Subject 1> and the calm small dog returning through the lattice gate, her blue jacket and short bob clearly matching the first shot. The dog approaches <Subject 2> at a slower pace, sniffs the air, and stops with a loose leash. <Subject 2> remains still and meets <Subject 1>'s reassuring gaze.","","Soft paws, a gate settling, light leash hardware, leaves, and calm courtyard room tone; no speech or music."))] | |
| cases.append(c) | |
| OUT.write_text(json.dumps(cases,ensure_ascii=False,indent=2)+"\n",encoding="utf-8") | |