lorenzoscottb commited on
Commit
4be9695
Β·
verified Β·
1 Parent(s): a7187dd

Update graph_utils.py

Browse files
Files changed (1) hide show
  1. graph_utils.py +3 -3
graph_utils.py CHANGED
@@ -12,9 +12,9 @@ def get_graph_dict(graph_text):
12
 
13
  else:
14
  try:
15
- for trpl in graph_text[1:-1].split(" | "):
16
- h,r,t = trpl[1:-1].split(" # ")
17
- edge_labels[(h,t)] = r
18
  except:
19
  edge_labels = {("Error", None):None}
20
  return edge_labels
 
12
 
13
  else:
14
  try:
15
+ for trpl in graph_text[1:-1].split(", "):
16
+ h,r,t = trpl.split(" : ")
17
+ edge_labels[(h,t)] = "_".join(r.split(" "))
18
  except:
19
  edge_labels = {("Error", None):None}
20
  return edge_labels