Initial support for "_", "|_" et "…|" in label names

This commit is contained in:
2026-05-08 22:20:54 +02:00
parent 26d02b0987
commit 8d9165d0ac
4 changed files with 84 additions and 41 deletions
+4 -3
View File
@@ -5,9 +5,10 @@ def natural_key(text):
return [int(c) if c.isdigit() else c.lower() for c in re.split(r'(\d+)', str(text))]
def read_all_labels(base_dir):
return sorted(list(filter(None,
(Path(base_dir) / "labels").read_text().splitlines())),
key = natural_key)
# return sorted(list(filter(None,
# (Path(base_dir) / "labels").read_text().splitlines())),
# key = natural_key)
return list(filter(None, (Path(base_dir) / "labels").read_text().splitlines()))
def enonce_total(base_dir):
text_dir = Path(base_dir) / 'Text'