liuhuanyong / EventTriplesExtraction

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, 基于依存句法与语义角色标注的事件三元组抽取,可用于文本理解如文档主题链,事件线等应用。
916 stars 220 forks source link

baidu_svo_extract.py 文件 28 行代码有误 #15

Open CrazyJackPeng opened 2 years ago

CrazyJackPeng commented 2 years ago
        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: