Skip to main content

Module sfx_match

Module sfx_match 

Source
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§

Args 🔒
Candidate 🔒
CueMatch 🔒
PoolAsset 🔒

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§

TOKEN_SPLIT 🔒

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 (glass is protected).
source_missing 🔒
tokenize
Lowercase, stopword-stripped, singularised token set.
write_config_source 🔒
write_csv 🔒