(path: str, data: dict)
| 119 | |
| 120 | |
| 121 | def append_jsonl(path: str, data: dict) -> None: |
| 122 | os.makedirs(os.path.dirname(path), exist_ok=True) |
| 123 | with open(path, "a", encoding="utf-8") as f: |
| 124 | f.write(json.dumps(data, ensure_ascii=False) + "\n") |
| 125 | |
| 126 | |
| 127 | def load_processed_ids(path_save: str) -> set: |