You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for arc_index in range(len(rel_id)):
if rel_id[arc_index] == index+1: #arcs的索引从1开始
if rel_id[arc_index] in child_dict:
child_dict[relation[arc_index]].append(arc_index)
else:
child_dict[relation[arc_index]] = []
child_dict[relation[arc_index]].append(arc_index)
应该为
for arc_index in range(len(rel_id)):
if rel_id[arc_index] == index+1: #arcs的索引从1开始
if relation[arc_index] in child_dict:
child_dict[relation[arc_index]].append(arc_index)
else:
child_dict[relation[arc_index]] = []
child_dict[relation[arc_index]].append(arc_index)
误将 if relation[arc_index] in child_dict: 写为 if rel_id[arc_index] in child_dict:
The text was updated successfully, but these errors were encountered:
应该为
for arc_index in range(len(rel_id)):
if rel_id[arc_index] == index+1: #arcs的索引从1开始
if relation[arc_index] in child_dict:
child_dict[relation[arc_index]].append(arc_index)
else:
child_dict[relation[arc_index]] = []
child_dict[relation[arc_index]].append(arc_index)
误将 if relation[arc_index] in child_dict: 写为 if rel_id[arc_index] in child_dict:
The text was updated successfully, but these errors were encountered: