Search before asking
Operating system information
Linux
What happened
KAG/kag/builder/component/extractor/schema_free_extractor.py 中 SchemaFreeExtractor 的 _invoke 方法
triples = (self.triples_extraction(passage, filtered_entities),) 将triples 封装为了tuple,但是在后续循环中这里需要一个三元组的list
for tri in triples:
if tri is None or len(tri) != 3:
这导致所有的关系全被被吞,无法使用同步方法抽取正常关系组。而异步方法则能正确拿到triples
triples, std_entities = await asyncio.gather(
self.atriples_extraction(passage, filtered_entities),
self.anamed_entity_standardization(passage, filtered_entities),
)
这里的triples则为三元组的list
How to reproduce
正常构建kag,使用同步方法正常运行,无法抽取关系
Are you willing to submit PR?
Search before asking
Operating system information
Linux
What happened
KAG/kag/builder/component/extractor/schema_free_extractor.py 中 SchemaFreeExtractor 的 _invoke 方法
triples = (self.triples_extraction(passage, filtered_entities),) 将triples 封装为了tuple,但是在后续循环中这里需要一个三元组的list
for tri in triples:
if tri is None or len(tri) != 3:
这导致所有的关系全被被吞,无法使用同步方法抽取正常关系组。而异步方法则能正确拿到triples
triples, std_entities = await asyncio.gather(
self.atriples_extraction(passage, filtered_entities),
self.anamed_entity_standardization(passage, filtered_entities),
)
这里的triples则为三元组的list
How to reproduce
正常构建kag,使用同步方法正常运行,无法抽取关系
Are you willing to submit PR?