|
@@ -812,7 +812,7 @@ class PREMPredict():
|
|
|
text_sen = sentence.sentence_text
|
|
|
b = entity.wordOffset_begin
|
|
|
e = entity.wordOffset_end
|
|
|
- text_list.append((text_sen[max(0, b - 13):b], text_sen[b:e], text_sen[e:e + 10]))
|
|
|
+ text_list.append((text_sen[max(0, b - 13):b], text_sen[b:e], text_sen[e:e + 15]))
|
|
|
#item_x = embedding(spanWindow(tokens=sentence.tokens,begin_index=entity.begin_index,end_index=entity.end_index,size=settings.MODEL_MONEY_INPUT_SHAPE[1]),shape=settings.MODEL_MONEY_INPUT_SHAPE)
|
|
|
#item_x = embedding_word(spanWindow(tokens=sentence.tokens, begin_index=entity.begin_index, end_index=entity.end_index, size=10, center_include=True, word_flag=True),shape=settings.MODEL_MONEY_INPUT_SHAPE)
|
|
|
item_x = self.model_money.encode(tokens=sentence.tokens,begin_index=entity.begin_index,end_index=entity.end_index)
|
|
@@ -947,7 +947,7 @@ class PREMPredict():
|
|
|
elif re.search('^为\w{,10}第二(成交|中标)单位', behind): # 中标预测错误,例:601143888 河南省创慧新材料科技有限公司为铸咀采购项目第二成交单位
|
|
|
label = 3
|
|
|
values[3] = 0.5
|
|
|
- elif re.search('中标单位,$', front):
|
|
|
+ elif re.search('中标单位,$|被确定为$', front): # 632523961 现通知:贵司被确定为广州地铁传媒有限公司贵阳地铁广告媒体服务项目(2025年)的执行单位。
|
|
|
label = 5
|
|
|
elif re.search('^为预备中标单位', behind):
|
|
|
label = 3
|
|
@@ -1053,7 +1053,7 @@ class PREMPredict():
|
|
|
values[label] = 0.5
|
|
|
elif re.search('[\+=]((中标|成交)(金?额|价格?)|[若如]果?(中标|成交)(金?额|价格?)为?', front): # 处理例如 241561780 如中标金额为 500-1000万元,则代理服务费=100 万元×0.5%+400万元×0.35%+(中标金额-500)万元
|
|
|
values[label] = 0.49
|
|
|
- elif re.search('^(以[上下])?按[\d.%]+收取|^及?以[上下]|^[()]?[+×*-][\d.%]+', behind):
|
|
|
+ elif re.search('^(以[上下])?按[\d.%]+收取|^及?以[上下]|^[()]?[+×*-][\d.%]+|服务招标费率|招标代理服务收费', behind[:20]): # 修复 628951835
|
|
|
values[label] = 0.49
|
|
|
elif re.search('(含|在|包括|[大小等高低]于|达到)$|[\d.%]+[+×*-]$', front):
|
|
|
values[label] = 0.49
|
|
@@ -1531,7 +1531,7 @@ class RoleRulePredictor():
|
|
|
self.pattern_thirdTenderer_left = "(?P<thirdTenderer_left>(第[三3]名?(名|((中标|中选|中价|成交|候选)(候选)?(人|单位|机构|供应商|公司|银行))))(名称)?[::是为]+$|((评审结果|名次|排名|排序)[::]第?[三3]名?,?(投标(供应)?商|供应商)(名称)?[::]+$))"
|
|
|
self.pattern_thirdTenderer_right = "(?P<thirdTenderer_right>^[是为\(]第[三3](名|(中标|中选|中价|成交)(候选)?(人|单位|机构|供应商|公司|银行)))"
|
|
|
|
|
|
- self.candidate_left = "(?P<candidate_left>(((中[标选商]|成交|入围|入选)候选|投标)(人|单位|机构|中介(服务)?机构|供应商|客户|方|公司|厂商|商家?|社会资本方?|银行)|服务单位|候选企业)(:?单位名称|:?名称|全称|(?盖\w{,5}章)?|如下|:?牵头人|[及与和](成交|中标)金额)?[::是为【]+$)"
|
|
|
+ self.candidate_left = "(?P<candidate_left>(((中[标选商]|成交|入围|入选)?候选|投标)(人|单位|机构|中介(服务)?机构|供应商|客户|方|公司|厂商|商家?|社会资本方?|银行)|服务单位|候选企业)(:?单位名称|:?名称|全称|(?盖\w{,5}章)?|如下|:?牵头人|[及与和](成交|中标)金额)?[::是为【]+$)"
|
|
|
|
|
|
self.pattern_left = [
|
|
|
self.pattern_tenderee_left_60,
|
|
@@ -1637,7 +1637,7 @@ class RoleRulePredictor():
|
|
|
if _label == 5:
|
|
|
_label, _prob, keyword = self.ser_role(self.pattern_right, after, entity_text) # 后文匹配
|
|
|
keyword = "right_" + keyword if keyword!="" else keyword
|
|
|
- if _label==5 and re.search('(中标|中选|成交)?)(结果)?(公告|公示|通知书?),', before) and re.match(':', after):
|
|
|
+ if _label==5 and re.search('(中标|中选|成交)?|谈判结果)(结果)?(公告|公示|通知书?),', before) and re.match(':', after): # 632523961 直接谈判结果通知书,广东金钥匙智能包装科技有限公司:经广州地铁传媒有限公司
|
|
|
_label = 2
|
|
|
_prob = 0.5
|
|
|
_flag = False if _label==5 else True
|
|
@@ -1939,6 +1939,8 @@ class RoleRulePredictor():
|
|
|
break
|
|
|
elif re.search('合同价暂定为?$', _span[0]): # 20250310 修复 598504921 合同价暂定 为招标金额
|
|
|
break
|
|
|
+ elif re.search('^(以[上下])?按[\d.%]+收取|^及?以[上下]|^[()]?[+×*-][\d.%]+|服务招标费率|招标代理服务收费', _span[2][:20]):
|
|
|
+ break
|
|
|
if re.search(self.pattern_money_other, _span[0]) is not None:
|
|
|
if re.search(self.pattern_money_tenderer, _span[0]).span()[1] > \
|
|
|
re.search(self.pattern_money_other, _span[0]).span()[1]:
|
|
@@ -8684,7 +8686,7 @@ class EntityTypeRulePredictor():
|
|
|
if k == 'addr_contact' and re.search('中标|成交|中选|代理|供应商', sentance_text[max(0, b-12):]):
|
|
|
continue
|
|
|
v = v.replace('[:为]', '')
|
|
|
- if re.search(v, sentance_text[max(0, b-10): b]) and len(entity.entity_text)>2:
|
|
|
+ if re.search(v, sentance_text[max(0, b-10): b]) and len(entity.entity_text)>=2: # 修复 621226337 项目所在地:重庆, 漏提
|
|
|
addr_dic[k] = entity.entity_text
|
|
|
elif entity.entity_type == 'time':
|
|
|
b = entity.wordOffset_begin
|