Commit fadba796 by lichenggang

暂时让数量列阈值为0.5

parent 4bef8d18
Showing with 4 additions and 6 deletions
......@@ -11,9 +11,8 @@ from utils.log_manager import get_logger
from utils.robots import dd_send_msg
import pandas as pd
from static_config import *
from utils.status import StatusCode, code2msg
# 数量列阈值
RIGHT_LEVEL = 0.7
RIGHT_LEVEL = 0.5
# 序号列阈值
SEQ_LEVEL = 0.5
# 类别列阈值
......@@ -96,7 +95,6 @@ class BasePredictor(metaclass=ClassBasePredictorMeta):
"""
数量列预测
"""
def isNumberCol(kw):
"""
是否是数量列辅助函数
......@@ -292,6 +290,6 @@ class BasePredictor(metaclass=ClassBasePredictorMeta):
return round(count / len(data), 3) >= SIMPLE_ENCAP_LEVEL
if __name__ == "__main__":
print(BasePredictor.is_num(['1k','1k','1k','1k']))
print(BasePredictor.is_num(['数量', 1000]))
print(re.match(r'(\d+|\d+(\.\d+))($|(K)|[个十百千万])$', '1k', re.M | re.I))
\ No newline at end of file
# print(re.match(r'(\d+|\d+(\.\d+))($|(K)|[个十百千万])$', '1k', re.M | re.I))
\ No newline at end of file
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