|
@@ -2043,7 +2043,7 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
if entity.label in [2, 3, 4] and distance>=20:
|
|
|
break
|
|
|
# 角色为中标候选人,排除"质疑|投诉|监督|受理"相关的联系人
|
|
|
- if entity.label in [2, 3, 4] and re.search("纪检|监察|质疑|投诉|监督|受理|项目(单位)?联系", list_sentence[after_entity.sentence_index].sentence_text[max(0,after_entity.wordOffset_begin - 10):after_entity.wordOffset_begin]):
|
|
|
+ if entity.label in [2, 3, 4] and re.search("纪检|监察|质疑|投诉|监督|受理|项目(单位)?联系|(采购|招标)人?联系", list_sentence[after_entity.sentence_index].sentence_text[max(0,after_entity.wordOffset_begin - 10):after_entity.wordOffset_begin]):
|
|
|
break
|
|
|
# 角色为招标/代理人,排除"纪检|监察"相关的联系人
|
|
|
if entity.label in [0,1] and re.search("纪检|监察",list_sentence[after_entity.sentence_index].sentence_text[max(0,after_entity.wordOffset_begin - 10):after_entity.wordOffset_begin]):
|
|
@@ -2953,7 +2953,7 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
if t_person.person_phone:
|
|
|
_phone = [p.entity_text for p in t_person.person_phone]
|
|
|
for _p in _phone:
|
|
|
- if t_person.entity_text not in exist_person and _p not in exist_phone:
|
|
|
+ if t_person.entity_text not in exist_person and _p not in ",".join(exist_phone):
|
|
|
tenderee_agency_role[0].linklist.append((t_person.entity_text, _p))
|
|
|
get_contacts = True
|
|
|
break
|
|
@@ -2963,7 +2963,7 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
if not get_contacts:
|
|
|
sentence_phone = phone.findall(outline.outline_text)
|
|
|
if sentence_phone:
|
|
|
- if sentence_phone[0] not in exist_phone:
|
|
|
+ if sentence_phone[0] not in ",".join(exist_phone):
|
|
|
tenderee_agency_role[0].linklist.append(("", sentence_phone[0]))
|
|
|
get_contacts = True
|
|
|
break
|
|
@@ -2974,14 +2974,14 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
if _entity.person_phone:
|
|
|
_phone = [p.entity_text for p in _entity.person_phone]
|
|
|
for _p in _phone:
|
|
|
- if _entity.entity_text not in exist_person and _p not in exist_phone:
|
|
|
+ if _entity.entity_text not in exist_person and _p not in ",".join(exist_phone):
|
|
|
tenderee_agency_role[0].linklist.append((_entity.entity_text, _p))
|
|
|
get_contacts = True
|
|
|
break
|
|
|
if not get_contacts:
|
|
|
# 如果文中只有一个“phone”实体,则直接取为联系人电话
|
|
|
if len(phone_entitys) == 1:
|
|
|
- if phone_entitys[0].entity_text not in exist_phone:
|
|
|
+ if phone_entitys[0].entity_text not in ",".join(exist_phone):
|
|
|
tenderee_agency_role[0].linklist.append(("", phone_entitys[0].entity_text))
|
|
|
get_contacts = True
|
|
|
if not get_contacts:
|
|
@@ -2993,7 +2993,7 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
if re.search("联系人|联系方|联系方式|联系电话|电话|负责人|与.{2,4}联系", sentence_outline):
|
|
|
sentence_phone = phone.findall(temp_sentence)
|
|
|
if sentence_phone:
|
|
|
- if sentence_phone[0] in [ent.entity_text for ent in phone_entitys] and sentence_phone[0] not in exist_phone:
|
|
|
+ if sentence_phone[0] in [ent.entity_text for ent in phone_entitys] and sentence_phone[0] not in ",".join(exist_phone):
|
|
|
tenderee_agency_role[0].linklist.append(("", sentence_phone[0]))
|
|
|
get_contacts = True
|
|
|
break
|
|
@@ -3008,11 +3008,11 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
for _pattern in contact_pattern_list:
|
|
|
get_tenderee_contacts = False
|
|
|
for regular_match in re.finditer(_pattern, _content):
|
|
|
- match_text = _content[regular_match.end():regular_match.end() + 40]
|
|
|
+ match_text = _content[regular_match.end():regular_match.end() + 50]
|
|
|
match_text = match_text.split("。")[0]
|
|
|
sentence_phone = phone.findall(match_text)
|
|
|
if sentence_phone:
|
|
|
- if sentence_phone[0] not in exist_phone:
|
|
|
+ if sentence_phone[0] not in ",".join(exist_phone):
|
|
|
tenderee_agency_role[0].linklist.append(("", sentence_phone[0]))
|
|
|
get_tenderee_contacts = True
|
|
|
break
|