Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions backend/Segmenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:

Expand Down Expand Up @@ -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:
Expand Down