简历解析加固:标签字间空格容错(姓 名 :X)、在读学历识别(硕士在读/大二→本科在读)、docx 表格文本按文档顺序提取(修复技能区整块丢失)、词表源补 LLM/大语言模型/Transformers/Prompt Engineering/智能体开发等真实简历高频别名(generate_dataset.py 为词表唯一源,data/ 不入库)、在读/应届年限显示,新增回归测试 2 例,real_jd_500 F1 99.83% 无回退
This commit is contained in:
@@ -107,6 +107,27 @@ def test_resume_bare_name_and_edu_alias():
|
||||
assert "Python" in p.skills
|
||||
|
||||
|
||||
def test_resume_spaced_labels_and_reading_edu():
|
||||
"""PDF/Word 排版常见"姓 名 :孙千越"标签字间带空格;年级写法"大二"推断本科在读。"""
|
||||
from app.match.resume import parse_resume
|
||||
text = ("姓 名 :孙千越\n学 校:东北财经大学 出生年月:2007 年 12 月 23 日\n"
|
||||
"年 级:大二 电子邮箱:qianyuesun@outlook.com\n"
|
||||
"技术能力:Python、Transformers、LLM 推理与评测、RAG、Prompt Engineering、"
|
||||
"Multi-Agent Workflow。")
|
||||
p = parse_resume(text)
|
||||
assert p.name == "孙**" and "孙千越" not in p.raw_masked_text # 空格分隔标签 + 脱敏
|
||||
assert p.education == "本科(在读)" # 年级写法 → 在读学历
|
||||
for s in ["大模型应用开发", "智能体开发", "深度学习", "提示词工程", "RAG", "Python"]:
|
||||
assert s in p.skills, s # 新词表别名命中
|
||||
|
||||
|
||||
def test_resume_reading_degree_explicit():
|
||||
"""明确"硕士在读"写法:保留在读标记,不降级为已毕业学位。"""
|
||||
from app.match.resume import parse_resume
|
||||
p = parse_resume("姓名:张三\n学历:硕士在读\n技能:Python")
|
||||
assert p.education == "硕士(在读)"
|
||||
|
||||
|
||||
def test_learning_path_stage_chunking():
|
||||
"""同层技能超 3 个时拆成多个连续阶段;拓扑序不变。"""
|
||||
stages = topological_stages(["Linux", "Docker", "Kubernetes", "Python", "Java", "Go", "MySQL"],
|
||||
|
||||
Reference in New Issue
Block a user