Commit 0ca4aa9a by lichenggang

Merge branches 'dev' and 'master' of http://119.23.72.7/lic/bom_identify

parents a7896917 86fecc50
Showing with 7 additions and 1 deletions
......@@ -75,7 +75,13 @@ class BasePredictor:
else:
return False
collect_num = [kw for kw in data if isinstance(kw, int) or isinstance(kw, float) or isNumberCol(str(kw))]
collect_num = []
for kw in data:
if isinstance(kw, int) or isinstance(kw, float) or isNumberCol(str(kw)):
if str(kw)[:1] == '0':
return False
collect_num.append(kw)
rate = round(len(collect_num) / len(data), 3)
return True if rate >= RIGHT_LEVEL else False
......
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