Procházet zdrojové kódy

产品属性数字提取添加限制

znj před 2 roky
rodič
revize
981eada6f8
1 změnil soubory, kde provedl 9 přidání a 2 odebrání
  1. 9 2
      BiddingKG/dl/interface/predictor.py

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

@@ -2894,6 +2894,9 @@ class ProductAttributesPredictor():
                                         if ser:
                                             quantity = str(ser.group(1))
                                             quantity_unit = ser.group(2)
+                                            if float(quantity)>=10000*10000:
+                                                quantity = ""
+                                                quantity_unit = ""
                                         else:
                                             quantity = ""
                                             quantity_unit = ""
@@ -2915,7 +2918,10 @@ class ProductAttributesPredictor():
                                             _unitPrice = re_price[0]
                                             if '万元' in header_list[2] and '万' not in _unitPrice:
                                                 _unitPrice += '万元'
-                                            unitPrice = str(getUnifyMoney(_unitPrice))
+                                            unitPrice = getUnifyMoney(_unitPrice)
+                                            if unitPrice>=10000*10000:
+                                                unitPrice = ""
+                                            unitPrice = str(unitPrice)
                                 if id4 != "":
                                     if re.search('\w', deal_list[id4]):
                                         brand = deal_list[id4]
@@ -2940,7 +2946,8 @@ class ProductAttributesPredictor():
                                             if '万元' in header_list2[2] and '万' not in _budget:
                                                 _budget += '万元'
                                             budget = str(getUnifyMoney(_budget))
-
+                                            if float(budget)>= 100000*10000:
+                                                budget = ""
                                 if id8 != "":
                                     if re.search('\w', deal_list[id8]):
                                         order_time = deal_list[id8].strip()