6.13提交,语义处理测试
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from chains_lab import Problem_rewrite
|
||||
|
||||
problem_rewrite = Problem_rewrite()
|
||||
|
||||
from vector_lab import intersection_of_three_lists
|
||||
|
||||
# input_str1 = "杆塔总基数是多少?"
|
||||
# input_str2 = "单回路长度是多少?"
|
||||
# input_str3 = "计算一下角钢塔的塔材装材费"
|
||||
# input_str4 = "计算一下土石方总量"
|
||||
# input_str5 = "板式塔基的各类基础数量占总塔基数比例是多少?"
|
||||
# input_str6 = "基础混凝土总量是多少"
|
||||
# input_str7 = "计算一下本体工程机械费"
|
||||
# ipout_str8 = "项目建设技术服务费合计"
|
||||
|
||||
input_str = "项目建设技术服务费合计是多少?"
|
||||
results = intersection_of_three_lists(input_str)
|
||||
|
||||
retriever = intersection_of_three_lists(input_str)[0]
|
||||
|
||||
print(f"输入:{input_str}")
|
||||
|
||||
keywords = problem_rewrite.invoke({"query":input_str, "retriever":retriever})
|
||||
|
||||
print(f"输出:{keywords}")
|
||||
|
||||
|
||||
import json
|
||||
|
||||
with open('./data/data.json', 'r', encoding='utf-8') as file:
|
||||
data = json.load(file)
|
||||
|
||||
from utils import find_target_item, find_target_items, pre_mapping, pre_mapping2
|
||||
|
||||
input_neo4j = pre_mapping2(keywords, data)
|
||||
|
||||
print(f"检索目标:{input_neo4j}")
|
||||
Reference in New Issue
Block a user