lorenzoscottb commited on
Commit
abd18ef
β€’
1 Parent(s): 8fd6eff

Update graph_utils.py

Browse files
Files changed (1) hide show
  1. graph_utils.py +1 -0
graph_utils.py CHANGED
@@ -14,6 +14,7 @@ def get_graph_dict(graph_text):
14
  try:
15
  for trpl in graph_text[1:-1].split("), ("):
16
  h,r,t = trpl.split(" : ")
 
17
  edge_labels.append((h,t, "_".join(r.split(" "))))
18
  except:
19
  edge_labels.append(("Error", None, None))
 
14
  try:
15
  for trpl in graph_text[1:-1].split("), ("):
16
  h,r,t = trpl.split(" : ")
17
+ if t == "none": t = h
18
  edge_labels.append((h,t, "_".join(r.split(" "))))
19
  except:
20
  edge_labels.append(("Error", None, None))