|
@@ -3189,11 +3189,11 @@ def getTimeAttributes(list_entity,list_sentence):
|
|
# 2023/9/13 新增合同相关时间
|
|
# 2023/9/13 新增合同相关时间
|
|
if re.search("合同|服务|履[约行]", entity_left2):
|
|
if re.search("合同|服务|履[约行]", entity_left2):
|
|
if len(extract_time) == 1:
|
|
if len(extract_time) == 1:
|
|
- if re.search("(合同.{,2}签[订定署].{,2}|签[订定署].{,2}合同.{,2})(?:时间|日期)", entity_left2):
|
|
|
|
|
|
+ if re.search("(合同.{,2}签[订定署].{,2}|签[订定署].{,2}合同.{,2})(?:时间|日期)|合同签[订定署].{,1}$", entity_left2):
|
|
dict_time['time_signContract'].append((extract_time[0], 0.5, in_attachment))
|
|
dict_time['time_signContract'].append((extract_time[0], 0.5, in_attachment))
|
|
last_time_type = 'time_signContract'
|
|
last_time_type = 'time_signContract'
|
|
elif re.search("(?:合同|服务|履约|(合同|服务)履行)(?:期限?|有效期)|(?:服务|履约|(合同|服务)履行)(?:时间|日期|周期)|服务[时年]限|合同周期", entity_left2):
|
|
elif re.search("(?:合同|服务|履约|(合同|服务)履行)(?:期限?|有效期)|(?:服务|履约|(合同|服务)履行)(?:时间|日期|周期)|服务[时年]限|合同周期", entity_left2):
|
|
- if re.search("到|至|-|截[至止]",entity_left) or re.search("前|止|截止",entity_right) or re.search("前",entity_text[-2:]):
|
|
|
|
|
|
+ if re.search("到|至|截[至止]",entity_left) or re.search("前|止|截止",entity_right) or re.search("前",entity_text[-2:]):
|
|
dict_time['time_contractEnd'].append((extract_time[0], 0.5, in_attachment))
|
|
dict_time['time_contractEnd'].append((extract_time[0], 0.5, in_attachment))
|
|
last_time_type = 'time_contractEnd'
|
|
last_time_type = 'time_contractEnd'
|
|
else:
|
|
else:
|
|
@@ -3211,7 +3211,7 @@ def getTimeAttributes(list_entity,list_sentence):
|
|
dict_time['time_contractEnd'].append((extract_time[1], 0.6, in_attachment))
|
|
dict_time['time_contractEnd'].append((extract_time[1], 0.6, in_attachment))
|
|
last_time_type = ''
|
|
last_time_type = ''
|
|
|
|
|
|
- if re.search("至|到", entity_left):
|
|
|
|
|
|
+ if re.search("至|到|[日\d][-—]$", entity_left):
|
|
if entity.sentence_index == last_sentence_index:
|
|
if entity.sentence_index == last_sentence_index:
|
|
time_type = last_time_index.get(last_time_type)
|
|
time_type = last_time_index.get(last_time_type)
|
|
if time_type:
|
|
if time_type:
|