新增字段1
This commit is contained in:
parent
232c7e850d
commit
d3fff825de
@ -118,6 +118,7 @@ def chkworlkandtime(listdata):
|
|||||||
'duty': duty
|
'duty': duty
|
||||||
}
|
}
|
||||||
ress.append(str(date))
|
ress.append(str(date))
|
||||||
|
|
||||||
return ress
|
return ress
|
||||||
|
|
||||||
|
|
||||||
@ -337,7 +338,7 @@ def get_date(schema, dates, schema_dict):
|
|||||||
|
|
||||||
work_exp = date['work_exp']
|
work_exp = date['work_exp']
|
||||||
if not work_exp:
|
if not work_exp:
|
||||||
date['work_exp'] = 0
|
work_exp = 0
|
||||||
# 工作经验float转化
|
# 工作经验float转化
|
||||||
if work_exp and isinstance(work_exp, str):
|
if work_exp and isinstance(work_exp, str):
|
||||||
true_work_exp = re.search(r"\d+\.?\d*", work_exp)
|
true_work_exp = re.search(r"\d+\.?\d*", work_exp)
|
||||||
@ -345,7 +346,8 @@ def get_date(schema, dates, schema_dict):
|
|||||||
work_exp = 0
|
work_exp = 0
|
||||||
else:
|
else:
|
||||||
work_exp = float(true_work_exp.group())
|
work_exp = float(true_work_exp.group())
|
||||||
|
if work_exp <= 0:
|
||||||
|
date['work_exp'] = 0
|
||||||
if 1 <= work_exp < 3:
|
if 1 <= work_exp < 3:
|
||||||
date['work_exp'] = 1
|
date['work_exp'] = 1
|
||||||
if 3 <= work_exp < 5:
|
if 3 <= work_exp < 5:
|
||||||
@ -576,7 +578,6 @@ def fmtList(txtlist, dates):
|
|||||||
if ischk:
|
if ischk:
|
||||||
continue
|
continue
|
||||||
# 取出工作经验里面的公司名和时间
|
# 取出工作经验里面的公司名和时间
|
||||||
work_list = []
|
|
||||||
if len(work) > 0:
|
if len(work) > 0:
|
||||||
works = ''
|
works = ''
|
||||||
for i in work:
|
for i in work:
|
||||||
@ -585,10 +586,11 @@ def fmtList(txtlist, dates):
|
|||||||
ie = Taskflow('information_extraction', schema=schema)
|
ie = Taskflow('information_extraction', schema=schema)
|
||||||
text_lists = ie(works)
|
text_lists = ie(works)
|
||||||
work_list = chkworlkandtime(text_lists)
|
work_list = chkworlkandtime(text_lists)
|
||||||
|
if not work_list:
|
||||||
|
work_list = ["{'company_name ': '测试公司','position_name': '测试职位','duty': '测试职责'}"]
|
||||||
else:
|
else:
|
||||||
work_list = ["{'company_name ': '','position_name': '','duty': ''}"]
|
work_list = ["{'company_name ': '测试公司','position_name': '测试职位','duty': '测试职责'}"]
|
||||||
# 取出获奖经历里面的公司名和时间
|
# 取出获奖经历里面的公司名和时间
|
||||||
remembrance_list = []
|
|
||||||
if len(remembrance) > 0:
|
if len(remembrance) > 0:
|
||||||
remembrances = ''
|
remembrances = ''
|
||||||
for i in remembrance:
|
for i in remembrance:
|
||||||
@ -597,10 +599,11 @@ def fmtList(txtlist, dates):
|
|||||||
ie = Taskflow('information_extraction', schema=schema)
|
ie = Taskflow('information_extraction', schema=schema)
|
||||||
text_lists = ie(remembrances)
|
text_lists = ie(remembrances)
|
||||||
remembrance_list = chkworlkandtime2(text_lists)
|
remembrance_list = chkworlkandtime2(text_lists)
|
||||||
|
if not remembrance_list:
|
||||||
|
remembrance_list = ["{'prize_name ': '测试奖项', 'prize_time': '2022-08-26'}"]
|
||||||
else:
|
else:
|
||||||
remembrance_list = ["{'prize_name ': '', 'prize_time': '', }"]
|
remembrance_list = ["{'prize_name ': '测试奖项', 'prize_time': '2022-08-26'}"]
|
||||||
# 取出语言能力里面的语言,掌握程度,听说,读写
|
# 取出语言能力里面的语言,掌握程度,听说,读写
|
||||||
language_list = []
|
|
||||||
if len(language) > 0:
|
if len(language) > 0:
|
||||||
works = ''
|
works = ''
|
||||||
for i in work:
|
for i in work:
|
||||||
@ -609,8 +612,10 @@ def fmtList(txtlist, dates):
|
|||||||
ie = Taskflow('information_extraction', schema=schema)
|
ie = Taskflow('information_extraction', schema=schema)
|
||||||
text_lists = ie(works)
|
text_lists = ie(works)
|
||||||
language_list = chkworlkandtime1(text_lists)
|
language_list = chkworlkandtime1(text_lists)
|
||||||
|
if not language_list:
|
||||||
|
language_list = ["{'language_name ': '测试语言', 'has_sleep ': '好', 'reading': '听说', 'writing': '读写'}"]
|
||||||
else:
|
else:
|
||||||
language_list = ["{'language_name ': '', 'has_sleep ': '', 'reading': '', 'writing': ''}"]
|
language_list = ["{'language_name ': '测试语言', 'has_sleep ': '好', 'reading': '听说', 'writing': '读写'}"]
|
||||||
# review自我评价, project项目经验,work工作经验,work具体工作的公司和时间,upgrade教育经历,specialty技能特长
|
# review自我评价, project项目经验,work工作经验,work具体工作的公司和时间,upgrade教育经历,specialty技能特长
|
||||||
dates.update({
|
dates.update({
|
||||||
'review': review,
|
'review': review,
|
||||||
|
Loading…
Reference in New Issue
Block a user