Commit 4e418107 by lichenggang

增加静态的category, 固定逻辑对列进行判断前去掉占位符

parent 47957ad9
Showing with 5 additions and 4 deletions
......@@ -99,17 +99,18 @@ class DicPredict(BasePredictor):
temp_pre_model_res = {}
ab_result = {}
for k, v in dic_data.items():
no_null_v = list(filter(lambda x: x != self.PLACEHOLDER, v))
bol = self.v_chain(v)
if self.is_seq(v):
if self.is_seq(no_null_v):
ab_result[k] = '序号'
continue
if self.is_num(v):
if self.is_num(no_null_v):
temp_pre_model_res[k] = '数量'
continue
if bol:
prob_columns.append(k)
continue
if self.is_catecol(v):
if self.is_catecol(no_null_v):
temp_pre_model_res[k] = '类别'
continue
not_null_dic_data = {k: list(filter(lambda x: x != self.PLACEHOLDER, dic_data[k])) for k in prob_columns}
......
......@@ -32,4 +32,4 @@ CATEGORY = ["半导体", "嵌入式", "光电子", "光源", "无源", "连接
"铰接件", "盖塞与遮蔽", "支撑脚和轮", "型材与座", "减震器", "轴承", "把手", "直线导轨", "技术密封", "切换夹具和夹紧螺栓", "边缘保护套", "磁铁", "报警器",
"分线盒", "变送器", "调制与控制", "气动", "螺线管", "启动器", "阀门和汇流板", "空气设备", "仪表", "气动配件", "测量", "软焊和焊接设备", "PCB原型制作与生产",
"化学制剂", "工具", "防静电保护", "健康与安全", "收音机和CB用框架及半框架", "扬声器罩,前面板固定座", "排线", "电机控制模块", "微型电动机", "底板", "3D打印机",
"RTV服务", "配件", "三极管"]
"RTV服务", "配件", "三极管", '钽电容', 'MOS管', '芯片', '器件', '模组', '接线', '按键']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment