v13-f1 Task 1.12: organizeSelect + location + areaSelect 0 误差 (72/72 PASS)

This commit is contained in:
ssw committed 2026-06-11 22:27:35 +08:00
1 parent 5a8f218e0d
commit b824fb80ae
16 files changed
+784

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""从 35 form baseline 提取所有 areaSelect 控件的 formData 真实样本.
areaSelect 控件判定: __config__.jnpfKey == 'areaSelect'."""
import json, glob, os
OUT = "scripts/areaSelect-baseline-samples.jsonl"
samples = []
for path in glob.glob("/home/ubuntu/ccWorkDir/baseline/*/form/*.json"):
try:
d = json.load(open(path))['data']
fd = json.loads(d['formData']) if isinstance(d.get('formData'), str) else {}
for f in fd.get('fields', []):
if isinstance(f, dict):
cfg = f.get('__config__', {})
if isinstance(cfg, dict) and cfg.get('jnpfKey') == 'areaSelect':
samples.append({
"source": os.path.basename(path),
"label": f.get('label') or cfg.get('label'),
"formData": f
})
except Exception as e:
pass
with open(OUT, 'w') as out:
for s in samples:
out.write(json.dumps(s, ensure_ascii=False) + "\n")
print(f"Extracted {len(samples)} areaSelect 控件 samples to {OUT}")