|
@@ -1601,7 +1601,10 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
if (_subject.label==0 and _object.entity_text in agency_contact ) or (_subject.label==1 and _object.entity_text in tenderee_contact):
|
|
|
continue
|
|
|
# 角色为中标候选人,排除"质疑|投诉|监督|受理"相关的联系人
|
|
|
- if _subject.label in [2,3,4] and re.search("质疑|投诉|监督|受理|项目(单位)?联系|^联系人|请.{0,4}联系",list_sentence[_object.sentence_index].sentence_text[max(0,_object.wordOffset_begin-10):_object.wordOffset_begin]):
|
|
|
+ if _subject.label in [2,3,4] and re.search("纪检|监察|质疑|投诉|监督|受理|项目(单位)?联系|^联系人|请.{0,4}联系",list_sentence[_object.sentence_index].sentence_text[max(0,_object.wordOffset_begin-10):_object.wordOffset_begin]):
|
|
|
+ continue
|
|
|
+ # 角色为招标/代理人,排除"纪检|监察"相关的联系人
|
|
|
+ if _subject.label in [0,1] and re.search("纪检|监察",list_sentence[_object.sentence_index].sentence_text[max(0,_object.wordOffset_begin - 10):_object.wordOffset_begin]):
|
|
|
continue
|
|
|
if _object.sentence_index!=0 and _object.wordOffset_begin<=10:
|
|
|
if _subject.label in [2, 3, 4] and re.search("请.{0,4}联系",
|
|
@@ -2034,7 +2037,10 @@ 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]):
|
|
|
break
|
|
|
if after_entity.sentence_index != 0 and after_entity.wordOffset_begin <= 10:
|
|
|
if entity.label in [2, 3, 4] and re.search("请.{0,5}联系",
|
|
@@ -2119,7 +2125,7 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
new_split_list[split_index][1]:
|
|
|
mid_sentence = mid_sentence[max(0, phone_begin - 15):phone_begin].replace(",", "")
|
|
|
if re.search(key_phone, mid_sentence):
|
|
|
- if entity.label in [2, 3, 4] and re.search("质疑|投诉|监督|受理|项目(单位)?联系",mid_sentence[-8:]):
|
|
|
+ if entity.label in [2, 3, 4] and re.search("纪检|监察|质疑|投诉|监督|受理|项目(单位)?联系",mid_sentence[-8:]):
|
|
|
pass
|
|
|
else:
|
|
|
distance = 1
|
|
@@ -2172,7 +2178,7 @@ def findAttributeAfterEntity(PackDict,roleSet,PackageList,PackageSet,list_senten
|
|
|
p_phone = [p.entity_text for p in next_entity.person_phone] if next_entity.person_phone else []
|
|
|
if next_entity.entity_type == 'person' and _phone in p_phone:
|
|
|
pass
|
|
|
- elif entity.label in [2, 3, 4] and re.search("质疑|投诉|监督|受理|项目(单位)?联系", mid_sentence[-8:]):
|
|
|
+ elif entity.label in [2, 3, 4] and re.search("纪检|监察|质疑|投诉|监督|受理|项目(单位)?联系", mid_sentence[-8:]):
|
|
|
pass
|
|
|
else:
|
|
|
distance = (tokens_num_dict[
|