re: correction -- the naming sweep already covered the 24; it just never said so
archive_naming.py already harvests 6027 candidate names under 16 prefixes, and testing its candidate set directly shows it names all 24 StageParameter_S<NN> objects, 24/24. The previous entry presented that naming as new -- it is not. What was new was the identification (which object is which stage, the shared _Tutorial table, IsBoss16Enable = S16), not the method. The real gap, now closed: the sweep reported only per-archive percentages and never emitted WHICH entry got which name, which is exactly why nobody could say the settings objects were StageParameter_*. It now prints the resolved name families per archive -- 6573 named entries, 1631 families disc-wide. Determinism caught again by the verify loop: the resolved map was built by iterating a set, so collided hashes picked a different winner each run. Now iterated sorted(). Second time in two iterations -- any map built from a set needs a sort. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PMRJjbxLqZtsb5Vb7KunPE
This commit is contained in:
@@ -43,6 +43,25 @@ def main():
|
||||
nd = sum(1 for h in ent if h in H)
|
||||
print(" %-30s %6d %6d %5.1f%%" % (nm, len(ent), nd, 100.0 * nd / len(ent) if ent else 0))
|
||||
|
||||
# WHICH entries got named — the per-archive content index. The percentage
|
||||
# above is a statistic; this is the part that is actually usable.
|
||||
NAMES = {}
|
||||
for n in sorted(names): # sorted: a set's order varies per run
|
||||
for p in PRE:
|
||||
NAMES.setdefault(U.name_hash(p + n), p + n)
|
||||
total = sum(1 for ent in toc.values() for h in ent if h in NAMES)
|
||||
print("\n## What each archive is made of (resolved names, digits collapsed to #)")
|
||||
print(" total named entries across the disc: %d" % total)
|
||||
for nm, ent in rows:
|
||||
res = [NAMES[h] for h in ent if h in NAMES]
|
||||
if not res:
|
||||
continue
|
||||
fam = collections.Counter(
|
||||
re.sub(r'\d+', '#', r.rsplit('\\', 1)[-1]) for r in res)
|
||||
print("\n %s %d named, %d families" % (nm, len(res), len(fam)))
|
||||
for k, c in sorted(fam.items(), key=lambda kv: (-kv[1], kv[0])):
|
||||
print(" x%-4d %s" % (c, k))
|
||||
|
||||
def _ix(t): return U.ixud_hash([ord(c) for c in t])
|
||||
FN = [('name_hash', U.name_hash), ('tag_hash', U.tag_hash), ('ixud_hash', _ix)]
|
||||
SUB = ['', '2d\\', 'eng\\', 'Data\\', 'ArmsSt\\', 'Marker\\']
|
||||
|
||||
Reference in New Issue
Block a user