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

53 lines
1.7 KiB
Python

import os, sys, re, json
sys.stdout.reconfigure(encoding='utf-8')
merged_path = "resources/knowledge/original/원가계산/건설공사_표준품셈/2026년_건설공사_표준품셈.md"
with open(merged_path, 'r', encoding='utf-8') as f:
text_merged = f.read()
# Check how many target strings from our previous fixes exist in merged file
from scratch.fix_common_squashed_tables import (
target_2_8_7, repl_2_8_7,
target_2_8_10, repl_2_8_10,
target_2_11_5, repl_2_11_5,
target_2_11_7, repl_2_11_7,
target_4_4_4, repl_4_4_4,
target_5_1_3, repl_5_1_3,
target_5_1_8, repl_5_1_8,
target_5_pbd1, repl_5_pbd1,
target_5_pbd2, repl_5_pbd2,
target_5_pbd3, repl_5_pbd3,
target_5_base, repl_5_base,
target_6_slip, repl_6_slip,
target_6_socket, repl_6_socket,
target_6_grout, repl_6_grout,
target_6_anchor, repl_6_anchor,
target_6_sheath, repl_6_sheath,
target_7_4_2, repl_7_4_2
)
targets_common = [
(target_2_8_7, repl_2_8_7),
(target_2_8_10, repl_2_8_10),
(target_2_11_5, repl_2_11_5),
(target_2_11_7, repl_2_11_7),
(target_4_4_4, repl_4_4_4),
(target_5_1_3, repl_5_1_3),
(target_5_1_8, repl_5_1_8),
(target_5_pbd1, repl_5_pbd1),
(target_5_pbd2, repl_5_pbd2),
(target_5_pbd3, repl_5_pbd3),
(target_5_base, repl_5_base),
(target_6_slip, repl_6_slip),
(target_6_socket, repl_6_socket),
(target_6_grout, repl_6_grout),
(target_6_anchor, repl_6_anchor),
(target_6_sheath, repl_6_sheath),
(target_7_4_2, repl_7_4_2),
]
match_count = sum(1 for t, r in targets_common if t in text_merged)
print(f"Common targets found in merged file: {match_count} / {len(targets_common)}")