An experiment and demo-level tool for text information extraction (event-triples extraction), which can be a route to the event chain and topic graph, 基于依存句法与语义角色标注的事件三元组抽取,可用于文本理解如文档主题链,事件线等应用。
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:
应该为 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: