| 776 | |
| 777 | |
| 778 | def export(path: str | Path | None = None) -> None: |
| 779 | out = Path(path) if path else Path(__file__).parent.parent / "data" / "handcrafted_b8.jsonl" |
| 780 | out.parent.mkdir(parents=True, exist_ok=True) |
| 781 | with out.open("w", encoding="utf-8") as f: |
| 782 | for case in ALL_B8: |
| 783 | json.dump(case, f, ensure_ascii=False) |
| 784 | f.write("\n") |
| 785 | from collections import Counter |
| 786 | tiers = Counter(c["expected_tier"] for c in ALL_B8) |
| 787 | langs = Counter(c["lang"] for c in ALL_B8) |
| 788 | cats = Counter(c["category"] for c in ALL_B8) |
| 789 | print(f"Batch 8: {len(ALL_B8)} cases → {out}") |
| 790 | print(f" Tiers: {dict(tiers)}") |
| 791 | print(f" Languages: {len(langs)} — {dict(langs)}") |
| 792 | print(f" Categories: {len(cats)}") |
| 793 | |
| 794 | |
| 795 | if __name__ == "__main__": |