You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
664 B

5 months ago
from K1_KnowledgeGraph import *
from K2_Neo4jExecutor import *
if __name__ == '__main__':
# 准备执行
executor = K2_Neo4jExecutor(
uri=NEO4J_URI,
auth=NEO4J_AUTH
)
# 测试用例
test_content = '''
题目一个长方体的长是8厘米宽是5厘米高是3厘米求它的表面积是多少平方厘米
'''
try:
kg = KnowledgeGraph(test_content)
success, cypher = kg.run()
res = executor.execute_cypher_text(cypher)
print("恭喜,执行数据插入完成!")
except Exception as e:
print(f"程序初始化失败: {str(e)}")