新增官网材料要求归一化工具 material_normalizer - #60
Open
Passiflora95 wants to merge 2 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题
官网核验后,材料清单出现两类错误:
We request 3 letters, at least two of which are from faculty or recent employers.本应是「推荐信」一行,却整句塞进 materials。解决方案
新增零依赖独立工具
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、去重、槽位映射、未识别保留。