Files
Aislo/resources/tester/scratch/count_our_targets.py
T

37 lines
1.2 KiB
Python

import json, re
with open('scratch/audit_42_detailed_breakdown.json', 'r', encoding='utf-8') as f:
audit_42 = json.load(f)
# count attached headers and collapsed tables in the 42 linked sections
attached_count = 0
collapsed_count = 0
sections_with_attached = []
sections_with_collapsed = []
for item in audit_42:
sec = item['section']
name = item['name']
header_sep = item['header_separation']
flaws = item['flaws_detected']
is_attached = "경계 붙음" in header_sep
if is_attached:
attached_count += 1
sections_with_attached.append(f"{sec} {name}")
has_collapsed = any("표 한 줄 뭉침" in f for f in flaws)
if has_collapsed:
collapsed_count += 1
sections_with_collapsed.append(f"{sec} {name}")
print(f"=== Linked 42 sections (non-machine 24 target nodes) ===")
print(f"Attached headers in our target: {attached_count} sections")
print(f"Collapsed tables in our target neighborhood: {collapsed_count} sections")
print("\nAttached sections list:")
for s in sections_with_attached:
print(f" - {s}")
print("\nCollapsed sections list:")
for s in sections_with_collapsed:
print(f" - {s}")