|
@@ -52,7 +52,7 @@ class DocumentPreReview():
|
|
|
''' Clause number content judgment
|
|
|
商务 技术 报价 评审 评分 标准
|
|
|
'''
|
|
|
- scrutinize_tuple = ("商务","技术","报价","评审","评分","标准")
|
|
|
+ scrutinize_tuple = ("商务","技术","报价","评审","评分","标准","部分")
|
|
|
hit_num = 0
|
|
|
for scru in scrutinize_tuple:
|
|
|
if scru in tag: hit_num+= 1
|
|
@@ -155,6 +155,8 @@ class DocumentPreReview():
|
|
|
scrutinize_second_title_len = 0
|
|
|
scrutinize_sign = False
|
|
|
|
|
|
+ weight_comp = re.compile("(\d+%)")
|
|
|
+
|
|
|
regulation_number_index_,evaluation_factor_index,evaluation_criteria_index,weights_index = 0,0,0,0
|
|
|
|
|
|
for partial_form in all_tables:
|
|
@@ -208,6 +210,10 @@ class DocumentPreReview():
|
|
|
if tag and self._scrutinize_judge(tag):
|
|
|
tag_sign_ = tag
|
|
|
if tag_sign_ not in scrutinize_dict: scrutinize_dict[tag_sign_] = []
|
|
|
+ if len(table) >= weights_index:
|
|
|
+ weighr_finder = weight_comp.findall(table[-1])
|
|
|
+ if weighr_finder: table.append(weighr_finder[0])
|
|
|
+ else: table.append('3%')
|
|
|
evaluation_factor,evaluation_criteria,weights = table[evaluation_factor_index],table[evaluation_criteria_index],table[weights_index]
|
|
|
if not weights: value = {"评分因素":evaluation_factor.strip().replace("\n",""),"评分标准":evaluation_criteria.strip().replace("\n","")}
|
|
|
else: value = {"评分因素":evaluation_factor.strip().replace("\n",""),
|
|
@@ -246,6 +252,10 @@ class DocumentPreReview():
|
|
|
if tag and self._scrutinize_judge(tag):
|
|
|
tag_sign_ = tag
|
|
|
if tag_sign_ not in scrutinize_dict: scrutinize_dict[tag_sign_] = []
|
|
|
+ if len(table) >= weights_index:
|
|
|
+ weighr_finder = weight_comp.findall(table[-1])
|
|
|
+ if weighr_finder: table[weights_index] = weighr_finder[0]
|
|
|
+ else: table[weights_index] = '3%'
|
|
|
evaluation_factor,evaluation_criteria,weights = table[evaluation_factor_index],table[evaluation_criteria_index],table[weights_index]
|
|
|
if not weights: value = {"评分因素":evaluation_factor.strip().replace("\n",""), "评分标准":evaluation_criteria.strip().replace("\n","")}
|
|
|
else: value = {"评分因素":evaluation_factor.strip().replace("\n",""),
|
|
@@ -278,6 +288,10 @@ class DocumentPreReview():
|
|
|
if tag and self._scrutinize_judge(tag):
|
|
|
tag_sign_ = tag
|
|
|
if tag_sign_ not in scrutinize_dict: scrutinize_dict[tag_sign_] = []
|
|
|
+ if len(table) >= weights_index:
|
|
|
+ weighr_finder = weight_comp.findall(table[-1])
|
|
|
+ if weighr_finder: table[weights_index] = weighr_finder[0]
|
|
|
+ else: table[weights_index] = '3%'
|
|
|
evaluation_factor,evaluation_criteria,weights = table[evaluation_factor_index],table[evaluation_criteria_index],table[weights_index]
|
|
|
if not weights: value = {"评分因素":evaluation_factor.strip().replace("\n",""), "评分标准":evaluation_criteria.strip().replace("\n","")}
|
|
|
else: value = {"评分因素":evaluation_factor.strip().replace("\n",""),
|
|
@@ -305,7 +319,7 @@ if __name__ == '__main__':
|
|
|
# scrutinize_dict = dpr.get_table() # TODO scrutinize_dict是需要的结果
|
|
|
# break
|
|
|
|
|
|
- path_ = "data/清标详审数据/2023-2024年度乌东德电站图像监控系统及广播系统扩建-table(1).json"
|
|
|
+ path_ = "data/清标详审数据/溪洛渡水电站3台东电机组推导轴承密封更换-table.json"
|
|
|
dpr = DocumentPreReview(path_)
|
|
|
scrutinize_dict = dpr.get_table()
|
|
|
|