Expand description
xil sfx-match — find existing library assets for cues whose declared
source is not on disk. Port of XILU022_sfx_match.py.
Each missing cue is scored against every pool asset’s title (else its
prompt, else its filename) on coverage (|cue ∩ cand| / |cue|), with
jaccard as the tie-breaker. A category gate keeps AMBIENCE cues off
MUSIC assets, and a margin rule sends near-ties to human review.
Structs§
Constants§
- CSV_
COLUMNS 🔒 - JACCARD_
WEIGHT 🔒 - REVIEW_
FLOOR 🔒 - SCRIPT_
NAME 🔒 - STOPWORDS 🔒
- Tokens with no discriminating signal. “up”, “out”, “down”, “off” and “back” are deliberately kept: cue text leans on them.
- STRONG_
COVERAGE 🔒 - STRONG_
JACCARD 🔒 - STRONG_
MARGIN 🔒 - TIERS 🔒
Statics§
Functions§
- analyze 🔒
- apply_
match 🔒 - asset_
from_ 🔒record - build_
exact_ 🔒index - filename → preferred copy, over every asset rather than the deduped pool.
- build_
pool 🔒 - One entry per distinct sound, grouped by
(match tokens, duration). - command
- The clap definition behind
--help, for man pages. - composite 🔒
- copy2 🔒
shutil.copy2: contents plus the modification time.- execute 🔒
- fourth_
is_ 🔒alpha f[3].isalpha()on the lowercased filename.- is_
canonical_ 🔒name - The filename still agrees with the title it carries.
- load_
assets 🔒 - log_
summary 🔒 - match_
cue 🔒 - placement_
from_ 🔒filename - Classify an untitled asset by filename prefix.
- render_
hints 🔒 - run
- scope_
rank 🔒 - score_
pair 🔒 (coverage, jaccard)of a cue against a candidate.- sfx_dir 🔒
sfx_common.sfx_dir: the per-show pool when it exists, else flat SFX/.- singular 🔒
- Fold a simple plural so CHAIRS matches CHAIR (
glassis protected). - source_
missing 🔒 - tokenize
- Lowercase, stopword-stripped, singularised token set.
- write_
config_ 🔒source - write_
csv 🔒