Files
Support-Agent/labeling/auto/etiqueteur/JUNGFRAU_2026-10-06/outils/ajoute.py
T
maximeandClaude Opus 5.5 6fbd7510b7 Etiqueteur: October labels for 8 stations; its folder moves to labeling/auto/etiqueteur/, analyses and scripts versioned (D-126)
Labels for CLARIDEN, FLORIDA, JUNGFRAU (gaps 06-20.10, 26.10-01.11), LENZSPITZE,
NIEDERHORN, NORDEND, SNCF01, WILDSTRUBEL. Figures and tool outputs stay out of git.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 16:33:41 +01:00

15 lines
680 B
Python

"""Ajoute à labeling/auto/JUNGFRAU.jsonl les étiquettes d'un fichier TSV (debut, fin, categorie, description)."""
import json, sys
FAM = {"Visibility", "Obstruction", "Thermal displacement", "Displacement", "Target issue", "No data"}
lignes = []
for l in open(sys.argv[1], encoding="utf-8"):
if not l.strip():
continue
d, f, c, t = l.rstrip("\n").split("\t")
assert c in FAM and d < f, l
lignes.append(json.dumps({"debut": d, "fin": f, "categorie": c, "description": t}, ensure_ascii=False))
with open("labeling/auto/JUNGFRAU.jsonl", "a", encoding="utf-8") as o:
for x in lignes:
o.write(x + "\n")
print(len(lignes), "étiquettes ajoutées")