浏览代码

产品属性提取修复

znj 1 年之前
父节点
当前提交
fedce9ce35
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      BiddingKG/dl/interface/predictor.py

+ 2 - 2
BiddingKG/dl/interface/predictor.py

@@ -3491,9 +3491,9 @@ class ProductAttributesPredictor():
 
                             if product == "":
                                 # print(deal_list[id4],deal_list[id5],tmp_head_list,deal_list)
-                                if deal_list[id4] != "" or deal_list[id5] != "":
+                                if (id4 != "" and deal_list[id4] != "") or (id5 != "" and deal_list[id5] != ""):
                                     for head,value in zip(tmp_head_list,deal_list):
-                                        if value in product_entity_list:
+                                        if value and value in product_entity_list:
                                             product = value
                                             break