Explorar o código

修复表格非表格提取结果合并的bug

lsm hai 1 ano
pai
achega
f1bbb08f4d

+ 1 - 1
BiddingKG/dl/interface/extract.py

@@ -342,7 +342,7 @@ def predict(doc_id,text,title="",page_time="",web_source_no='',web_source_name="
 
     # data_res = Preprocessing.union_result(Preprocessing.union_result(codeName, prem),list_punish_dic)[0]
     # data_res = Preprocessing.union_result(Preprocessing.union_result(Preprocessing.union_result(codeName, prem),list_punish_dic), list_channel_dic)[0]
-    version_date = {'version_date': '2023-12-01'}
+    version_date = {'version_date': '2023-12-18'}
     data_res = dict(codeName[0], **prem[0], **channel_dic, **product_attrs[0], **product_attrs[1], **payment_way_dic, **fail_reason, **industry, **district, **candidate_dic, **version_date)
 
     '''最终检查修正招标、中标金额'''

+ 0 - 7
BiddingKG/dl/interface/getAttributes.py

@@ -3772,13 +3772,6 @@ def update_prem(old_prem, new_prem):
             for k in del_k:
                 old_prem.pop(k)
 
-        if 'Project' in old_prem:
-            for d in old_prem['Project']['roleList']:
-                if d['role_name'] in ['tenderee', 'agency']:
-                    tenderree_ = d['role_text']
-                    if tenderree_ in str(new_prem) and re.search('公司', tenderree_):
-                        old_prem['Project']['roleList'].remove(d) # 如果旧预测的招标人/代理人在表格预测里面去掉,防止错误召回,以表格提取的为准
-
         for k, v in new_prem.items():
             if k == 'Project':
                 if 'Project' in old_prem: