فهرست منبع

提取到其他包,去掉 Project包 里面的中标角色

lsm 2 سال پیش
والد
کامیت
d56e148957
2فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 1 1
      BiddingKG/dl/interface/extract.py
  2. 4 1
      BiddingKG/dl/interface/getAttributes.py

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

@@ -277,7 +277,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-04-21'}
+    version_date = {'version_date': '2023-04-23'}
     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)
     data_res["doctitle_refine"] = doctitle_refine
     data_res["nlp_enterprise"] = nlp_enterprise

+ 4 - 1
BiddingKG/dl/interface/getAttributes.py

@@ -3496,7 +3496,10 @@ def update_prem(old_prem, new_prem):
                     for d2 in v['roleList']:
                         if d2 not in tmp_l: # 把新预测有,旧没有的角色添加上去
                             old_prem[k]['roleList'].append(d2)
-
+        if len(old_prem)>1 and 'Project' in old_prem:
+            for d in old_prem['Project']['roleList']:
+                if d['role_name'] in ['win_tenderer', 'second_tenderer', 'third_tenderer']:
+                    old_prem['Project']['roleList'].remove(d) # 提取到其他包,去掉 project 里面的中标角色
     # return old_prem
 
 def fix_single_source(prem, channel_dic, original_docchannel):