From 141dd873312339d1c0ac13044cc42a5f5870c3b3 Mon Sep 17 00:00:00 2001 From: debelatesfaye Date: Wed, 19 Mar 2025 21:32:27 +0000 Subject: [PATCH] Stop tracking IBM.h5 with Git LFS --- backend/Segmenter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/Segmenter.py b/backend/Segmenter.py index 3090c4d..5ae5e87 100644 --- a/backend/Segmenter.py +++ b/backend/Segmenter.py @@ -55,7 +55,8 @@ def get_next_max_id(self, nodes, n_type): # Initialize a variable to store the maximum node ID found so far max_id = 0 lef_n_id, right_n_id = 0, "" - + if len(nodes) == 0: + return 0 if isinstance(nodes[0][n_type],str): if "_" in nodes[0][n_type]: @@ -368,7 +369,7 @@ def cascading_anaphora_propositionalizer(self, path): is_json_file=self.is_json(path) if is_json_file: data = open(path).read() - extended_json_aif = json.loads(data) + extended_json_aif = eval(data) json_aif = json_dict = extended_json_aif['AIF'] if 'nodes' in json_dict and 'locutions' in json_dict and 'edges' in json_dict: