18 lines
957 B
Python
18 lines
957 B
Python
"""Write labels.jsonl: input labels kept as is, except WILDSTRUBEL-199 corrected (battery not full at the 30/10 return)."""
|
|
import json
|
|
D = "labeling/auto/analyses/long-labels/WILDSTRUBEL/"
|
|
out = []
|
|
for line in open(D + "input.jsonl"):
|
|
l = json.loads(line)
|
|
if l["id"] == "WILDSTRUBEL-199":
|
|
old = "come back only on 30/10 in the evening, the battery full, with daytime images on 31/10, still without a displacement measurement."
|
|
new = ("come back only on 30/10 in the evening, the battery well charged but not full; it is full only on 31/10 in the morning, "
|
|
"with daytime images on 31/10, still without a displacement measurement until that evening.")
|
|
assert old in l["description"]
|
|
l["description"] = l["description"].replace(old, new)
|
|
l.pop("review", None)
|
|
out.append(l)
|
|
with open(D + "labels.jsonl", "w") as f:
|
|
for l in out:
|
|
f.write(json.dumps(l, ensure_ascii=False) + "\n")
|