dev-weiwei
This commit is contained in:
parent
cd4dcd5429
commit
ff02978fd3
|
|
@ -1,3 +1,3 @@
|
|||
api_base_url = "http://36.33.26.201:27861/v1"
|
||||
api_base_url = "http://10.138.55.50:7861/v1"
|
||||
api_key = 'EMPTY'
|
||||
model_name = 'qwen2.5-instruct'
|
||||
model_name = 'qwen2.5-32b-instruct'
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# constants.py
|
||||
SIMILARITY_VALUE = 0.7
|
||||
SIMILARITY_VALUE = 0.1
|
||||
#日期
|
||||
DATE = "date"
|
||||
#工程名称
|
||||
|
|
|
|||
62
api/main.py
62
api/main.py
|
|
@ -12,8 +12,8 @@ from constants import PROJECT_NAME, PROJECT_DEPARTMENT, SIMILARITY_VALUE
|
|||
|
||||
from config import *
|
||||
# 常量
|
||||
MODEL_ERNIE_PATH = R"E:\workingSpace\PycharmProjects\Intention_dev\ernie\output\checkpoint-4160"
|
||||
MODEL_UIE_PATH = R"E:\workingSpace\PycharmProjects\Intention_dev\uie\output\checkpoint-1740"
|
||||
MODEL_ERNIE_PATH = R"../ernie/output/checkpoint-4170"
|
||||
MODEL_UIE_PATH = R"../uie/output/checkpoint-1740"
|
||||
|
||||
# 类别名称列表
|
||||
labels = [
|
||||
|
|
@ -24,17 +24,18 @@ labels = [
|
|||
# 标签映射
|
||||
label_map = {
|
||||
0: 'O', # 非实体
|
||||
1: 'B-date', 12: 'I-date',
|
||||
2: 'B-project_name', 13: 'I-project_name',
|
||||
3: 'B-project_type', 14: 'I-project_type',
|
||||
4: 'B-construction_unit', 15: 'I-construction_unit',
|
||||
5: 'B-implementation_organization', 16: 'I-implementation_organization',
|
||||
6: 'B-project_department', 17: 'I-project_department',
|
||||
7: 'B-project_manager', 18: 'I-project_manager',
|
||||
8: 'B-subcontractor', 19: 'I-subcontractor',
|
||||
9: 'B-team_leader', 20: 'I-team_leader',
|
||||
10: 'B-risk_level', 21: 'I-risk_level',
|
||||
11: 'B-page', 22: 'I-page',
|
||||
1: 'B-date', 13: 'I-date',
|
||||
2: 'B-projectName', 14: 'I-projectName',
|
||||
3: 'B-projectType', 15: 'I-projectType',
|
||||
4: 'B-constructionUnit', 16: 'I-constructionUnit',
|
||||
5: 'B-implementationOrganization', 17: 'I-implementationOrganization',
|
||||
6: 'B-projectDepartment', 18: 'I-projectDepartment',
|
||||
7: 'B-projectManager', 19: 'I-projectManager',
|
||||
8: 'B-subcontractor', 20: 'I-subcontractor',
|
||||
9: 'B-teamLeader', 21: 'I-teamLeader',
|
||||
10: 'B-riskLevel', 22: 'I-riskLevel',
|
||||
11: 'B-page', 23: 'I-page',
|
||||
12: 'B-operating', 24: 'I-operating',
|
||||
}
|
||||
|
||||
# 初始化工具类
|
||||
|
|
@ -211,21 +212,21 @@ def agent():
|
|||
print(f"多轮意图识别后的label:{predicted_label}, id:{predicted_id},槽位抽取后的实体:{entities},message:{messages}")
|
||||
|
||||
# #必须槽位缺失检查
|
||||
# status, sk = check_lost(predicted_id, entities)
|
||||
# if status == CheckResult.NEEDS_MORE_ROUNDS:
|
||||
# return jsonify({"code": 10001, "msg": "成功",
|
||||
# "answer": { "miss": sk},
|
||||
# })
|
||||
#
|
||||
# #工程名和项目名标准化
|
||||
# print(f"start to check_project_standard_slot")
|
||||
# result, information = check_project_standard_slot(predicted_id, entities)
|
||||
# print(f"end check_project_standard_slot,{result},{information}")
|
||||
# if result == CheckResult.NEEDS_MORE_ROUNDS:
|
||||
# return jsonify({
|
||||
# "code": 10001, "msg": "成功",
|
||||
# "answer": {"miss": information},
|
||||
# })
|
||||
status, sk = check_lost(predicted_id, entities)
|
||||
if status == CheckResult.NEEDS_MORE_ROUNDS:
|
||||
return jsonify({"code": 10001, "msg": "成功",
|
||||
"answer": { "miss": sk},
|
||||
})
|
||||
|
||||
#工程名和项目名标准化
|
||||
print(f"start to check_project_standard_slot")
|
||||
result, information = check_project_standard_slot(predicted_id, entities)
|
||||
print(f"end check_project_standard_slot,{result},{information}")
|
||||
if result == CheckResult.NEEDS_MORE_ROUNDS:
|
||||
return jsonify({
|
||||
"code": 10001, "msg": "成功",
|
||||
"answer": {"miss": information},
|
||||
})
|
||||
|
||||
return jsonify({
|
||||
"code": 200,"msg": "成功",
|
||||
|
|
@ -238,6 +239,8 @@ def agent():
|
|||
return jsonify({"error": str(e)}), 500 # 捕捉其他错误并返回
|
||||
|
||||
|
||||
#用户多轮对话后,提取出去用户最想了解的问题
|
||||
#message格式如"messages":[{"role":"user","content":"今天合肥下塘变电站工程的作业内容是什么"},{"role":"assistant","content":"抱歉,您说的工程名是安徽合肥下塘220kV变电站新建工程吗"},{"role":"user","content":"不是"}]}
|
||||
def multi_slot_recognizer(intention_id, messages):
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url = api_base_url, api_key = api_key)
|
||||
|
|
@ -263,6 +266,7 @@ def multi_slot_recognizer(intention_id, messages):
|
|||
|
||||
return entries
|
||||
|
||||
#必须槽位缺失检查
|
||||
def check_lost(int_res, slot):
|
||||
#labels: ["天气查询","互联网查询","页面切换","日计划数量查询","周计划数量查询","日计划作业内容","周计划作业内容","施工人数","作业考勤人数","知识问答"]
|
||||
mapping = {
|
||||
|
|
@ -309,7 +313,7 @@ def check_lost(int_res, slot):
|
|||
return CheckResult.NEEDS_MORE_ROUNDS, f"{apologize_str}请问你想查询什么时间的{intention_mapping[int_res]}?"
|
||||
|
||||
|
||||
#标准化工程名
|
||||
#标准化工程名和项目部名称
|
||||
def check_project_standard_slot(int_res, slot) -> tuple:
|
||||
intention_list = {3, 4, 5, 6, 7, 8}
|
||||
if int_res not in intention_list:
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,108 @@
|
|||
[
|
||||
{ "text": "当前俄罗斯与乌克兰的局势如何?", "label": "互联网查询" },
|
||||
{ "text": "最近中国经济增长的最新数据是什么?", "label": "互联网查询" },
|
||||
{ "text": "中国和欧盟的贸易关系目前怎么样?", "label": "互联网查询" },
|
||||
{ "text": "美国总统大选的最新动态是什么?", "label": "互联网查询" },
|
||||
{ "text": "最近中东局势有没有新的变化?", "label": "互联网查询" },
|
||||
{ "text": "当前全球通胀情况如何?", "label": "互联网查询" },
|
||||
{ "text": "最近联合国有什么重要决议?", "label": "互联网查询" },
|
||||
{ "text": "中印边境局势最近有什么新进展?", "label": "互联网查询" },
|
||||
{ "text": "全球气候变化会议有哪些新的决策?", "label": "互联网查询" },
|
||||
{ "text": "当前中国房产市场的最新趋势是什么?", "label": "互联网查询" },
|
||||
{ "text": "最近中国对台政策有何新动向?", "label": "互联网查询" },
|
||||
{ "text": "北约最近有哪些重要的军事动态?", "label": "互联网查询" },
|
||||
{ "text": "中国最近在科技领域有哪些突破?", "label": "互联网查询" },
|
||||
{ "text": "全球供应链危机目前的状况如何?", "label": "互联网查询" },
|
||||
{ "text": "中国最近有哪些新的外交举措?", "label": "互联网查询" },
|
||||
{ "text": "最近美日韩三国的关系如何?", "label": "互联网查询" },
|
||||
{ "text": "当前中国对新能源汽车的政策是什么?", "label": "互联网查询" },
|
||||
{ "text": "全球能源价格目前的走势如何?", "label": "互联网查询" },
|
||||
{ "text": "中国在人工智能领域的最新进展是什么?", "label": "互联网查询" },
|
||||
{ "text": "东南亚局势最近有没有新的变化?", "label": "互联网查询" },
|
||||
{ "text": "当前全球移民政策的最新动向是什么?", "label": "互联网查询" },
|
||||
{ "text": "日本近期的经济政策有哪些变化?", "label": "互联网查询" },
|
||||
{ "text": "中国最新的军事实力发展情况如何?", "label": "互联网查询" },
|
||||
{ "text": "目前全球粮食安全形势如何?", "label": "互联网查询" },
|
||||
{ "text": "中国政府近期对房地产行业有哪些新规?", "label": "互联网查询" },
|
||||
{ "text": "当前国际原油价格走势如何?", "label": "互联网查询" },
|
||||
{ "text": "最近中美科技竞争的最新动态是什么?", "label": "互联网查询" },
|
||||
{ "text": "中国最近有哪些重大基建项目开工?", "label": "互联网查询" },
|
||||
{ "text": "当前非洲国家的经济发展趋势如何?", "label": "互联网查询" },
|
||||
{ "text": "最近中国在太空探索方面有哪些新进展?", "label": "互联网查询" },
|
||||
{
|
||||
"text": "关于百度的最新新闻是什么?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "关于美国加州大火的最新消息是什么?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "关于人工智能的最新发展是什么?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "最新的北京教育政策变化是什么",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "最新的北京旅游景点推荐。",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "最新的NBA比赛结果在哪里可以查看?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "2025年最新的科技新闻。",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "2025年最新的股票市场行情是什么",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "量子计算取得突破性进展是什么",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "人工智能国内的最新进展是什么",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国机器人最好的厂家有哪些",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "截止目前世界最富有的国家是哪一个",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "现在中非关系怎么样",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "现在世界格局是怎样的",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "现在中美关系的怎么样",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "现在欧盟有哪些国家",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "现在中国的世界关系是怎样的",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "哪吒闹海这个电影的放映时间是什么",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "李晨这个明星的最新动态是什么",
|
||||
"label": "互联网查询"
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"text": "当前俄乌冲突的最新进展如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "巴以冲突的现状如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "全球经济形势目前如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "美国对华最新政策有哪些变化?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国经济增长率最新数据是多少?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "近期有哪些重要的国际峰会?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国和欧盟的关系如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "当前中东局势如何发展?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "美国大选的最新动态是什么?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国在人工智能领域有哪些最新进展?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国和东盟国家的合作现状如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "全球气候变化的最新趋势是什么?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "当前全球通胀水平如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "北约近期有哪些新动态?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国与非洲国家的最新合作进展如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "世界能源市场当前状况如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中日韩关系近期有哪些变化?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "当前全球供应链的恢复情况如何?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "最近的国际热点事件有哪些?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "中国在国际事务中的影响力如何变化?",
|
||||
"label": "互联网查询"
|
||||
}
|
||||
|
|
@ -1,406 +0,0 @@
|
|||
[
|
||||
{
|
||||
"text": "明天滁州的气温相比今天是否更高?",
|
||||
"label": "天气查询"
|
||||
},
|
||||
{
|
||||
"text": "今天晚上宿州的温度会低于10°C吗?",
|
||||
"label": "天气查询"
|
||||
},
|
||||
{
|
||||
"text": "淮北明天的紫外线指数高吗?",
|
||||
"label": "天气查询"
|
||||
},
|
||||
{
|
||||
"text": "本周蚌埠的气温最低会达到多少?",
|
||||
"label": "天气查询"
|
||||
},
|
||||
{
|
||||
"text": "本周合肥的天气怎么样?",
|
||||
"label": "天气查询"
|
||||
},
|
||||
{
|
||||
"text": "2025年春节前合肥最低气温多少?",
|
||||
"label": "天气查询"
|
||||
},
|
||||
{
|
||||
"text": "什么是纳米技术?它在哪些领域有应用?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "海洋中的洋流是如何形成的?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "第一个登上月球的人是谁?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "二氧化硅在地壳中的含量大约是多少?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "什么是超级计算机?它的计算能力如何衡量?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "人工智能的发展历史是怎样的?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "世界上最早的印刷术是在哪个国家发明的?",
|
||||
"label": "互联网查询"
|
||||
},
|
||||
{
|
||||
"text": "请打开风险清册页面A工程的风险清册详情",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请进入风险管理应用界面。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请展示周风险推送(运检)模块中的历史作业计划。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请进入周计划应用界面。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请打开风险清册页面A工程的流程记录详情",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请打开日计划推送",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "进入日常计划执行情况统计模块。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请进入周风险推送(运检)模块,显示本周作业计划。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请打开周风险推送统计模块中的周风险推送",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请打开风险复测页面A工程的风险复测详情",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "请查看紧急任务管理模块。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "历史风险分析报表在哪里查看?",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "显示一下季度任务进展报表的情况。",
|
||||
"label": "页面切换"
|
||||
},
|
||||
{
|
||||
"text": "今天张三项目经理有多少项作业计划",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "上个月是否有超过50项二级风险作业计划?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "上周高风险作业计划总数是否超过了15项?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "今天5号工程有多少一级风险作业计划?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "明天3号工程是否有一级风险作业计划?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "今天所有项目中总共有多少项作业计划?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "明天赵六项目经理的作业计划是否会增加?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "今天的一级风险作业计划主要集中在哪些项目部?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "下个月作业计划的整体风险等级如何分布?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "今天田七项目经理负责的作业计划有哪些?",
|
||||
"label": "日计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "本周田七项目经理负责的一级风险作业计划施工完成率如何?",
|
||||
"label": "周计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "本周送变电一公司有多少项一级风险作业计划正在施工",
|
||||
"label": "周计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "本周3号工程有多少作业计划正在施工?",
|
||||
"label": "周计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "本周2号项目部正在施工的一级风险作业计划总共有多少?",
|
||||
"label": "周计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "本周5号工程的一级风险作业计划有多少在施工中?",
|
||||
"label": "周计划数量查询"
|
||||
},
|
||||
{
|
||||
"text": "今天2号项目部的作业内容主要是什么?",
|
||||
"label": "日计划作业内容"
|
||||
},
|
||||
{
|
||||
"text": "今天送变电二公司一级风险的作业内容有哪些?",
|
||||
"label": "日计划作业内容"
|
||||
},
|
||||
{
|
||||
"text": "今天送变电一公司一级风险的作业内容是什么",
|
||||
"label": "日计划作业内容"
|
||||
},
|
||||
{
|
||||
"text": "本周1号工程正在施工的作业内容是什么",
|
||||
"label": "周计划作业内容"
|
||||
},
|
||||
{
|
||||
"text": "本周送变电二公司施工中的一级风险作业内容有哪些?",
|
||||
"label": "周计划作业内容"
|
||||
},
|
||||
{
|
||||
"text": "本周2号项目部正在施工的作业内容是什么?",
|
||||
"label": "周计划作业内容"
|
||||
},
|
||||
{
|
||||
"text": "今天张三项目经理的施工人数是多少",
|
||||
"label": "施工人数"
|
||||
},
|
||||
{
|
||||
"text": "今天3号项目部的施工人员具体数量是多少?",
|
||||
"label": "施工人数"
|
||||
},
|
||||
{
|
||||
"text": "本周3号工程的施工人数合计是多少?",
|
||||
"label": "施工人数"
|
||||
},
|
||||
{
|
||||
"text": "本周张三项目经理正在施工的施工人数是多少",
|
||||
"label": "施工人数"
|
||||
},
|
||||
{
|
||||
"text": "本周4号工程一级风险施工的人数是多少?",
|
||||
"label": "施工人数"
|
||||
},
|
||||
{
|
||||
"text": "本周1号工程正在施工的一级风险的施工人数是多少",
|
||||
"label": "施工人数"
|
||||
},
|
||||
{
|
||||
"text": "本周送变电二公司一级风险的作业考勤人数有多少?",
|
||||
"label": "作业考勤人数"
|
||||
},
|
||||
{
|
||||
"text": "今天送变电三公司一级风险的作业考勤人数是多少?",
|
||||
"label": "作业考勤人数"
|
||||
},
|
||||
{
|
||||
"text": "本周2号工程作业考勤人数是多少?",
|
||||
"label": "作业考勤人数"
|
||||
},
|
||||
{
|
||||
"text": "本周1号工程作业的考勤人数总计是多少?",
|
||||
"label": "作业考勤人数"
|
||||
},
|
||||
{
|
||||
"text": "今天4号项目部的作业考勤人数是多少?",
|
||||
"label": "作业考勤人数"
|
||||
},
|
||||
{
|
||||
"text": "隧道开挖支护时,未按设计图纸控制开挖步距会带来什么后果?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "拆除线路时,未先核对线路名称并验电、挂接地线会带来什么风险?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "起重设备租赁合同中,双方的安全责任应如何明确?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在混凝土未达到拆模强度时进行拆模会带来哪些安全隐患?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "电缆绝缘耐压试验过程中更换试验引线时,未先对设备充分放电并且作业人员未戴好绝缘手套的隐患属于哪类?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "为什么马头门施工需要按照顺序进行?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "深基槽未制定边坡变形抢险预案可能带来哪些风险?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "公司在隐患排查治理方面的抽查和复核具体如何实施?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "为什么《输变电工程施工作业层班组标准化建设示范手册(试行)》和《基建安全质量“四不两直”检查标准化手册》的废止是必要的?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "如何落实《国家电网有限公司输变电工程建设施工作业层班组建设标准化手册》中的相关规定?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "提交评审的初步设计文件还需附带哪些相关意见或文件?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "培训基地的管理与使用如何由公司统筹,以最大化基地的作用和效益?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "盾构隧道施工中,未做好对管线和建(构)筑物的保护方案会对项目安全带来哪些威胁?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "如何确保考试过程中,所有考务服务环节能够按计划执行,达到预定目标?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "公司安委会在生产安全事故应急处置中的职责是什么?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "为什么需要结合输变电工程施工现场关键点作业安全管控措施、事故教训和检查问题来形成隐患清单?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "停电电缆线路切改施工时,未使用专用仪器进行判定并刺穿电缆,可能导致哪些危险?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在陡坡上进行边坡开挖作业时,未设置防护栏杆或系安全带属于哪类隐患?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "如何将“安全第一、预防为主、综合治理”的安全生产方针贯彻到施工作业层班组的培训过程中?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "对于远程视频评审形式,有哪些质量管控和安全管理的要求?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "为什么紧线段未设置临时拉线会被视为 I 类隐患?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在安全生产巡查中,公司安委办如何发现和解决突出问题?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "分解吊拆杆塔时,未让构件受力即拆除连接螺栓属于什么类型隐患?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "国网基建部在输变电工程初步设计审批管理中的主要职责有哪些?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在明开隧道施工中,吊运弃土所使用的设备为何需要自动卡紧保险装置?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "如果某单位安全生产问题频发,公司安委会将采取哪些应对措施?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "连墙件偏离主节点距离过大为何会被归为隐患?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在施工区域与运行部分未设置有效的安全隔离措施时,会带来哪些风险?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "国网基建部如何推动基于AR等新颖形式的培训素材开发,以提高培训效果?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "地市公司在输变电工程初步设计审批管理中的职责是什么?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "初步设计审定后,评审单位需在几天内向项目法人单位提交评审意见?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "为什么需要对隐患清单进行动态修编?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在执行新的安全管理手册时,如何解决实施过程中遇到的挑战和问题?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "第二批15家省公司在试点工作中应重点关注哪些方面?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "按照“三管三必须”原则,各部门在安全生产中应承担哪些责任?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在山区交通中,人员与设备混装属于哪类隐患?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "项目法人单位或建设管理单位在评审计划下达前需完成哪些内部工作?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "各单位如何根据实际情况确定培训计划安排,并确保按计划完成培训工作?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "如何按照考试大纲分专业分对象编制培训教材,确保内容的全面性和针对性?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "通知要求的“排查-评估-治理-验收销号”闭环管理机制如何在实际工作中应用?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "在2020年12月,国网基建部如何组织试点,完成1200人作业人员的培训考试?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "起重设备投入使用前,施工单位需要提供哪些相关资料以供监理单位审查?",
|
||||
"label": "知识问答"
|
||||
},
|
||||
{
|
||||
"text": "《国网基建部关于印发输变电工程施工作业层班组培训三年行动计划的通知》的主要目的是什么?",
|
||||
"label": "知识问答"
|
||||
}
|
||||
]
|
||||
17354
ernie/data/train.json
17354
ernie/data/train.json
File diff suppressed because it is too large
Load Diff
4754
ernie/data/val.json
4754
ernie/data/val.json
File diff suppressed because it is too large
Load Diff
|
|
@ -9,21 +9,37 @@ if not os.path.exists(directory):
|
|||
os.makedirs(directory)
|
||||
# 基础数据定义
|
||||
BASE_DATA = {
|
||||
"implementation_organizations": ["送电一分公司", "送电二分公司", "变电分公司", "建筑分公司", "消防分公司"],
|
||||
#实施组织
|
||||
"implementation_organizations": ["送电一分公司", "送电二分公司", "变电分公司", "消防分公司"],
|
||||
#工程性质
|
||||
"project_types": ["基建", "技改大修", "用户工程", "小型基建"],
|
||||
#工程名
|
||||
"project_names": [
|
||||
"国网北京检修公司2024年±500kV延庆换流站直流主设备年度检修维护",
|
||||
"合肥二电厂-彭郢π入长临河变电站220kV线路工程"
|
||||
"1号工程",
|
||||
"淮南芦集改造工程",
|
||||
"第十号工程",
|
||||
"合肥二电厂220kV线路工程",
|
||||
"九号工程",
|
||||
],
|
||||
#建管单位
|
||||
"construction_units": ["国网安徽省电力有限公司建设分公司", "国网安徽省电力有限公司马鞍山供电公司", "中铁二局集团电务工程有限公司"],
|
||||
"project_departments": ["第九项目管理部", "第十一项目管理部", "第八项目管理部"],
|
||||
#项目部名称
|
||||
"project_departments": ["第9项目管理部", "第十一项目部", "第八项目管理部","9号项目部"],
|
||||
#项目经理
|
||||
"project_managers": ["陈少平项目经理", "范文立项目经理", "何东洋项目经理"],
|
||||
|
||||
#分包单位
|
||||
"subcontractors": ["安徽劦力建筑装饰有限责任公司", "安徽苏亚建设集团有限公司"],
|
||||
#班组名称
|
||||
"team_names": ["张朵班组", "刘梁玉班组","魏玉龙班组"],
|
||||
#班组长
|
||||
"team_leaders": ["李元帅班组长", "刘雨豪班组长"],
|
||||
"risk_levels": ["1级", "2级", "3级", "4级", "5级"],
|
||||
"pages": ["风险管控", "日计划", "周风险" ,"日计划统计报表","日计划推送"],
|
||||
"operatings": ["8+2工况","8加2工况"]
|
||||
#风险等级
|
||||
"risk_levels": ["1级", "一级", "二级", "5级","四级"],
|
||||
#8+2工况
|
||||
"operatings": ["8+2工况","8加2工况"],
|
||||
#页面切换
|
||||
"pages": ["风险管控", "日计划", "周风险" ,"日计划统计报表","日计划推送"]
|
||||
|
||||
}
|
||||
|
||||
# 自然语言模板配置
|
||||
|
|
@ -32,14 +48,14 @@ TEMPLATE_CONFIG = {
|
|||
"date": ["今日", "昨日", "2024年5月24日", "5月24日","今天","昨天"],
|
||||
"templates": [
|
||||
("{date}{project_name}有多少作业计划?", ["date", "project_name"]),
|
||||
("{project_name}{date}有多少作业计划?", ["project_name","date"]),
|
||||
("{date}{project_type}类的作业计划有多少?", ["date", "project_type"]),
|
||||
("{project_name}{date}有多少项作业计划?", ["project_name","date"]),
|
||||
("工程性质是{project_type}{date}有多少作业计划?", ["project_type", "date"]),
|
||||
("{date}风险等级为{risk_level}的作业计划有多少?", ["date", "risk_level"]),
|
||||
("{date}工程性质为{project_type}的有多少作业计划?", ["date", "project_type"]),
|
||||
("工程性质为{project_type}的{date}有多少作业计划?", ["project_type", "date"]),
|
||||
("查询{project_name}在{date}的作业计划有多少?", ["project_name", "date"]),
|
||||
("工程性质为{project_type}{date}有多少作业计划?", ["project_type", "date"]),
|
||||
("{project_name}在{date}的作业计划数量", ["project_name", "date"]),
|
||||
("{date}{project_type}类作业计划有多少?", ["date", "project_type"]),
|
||||
("{project_type}类{date}作业计划有多少?", ["date", "project_type"]),
|
||||
("{project_type}类{date}作业计划有多少?", ["project_type", "date"]),
|
||||
("{construction_unit}在{date}有多少作业计划?", ["construction_unit", "date"]),
|
||||
("{date}{construction_unit}有多少作业计划?", ["date", "construction_unit"]),
|
||||
("{date}有多少作业计划?", ["date"]),
|
||||
|
|
@ -49,17 +65,19 @@ TEMPLATE_CONFIG = {
|
|||
|
||||
("{date}{implementation_organization}有多少作业计划?", ["date", "implementation_organization"]),
|
||||
("{date}{project_department}有多少作业计划?", ["date", "project_department"]),
|
||||
("{project_department}{date}有多少{risk_level}风险作业计划?", ["project_department","date","risk_level"]),
|
||||
|
||||
("{date}{project_manager}有多少作业计划?", ["date", "project_manager"]),
|
||||
("{date}{subcontractor}有多少作业计划?", ["date", "subcontractor"]),
|
||||
("{date}{team_leader}有多少作业计划?", ["date", "team_leader"]),
|
||||
("{date}风险等级为{risk_level}的作业计划有多少?", ["date", "risk_level"]),
|
||||
("{date}{project_department}有多少{risk_level}风险作业计划?", ["date","project_department", "risk_level"]),
|
||||
|
||||
("{date}{project_type}类中,风险等级为{risk_level}的作业计划有多少?",["date", "project_type", "risk_level"]),
|
||||
("{date}{construction_unit}中,风险等级为{risk_level}的计划有多少?",["date", "construction_unit", "risk_level"]),
|
||||
("{date}{project_type}类风险等级为{risk_level}的作业计划有多少?",["date", "project_type", "risk_level"]),
|
||||
("{date}{construction_unit}有多少{risk_level}风险作业计划?",["date", "construction_unit", "risk_level"]),
|
||||
|
||||
("{date}{project_type}类中,由{construction_unit}负责的作业计划有多少?",["date", "project_type", "construction_unit"]),
|
||||
("{date}{project_type}类中,由{implementation_organization}组织实施的作业计划有多少?",["date", "project_type", "implementation_organization"]),
|
||||
("{date}{project_type}类{construction_unit}负责的作业计划有多少?",["date", "project_type", "construction_unit"]),
|
||||
("{date}{project_type}类{implementation_organization}组织实施的作业计划有多少?",["date", "project_type", "implementation_organization"]),
|
||||
("{date}{project_department}管理的{project_type}类作业计划有多少?",["date", "project_department", "project_type"]),
|
||||
("{date}{subcontractor}承包的{project_type}类作业计划有多少?",["date", "subcontractor", "project_type"]),
|
||||
("{date}{project_manager}负责的{project_type}类作业计划有多少?",["date", "project_manager", "project_type"]),
|
||||
|
|
@ -68,6 +86,15 @@ TEMPLATE_CONFIG = {
|
|||
("{date}{project_name}中,风险等级为{risk_level}的作业计划有多少?", ["date", "project_name", "risk_level"]),
|
||||
("{date}{project_manager}作业计划有多少?", ["date","project_manager"]),
|
||||
("{project_manager}在{date}作业计划有多少?", ["project_manager", "date"]),
|
||||
|
||||
("{date}{project_manager}的作业计划数量", ["date","project_manager"]),
|
||||
("{project_manager}在{date}的作业计划数量", ["project_manager", "date"]),
|
||||
|
||||
#班组
|
||||
("{date}{team_name}有多少项作业计划?", ["date", "team_name"]),
|
||||
("{team_name}{date}有多少作业计划?", ["team_name","date"]),
|
||||
("{team_name}{date}作业计划数量", ["team_name","date"]),
|
||||
("{date}{team_name}作业计划数量", ["date","team_name"]),
|
||||
]
|
||||
},
|
||||
"周计划数量查询": {
|
||||
|
|
@ -80,7 +107,7 @@ TEMPLATE_CONFIG = {
|
|||
("{date}作业计划有多少?", ["date"]),
|
||||
|
||||
# 🎯 date + 其他单个维度
|
||||
("{date}{project_name}有多少作业计划?", ["date", "project_name"]),
|
||||
("{date}{project_name}有多少项作业计划?", ["date", "project_name"]),
|
||||
|
||||
("{date}{construction_unit}作业计划有多少?", ["date", "construction_unit"]),
|
||||
("{date}{implementation_organization}作业计划有多少?", ["date", "implementation_organization"]),
|
||||
|
|
@ -89,12 +116,15 @@ TEMPLATE_CONFIG = {
|
|||
("{date}{subcontractor}作业计划有多少?", ["date", "subcontractor"]),
|
||||
("{date}{team_leader}作业计划有多少?", ["date", "team_leader"]),
|
||||
|
||||
("{date}{project_department}作业计划数量", ["date", "project_department"]),
|
||||
("{date}{subcontractor}作业计划数量?", ["date", "subcontractor"]),
|
||||
|
||||
# 🎯 date + 风险维度
|
||||
|
||||
("{date}风险等级为{risk_level}的作业计划有多少?", ["date", "risk_level"]),
|
||||
("{date}有多少{risk_level}风险作业计划?", ["date", "risk_level"]),
|
||||
|
||||
# 🎯 date + construction_unit + risk_level
|
||||
("{date}{construction_unit}风险等级为{risk_level}的作业计划有多少?", ["date", "construction_unit", "risk_level"]),
|
||||
("{construction_unit}{date}有多少项{risk_level}风险作业计划", ["construction_unit", "date", "risk_level"]),
|
||||
|
||||
# 🎯 date + implementation_organization + risk_level
|
||||
("{date}{implementation_organization}风险等级为{risk_level}的作业计划有多少?",["date", "implementation_organization", "risk_level"]),
|
||||
|
|
@ -103,11 +133,17 @@ TEMPLATE_CONFIG = {
|
|||
("{date}{project_name}{project_manager}负责的作业计划有多少?", ["date", "project_name", "project_manager"]),
|
||||
|
||||
# 🎯 date + project_name + risk_level
|
||||
("{date}{project_name}中,风险等级为{risk_level}的作业计划有多少?", ["date", "project_name", "risk_level"]),
|
||||
("{date}{project_name}有多少项{risk_level}风险作业计划?", ["date", "project_name", "risk_level"]),
|
||||
|
||||
# 🎯 project_manager 维度
|
||||
("{project_manager}{date}作业计划数量?", ["project_manager", "date"]),
|
||||
("{project_manager}在{date}作业计划有多少?", ["project_manager", "date"]),
|
||||
("{project_manager}在{date}负责的风险等级为{risk_level}的作业计划有多少?", ["project_manager", "date", "risk_level"]),
|
||||
|
||||
("{date}{team_name}有多少项作业计划?", ["date", "team_name"]),
|
||||
("{team_name}{date}有多少作业计划?", ["team_name","date"]),
|
||||
("{team_name}{date}作业计划数量", ["team_name","date"]),
|
||||
("{date}{team_name}的作业计划数量", ["date","team_name"]),
|
||||
]
|
||||
},
|
||||
"日计划作业内容": {
|
||||
|
|
@ -116,6 +152,7 @@ TEMPLATE_CONFIG = {
|
|||
("{date}{project_name}作业内容是什么?", ["date", "project_name"]),
|
||||
("{project_name}在{date}作业内容是什么", ["project_name", "date"]),
|
||||
("{date}{project_type}类作业内容是什么?", ["date", "project_type"]),
|
||||
("{project_type}类{date}作业内容是什么?", ["project_type", "date"]),
|
||||
("{date}工程性质为{project_type}的作业内容是什么?", ["date", "project_type"]),
|
||||
("工程性质为{project_type}的{date}作业内容是什么?", ["project_type", "date"]),
|
||||
("{construction_unit}在{date}作业内容是什么?", ["construction_unit", "date"]),
|
||||
|
|
@ -125,6 +162,9 @@ TEMPLATE_CONFIG = {
|
|||
# 3. 查询特定日期和项目类型的工程计划
|
||||
("{date}{project_type}类计划作业内容是什么?", ["date", "project_type"]),
|
||||
|
||||
("{date}{construction_unit}{risk_level}风险的作业内容是什么?",["date", "construction_unit", "risk_level"]),
|
||||
|
||||
("{date}{implementation_organization}{risk_level}风险的作业内容是什么?",["date", "implementation_organization", "risk_level"]),
|
||||
|
||||
# 5. 查询特定日期和项目经理的任务安排
|
||||
("{project_manager}在{date}作业内容是什么?", ["project_manager", "date"]),
|
||||
|
|
@ -139,11 +179,13 @@ TEMPLATE_CONFIG = {
|
|||
("{team_leader}在{date}作业内容是什么?", ["team_leader", "date"]),
|
||||
|
||||
# 9. 查询特定日期和项目类型下的高风险任务
|
||||
("{date}的{project_type}类中,风险等级为{risk_level}的作业内容是什么?", ["date", "project_type", "risk_level"]),
|
||||
("{date}的{project_type}类风险等级为{risk_level}的作业内容是什么?", ["date", "project_type", "risk_level"]),
|
||||
|
||||
# 10. 查询特定日期和风险等级的任务安排
|
||||
("{date}风险等级为{risk_level}的作业内容是什么?", ["date", "risk_level"]),
|
||||
|
||||
("{date}有多少项{risk_level}风险作业计划?", ["date", "risk_level"]),
|
||||
|
||||
# 11. 查询特定日期和施工单位的任务进展
|
||||
("{construction_unit}在{date}作业内容是什么?", ["construction_unit", "date"]),
|
||||
|
||||
|
|
@ -158,6 +200,9 @@ TEMPLATE_CONFIG = {
|
|||
|
||||
# 16. 查询特定日期和项目进度
|
||||
("{date}{project_name}作业内容是什么?", ["date", "project_name"]),
|
||||
#班组
|
||||
("{date}{team_name}作业内容是什么?", ["date", "team_name"]),
|
||||
("{team_name}{date}作业内容", ["team_name","date"]),
|
||||
]
|
||||
},
|
||||
"周计划作业内容": {
|
||||
|
|
@ -186,10 +231,11 @@ TEMPLATE_CONFIG = {
|
|||
("{team_leader}在{date}作业内容是什么?", ["team_leader", "date"]),
|
||||
|
||||
# 9. 查询某项目类型在指定周的高风险作业内容
|
||||
("{date}的{project_type}类中,风险等级为{risk_level}的作业内容是什么?", ["date", "project_type", "risk_level"]),
|
||||
("{date}的{project_type}类并且风险等级为{risk_level}的作业内容是什么?", ["date", "project_type", "risk_level"]),
|
||||
|
||||
# 10. 查询某风险等级在指定周的作业内容
|
||||
("{date}风险等级为{risk_level}的作业内容是什么?", ["date", "risk_level"]),
|
||||
("{date}{risk_level}风险的作业内容是什么?", ["date", "risk_level"]),
|
||||
|
||||
# 11. 查询某施工单位在指定周的作业进展
|
||||
("{construction_unit}在{date}作业内容是什么?", ["construction_unit", "date"]),
|
||||
|
|
@ -199,6 +245,9 @@ TEMPLATE_CONFIG = {
|
|||
|
||||
# 15. 查询某项目部门在指定周的作业安排
|
||||
("{project_department}在{date}作业内容是什么?", ["project_department", "date"]),
|
||||
|
||||
("{date}{team_name}作业内容是什么", ["date", "team_name"]),
|
||||
("{team_name}{date}作业内容", ["team_name","date"]),
|
||||
]
|
||||
},
|
||||
"施工人数": {
|
||||
|
|
@ -256,6 +305,11 @@ TEMPLATE_CONFIG = {
|
|||
# 22. 统计某施工单位在指定周的高风险作业人员数量
|
||||
("{construction_unit}{date}风险等级为{risk_level}的施工人数是多少?", ["construction_unit", "date", "risk_level"]),
|
||||
|
||||
("{date}{team_name}施工人数是多少", ["date", "team_name"]),
|
||||
("{date}{team_name}施工人数", ["date","team_name"]),
|
||||
("{team_name}{date}施工人数是多少", ["team_name","date"]),
|
||||
("{team_name}{date}施工人数", ["team_name","date"]),
|
||||
|
||||
]
|
||||
},
|
||||
"作业考勤人数": {
|
||||
|
|
@ -263,8 +317,8 @@ TEMPLATE_CONFIG = {
|
|||
"templates": [
|
||||
("{date}{project_name}作业考勤人数是多少", ["date", "project_name"]),
|
||||
("{project_name}{date}作业考勤人数是多少", ["project_name", "date"]),
|
||||
("查询{subcontractor}{date}的出勤记录", ["subcontractor", "date"]),
|
||||
("查询{subcontractor}{date}的作业考勤人数是多少", ["subcontractor", "date"]),
|
||||
("查询{subcontractor}{date}的考勤人数", ["subcontractor", "date"]),
|
||||
("{subcontractor}{date}的作业考勤人数是多少", ["subcontractor", "date"]),
|
||||
("{date}属于{operating}的作业考勤人数是多少?", ["date", "operating"]),
|
||||
("{team_leader}{date}的作业考勤人数是多少", ["team_leader", "date"]),
|
||||
# 4. 统计某施工单位在指定日期的考勤人数
|
||||
|
|
@ -284,11 +338,13 @@ TEMPLATE_CONFIG = {
|
|||
|
||||
# 11. 查询某分包商在指定周的出勤情况
|
||||
("{subcontractor}在{date}的出勤情况如何?", ["subcontractor", "date"]),
|
||||
|
||||
("{date}{team_name}考勤人数是多少", ["date", "team_name"]),
|
||||
("{team_name}{date}考勤人数", ["team_name","date"]),
|
||||
]
|
||||
},
|
||||
"页面切换": {
|
||||
"date": ["本周", "上周", "过去一周", "最近一周", "本周内", "这一周", "上个星期", "这个星期", "今日", "昨日",
|
||||
"2024年5月24日", "5月24日", "24日", "周一"],
|
||||
"date": ["今日", "昨日", "2024年5月24日", "5月24日", "今天", "昨天"],
|
||||
"templates": [
|
||||
("打开{page}页面", ["page"]),
|
||||
("打开{page}", ["page"]),
|
||||
|
|
@ -296,24 +352,18 @@ TEMPLATE_CONFIG = {
|
|||
("进入{page}", ["page"]),
|
||||
("进入{page}模块", ["page"]),
|
||||
("进入{page}页面", ["page"]),
|
||||
("查看{page}", ["page"]),
|
||||
("查看{page}模块", ["page"]),
|
||||
("查看{page}页面", ["page"]),
|
||||
("跳转到{page}", ["page"]),
|
||||
("跳转到{page}模块", ["page"]),
|
||||
("跳转到{page}页面", ["page"]),
|
||||
("访问{page}页面", ["page"]),
|
||||
("访问{page}模块", ["page"]),
|
||||
("访问{page}", ["page"]),
|
||||
("显示{page}模块", ["page"]),
|
||||
("显示{page}", ["page"]),
|
||||
("请打开{page}模块", ["page"]),
|
||||
("请打开{page}", ["page"]),
|
||||
("显示{page}页面", ["page"]),
|
||||
("加载{page}模块", ["page"]),
|
||||
("加载{page}", ["page"]),
|
||||
("加载{page}页面", ["page"]),
|
||||
("查询{page}模块", ["page"]),
|
||||
("查询{page}", ["page"]),
|
||||
("查询{page}页面", ["page"]),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -334,7 +384,8 @@ def generate_natural_samples(config, label):
|
|||
"project_department": BASE_DATA["project_departments"],
|
||||
"project_manager": BASE_DATA["project_managers"],
|
||||
"page": BASE_DATA["pages"],
|
||||
"operating": BASE_DATA["operatings"]
|
||||
"operating": BASE_DATA["operatings"],
|
||||
"team_name": BASE_DATA["team_names"]
|
||||
}
|
||||
|
||||
for template, variables in config["templates"]:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ def preprocess_function(example, tokenizer):
|
|||
entity_types = [
|
||||
'date', 'project_name', 'project_type', 'construction_unit',
|
||||
'implementation_organization', 'project_department', 'project_manager',
|
||||
'subcontractor', 'team_leader', 'risk_level','page'
|
||||
'subcontractor', 'team_leader', 'risk_level','page','team_name'
|
||||
]
|
||||
|
||||
# 文本 Tokenization
|
||||
|
|
|
|||
Loading…
Reference in New Issue