Commit Graph

2 Commits

Author SHA1 Message Date
umbra audio
03f8a858dd Add Apache-2.0 LICENSE, NOTICE, and SPDX headers 2026-10-18 19:01:04 -07:00
B.D. Murphy
4775e3b589 Add deterministic designation scanner; capture the ch5 speakers discovery missed
Ran discovery on Last Dwarf ch5 with the new over-detection prompt rules. It
improved (found 'The big one', 'The one on the left/right', 'The Leader',
'Girl helping' where it previously found none of them) but STILL dropped
'The oldest' and 'The tallest' from the same six-man crowd — the e4b model is
not deterministic enough to guarantee coverage.

So added a mechanical backstop that does not depend on the LLM at all:

- umbraaudio/analysis/designation_scan.py reads the three canonical
  speech-attribution shapes ('The oldest says,' / '"I thought they died\n
  off," says the tallest' / '"No," the old smith said.') and harvests every
  designation a speaker is referred to by. Post-filters pronouns, narration
  verbs ('Hallr Grips His Axe And'), finite-verb clauses, possessives
  ('Hallr's' -> 'Hallr', 'Sheyla's voice' -> 'Sheyla'), scene/internal labels,
  indefinite collectives, and tags that fall inside a quotation (that is
  someone being talked ABOUT, not speaking).
- scripts/merge_designations.py adds any designation the cast does not cover
  as an 'unidentified' speaker with its evidence line. Never removes or
  rewrites existing entries, atomic tmp+replace, idempotent (0 on re-run).
- scripts/run_discovery.py runs discovery to a SEPARATE output file so the
  curated speakers.json is never overwritten by a discovery run.

Result on Last Dwarf: 56 designations, 33 already covered, 23 genuinely
missing — including the ch5 crowd (The Oldest, The Tallest, The Young One,
The One With The Biggest Sword, The Biggest One, The Leader, One Girl Helping)
plus Manfred, The Sergeant, One Witch, The Soldier and others. Cast 70 -> 93,
all new entries flagged 'needs check' at 0.00 confidence.

Also: scripts/run_discovery.py, and a 14-test suite covering the ch5 passage,
possessives, quoted narration, finite-verb clauses and post-quote lowercase
subjects. Full suite 461 passed (8 pre-existing/parallel failures unchanged).
2026-10-01 07:04:44 -07:00