From 300f2366ae73b099c6090a5b91e4b0834fe21e09 Mon Sep 17 00:00:00 2001 From: Anenokil <89277740+Anenokil@users.noreply.github.com> Date: Tue, 4 Mar 2025 03:14:06 +0300 Subject: [PATCH] Bugfix: incorrect filepathes in process_scitsr.py --- scripts/process_scitsr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/process_scitsr.py b/scripts/process_scitsr.py index 3732d5c2b..d68d5e296 100644 --- a/scripts/process_scitsr.py +++ b/scripts/process_scitsr.py @@ -1419,7 +1419,7 @@ def main(): structure_filepaths = [os.path.join(data_directory, "train", "structure", elem) for elem in train_structure_files] structure_filepaths += [os.path.join(data_directory, "test", "structure", elem) for elem in test_structure_files] - with open(os.path.join(data_directory, "train", "structure", structure_filepaths[1]), 'r') as infile: + with open(structure_filepaths[1], 'r') as infile: data = json.load(infile) splits_by_filepath = dict() @@ -1454,7 +1454,7 @@ def main(): split = splits_by_filepath[structure_filepath] try: - with open(os.path.join(data_directory, "train", "structure", structure_filepath), 'r') as infile: + with open(structure_filepath, 'r') as infile: data = json.load(infile) data['cells'] = sorted(sorted(data['cells'], key=lambda x: x['start_col']), key=lambda x: x['start_row']) table_dict = create_table_dict(data) @@ -1908,4 +1908,4 @@ def main(): del doc # Just removes from memory, not from disk if __name__ == "__main__": - main() \ No newline at end of file + main()