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>
15 lines
680 B
Python
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")
|