Skip to content

新增官网材料要求归一化工具 material_normalizer - #60

Open
Passiflora95 wants to merge 2 commits into
limouren2000:mainfrom
Passiflora95:fix/material-requirement-matching
Open

新增官网材料要求归一化工具 material_normalizer#60
Passiflora95 wants to merge 2 commits into
limouren2000:mainfrom
Passiflora95:fix/material-requirement-matching

Conversation

@Passiflora95

Copy link
Copy Markdown

解决的问题

官网核验后,材料清单出现两类错误:

  1. 推荐信被抽取成整句原文:如 We request 3 letters, at least two of which are from faculty or recent employers. 本应是「推荐信」一行,却整句塞进 materials。
  2. English proficiency / GRE / GMAT 无法匹配资产库槽位:官网用词与资产库别名不一致,导致申请包对应行恒显示「初始资产库中没有对应材料」。

解决方案

新增零依赖独立工具 Core-Agent/material_normalizer.py,把官网抽取的材料名(可能是整句原文)归一成标准类别,并映射到资产库槽位。

  • MATERIAL_CATEGORIES:材料名关键词映射,含 letters / reference(s) 等变体
  • normalize_material_name():单条归一成标准标签,兼容 transcripts / essays / letters 复数
  • material_slot():映射到资产槽位(English proficiency → language,GRE/GMAT → gre)
  • 无法识别的名称保留原样,便于发现未覆盖的非标准表述

用法

python Core-Agent/material_normalizer.py --json '["We request 3 letters, at least two of which are from faculty or recent employers."]'

测试

python -m unittest discover -s Core-Agent -p "test_material_normalizer.py"

10 个用例覆盖 letters/references 变体、复数、English proficiency、GRE/GMAT、去重、槽位映射、未识别保留。

“Passiflora95” added 2 commits August 14, 2026 20:25
Normalize website-extracted material names into standard categories and
asset slots, fixing two issues:
1. Recommendation requirements extracted as verbatim sentences
   (e.g. 'We request 3 letters...') instead of the 'Recommendations' label.
2. 'English proficiency' / 'GRE / GMAT' failing to map to asset-library slots.

Zero-dependency, runnable standalone utility with unit tests.
…ement-matching

# Conflicts:
#	Core-Agent/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant